com.gemstone.gemfire.cache
Interface TransactionWriter
- All Superinterfaces:
- CacheCallback
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.
- Since:
- 6.5
- See Also:
CacheTransactionManager.setWriter(com.gemstone.gemfire.cache.TransactionWriter)
|
Method Summary |
void |
beforeCommit(TransactionEvent event)
Called before the transaction has finished committing, but after conflict checking. |
beforeCommit
void beforeCommit(TransactionEvent event)
throws TransactionWriterException
- Called before the transaction has finished committing, but after conflict checking.
Provides an opportunity for implementors to cause transaction abort by throwing a
TransactionWriterException
- Parameters:
event - the TransactionEvent
- Throws:
TransactionWriterException - in the event that the transaction should be rolled back- See Also:
CacheTransactionManager.commit()
Copyright © 1997-2011 VMware, Inc. All rights reserved.