public abstract class AbstractStoreCommand extends java.lang.Object implements Command
Modifier and Type | Field and Description |
---|---|
private Element |
newElement |
private Element |
oldElement |
private Element |
softLockedElement |
Constructor and Description |
---|
AbstractStoreCommand(Element oldElement,
Element newElement)
Create a Store Command
|
Modifier and Type | Method and Description |
---|---|
private Element |
createElement(java.lang.Object key,
SoftLockID softLockId,
Store store,
boolean wasPinned) |
protected Element |
getNewElement()
Get the new element to put in the underlying store
|
protected Element |
getOldElement()
Get the element in the underlying store at the time this command is created
|
boolean |
prepare(Store store,
SoftLockManager softLockManager,
XidTransactionID transactionId,
ElementValueComparator comparator)
Prepare the commmand un the underlying store
|
void |
rollback(Store underlyingStore,
SoftLockManager softLockManager,
ElementValueComparator comparator)
Rollback the prepared change
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getObjectKey, isPut, isRemove
private final Element oldElement
private final Element newElement
private Element softLockedElement
protected Element getOldElement()
protected Element getNewElement()
public boolean prepare(Store store, SoftLockManager softLockManager, XidTransactionID transactionId, ElementValueComparator comparator)
public void rollback(Store underlyingStore, SoftLockManager softLockManager, ElementValueComparator comparator)
private Element createElement(java.lang.Object key, SoftLockID softLockId, Store store, boolean wasPinned)