@Override
  public TransactionListener getListener() {
    synchronized (txListeners) {
      if (txListeners.isEmpty()) {
        return null;
      } else if (txListeners.size() == 1) {
        return txListeners.get(0);
      } else {
        throw new IllegalStateException(
            "More than one transaction listener exists.");
      }
    }
  }
Get the TransactionWriter for the cache

@return the current TransactionWriter
@see TransactionWriter
geode-core/src/main/java/org/apache/geode/internal/cache/TXManagerImpl.java