Class StorePutCommand
- java.lang.Object
-
- net.sf.ehcache.transaction.xa.commands.AbstractStoreCommand
-
- net.sf.ehcache.transaction.xa.commands.StorePutCommand
-
- All Implemented Interfaces:
Command
public class StorePutCommand extends AbstractStoreCommand
Represents aStore.put(net.sf.ehcache.Element)put} operation to be executed on aStore.- Author:
- Alex Snaps
-
-
Constructor Summary
Constructors Constructor Description StorePutCommand(Element oldElement, Element newElement)Create a StorePutCommand
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ElementgetElement()Getter to the Element instance to be put in the Storejava.lang.ObjectgetObjectKey()Get the key of the element this command is working onbooleanisPut(java.lang.Object key)Is this command represents adding a key to the storebooleanisRemove(java.lang.Object key)Is this command represents removing a key to the store-
Methods inherited from class net.sf.ehcache.transaction.xa.commands.AbstractStoreCommand
getNewElement, getOldElement, prepare, rollback
-
-
-
-
Method Detail
-
isPut
public boolean isPut(java.lang.Object key)
Is this command represents adding a key to the store- Parameters:
key- the key- Returns:
- true, if this command would try to add an Element for key, otherwise false
-
isRemove
public boolean isRemove(java.lang.Object key)
Is this command represents removing a key to the store- Parameters:
key- the key- Returns:
- true, if this command would try to remove an Element for key, otherwise false
-
getElement
public Element getElement()
Getter to the Element instance to be put in the Store- Returns:
- the element instance
-
getObjectKey
public java.lang.Object getObjectKey()
Get the key of the element this command is working on- Returns:
- the element's key
-
-