org.jboss.cache.commands
Interface ReversibleCommand
- All Superinterfaces:
- Cloneable, DataCommand, ReplicableCommand, VisitableCommand
- All Known Subinterfaces:
- VersionedDataCommand
- All Known Implementing Classes:
- AbstractVersionedDataCommand, CreateNodeCommand, EvictCommand, InvalidateCommand, MoveCommand, PutDataMapCommand, PutKeyValueCommand, RemoveDataCommand, RemoveKeyCommand, RemoveNodeCommand
public interface ReversibleCommand
- extends DataCommand
A reversible command is one that can be rolled back. Also typically has a reference to a GlobalTransaction
.
- Since:
- 2.2.0
- Author:
- Mircea.Markus@jboss.com, Manik Surtani (manik@jboss.org)
rollback
void rollback()
- Reverses a command that has already been invoked.
Important: this method will be invoked at the end of interceptors chain. It should never be called directly from
a custom interceptor.
getGlobalTransaction
GlobalTransaction getGlobalTransaction()
- Returns:
- a GlobalTransaction associated with this command.
setGlobalTransaction
void setGlobalTransaction(GlobalTransaction gtx)
- Sets a GlobalTransaction on this command.
- Parameters:
gtx
- global transaction to set
Copyright © 2008 JBoss, a division of Red Hat. All Rights Reserved.