Class AbstractStoreCommand
- java.lang.Object
-
- net.sf.ehcache.transaction.xa.commands.AbstractStoreCommand
-
- All Implemented Interfaces:
Command
- Direct Known Subclasses:
StorePutCommand,StoreRemoveCommand
public abstract class AbstractStoreCommand extends java.lang.Object implements Command
- Author:
- Ludovic Orban
-
-
Constructor Summary
Constructors Constructor Description AbstractStoreCommand(Element oldElement, Element newElement)Create a Store Command
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ElementgetNewElement()Get the new element to put in the underlying storeprotected ElementgetOldElement()Get the element in the underlying store at the time this command is createdbooleanprepare(Store store, SoftLockManager softLockManager, XidTransactionID transactionId, ElementValueComparator comparator)Prepare the commmand un the underlying storevoidrollback(Store store, SoftLockManager softLockManager)Rollback the prepared change-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.ehcache.transaction.xa.commands.Command
getObjectKey, isPut, isRemove
-
-
-
-
Method Detail
-
getOldElement
protected Element getOldElement()
Get the element in the underlying store at the time this command is created- Returns:
- the old element
-
getNewElement
protected Element getNewElement()
Get the new element to put in the underlying store- Returns:
- the new element to put in the underlying store
-
prepare
public boolean prepare(Store store, SoftLockManager softLockManager, XidTransactionID transactionId, ElementValueComparator comparator)
Prepare the commmand un the underlying store
-
rollback
public void rollback(Store store, SoftLockManager softLockManager)
Rollback the prepared change
-
-