Interface TransactionWriter

All Superinterfaces:
CacheCallback, Declarable

public interface TransactionWriter extends CacheCallback
A callback that is allowed to veto a transaction. Only one TransactionWriter can exist per cache, and only one TransactionWriter will be fired in the entire distributed system for each transaction.

This writer can be used to update a backend data source before the GemFire cache is updated during commit. If the backend update fails, the implementer can throw a TransactionWriterException to veto the transaction.

WARNING: To avoid risk of deadlock, do not invoke CacheFactory.getAnyInstance() from within any callback methods. Instead use TransactionEvent.getCache().

Since:
GemFire 6.5
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called before the transaction has finished committing, but after conflict checking.

    Methods inherited from interface org.apache.geode.cache.CacheCallback

    close

    Methods inherited from interface org.apache.geode.cache.Declarable

    init, initialize