|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.ehcache.transaction.xa.VersionAwareWrapper
public class VersionAwareWrapper
Wraps a Command
, that will first be checked against
the optimistic locking strategy before being executed against the Store
.
Field Summary |
---|
Fields inherited from interface net.sf.ehcache.transaction.Command |
---|
EXPIRE_ALL_ELEMENTS, NULL, PUT, PUT_WITH_WRITER, REMOVE, REMOVE_ALL, REMOVE_WITH_WRITER |
Constructor Summary | |
---|---|
VersionAwareWrapper(Command command)
Constructor |
|
VersionAwareWrapper(Command command,
long version,
java.lang.Object key)
Constructor |
Method Summary | |
---|---|
boolean |
execute(CacheWriterManager cacheWriterManager)
Executes the command on some cacheWriterManager |
boolean |
execute(Store store)
Executes the command on some store |
java.lang.String |
getCommandName()
|
java.lang.Object |
getKey()
Getter to the key of the Element this command affects |
long |
getVersion()
getter to the version of the Element this affects |
boolean |
isPut(java.lang.Object key)
Is this command represents adding a key to the store |
boolean |
isRemove(java.lang.Object key)
Is this command represents removing a key to the store |
boolean |
isVersionAware()
Checks whether this command aware of any version scheme of the Element if affects |
boolean |
isWriteCommand()
Checks whether this command is a write command to the underlying store |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VersionAwareWrapper(Command command)
command
- the underlying commandpublic VersionAwareWrapper(Command command, long version, java.lang.Object key)
command
- the underlying commandversion
- the versionkey
- the keyMethod Detail |
---|
public boolean isWriteCommand()
isWriteCommand
in interface VersionAwareCommand
Command.execute(net.sf.ehcache.store.Store)
public boolean execute(Store store)
execute
in interface Command
store
- the Store on which to execute the command
public boolean execute(CacheWriterManager cacheWriterManager)
execute
in interface Command
cacheWriterManager
- the CacheWriterManager on which to execute the command
public boolean isPut(java.lang.Object key)
isPut
in interface Command
key
- the key
public boolean isRemove(java.lang.Object key)
isRemove
in interface Command
key
- the key
public boolean isVersionAware()
isVersionAware
in interface VersionAwareCommand
public long getVersion()
getVersion
in interface VersionAwareCommand
public java.lang.Object getKey()
getKey
in interface VersionAwareCommand
public java.lang.String getCommandName()
getCommandName
in interface Command
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |