@Override
  public TransactionListener[] getListeners() {
    synchronized (txListeners) {
      int size = txListeners.size();
      if (size == 0) {
        return EMPTY_LISTENERS;
      } else {
        TransactionListener[] result = new TransactionListener[size];
        txListeners.toArray(result);
        return result;
      }
    }
  }
Get the TransactionWriter for the cache

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