Package org.shoal.adapter.store.commands
Class AbstractSaveCommand<K,V>
- java.lang.Object
-
- org.shoal.ha.cache.impl.command.Command<K,V>
-
- org.shoal.adapter.store.commands.AcknowledgedCommand<K,V>
-
- org.shoal.adapter.store.commands.AbstractSaveCommand<K,V>
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
SaveCommand,TouchCommand
public abstract class AbstractSaveCommand<K,V> extends AcknowledgedCommand<K,V>
- Author:
- Mahesh Kannan
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static Logger_loggerprotected longlastAccessedAtprotected longmaxIdleTimeprotected longversion
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractSaveCommand(byte opcode)AbstractSaveCommand(byte opcode, K k, long version, long lastAccessedAt, long maxIdleTime)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanbeforeTransmit()abstract voidexecute(String initiator)StringgetKeyMappingInfo()longgetLastAccessedAt()longgetMaxIdleTime()longgetVersion()booleanhasState()StringtoString()-
Methods inherited from class org.shoal.adapter.store.commands.AcknowledgedCommand
onFailure, onSuccess, sendAcknowledgement
-
Methods inherited from class org.shoal.ha.cache.impl.command.Command
captureState, getCommandManager, getDataStoreContext, getKey, getName, getOpcode, getTargetName, initialize, isArtificialKey, prepareTransmit, setKey, setTargetName
-
-
-
-
Field Detail
-
_logger
protected static final transient Logger _logger
-
version
protected long version
-
lastAccessedAt
protected long lastAccessedAt
-
maxIdleTime
protected long maxIdleTime
-
-
Constructor Detail
-
AbstractSaveCommand
protected AbstractSaveCommand(byte opcode)
-
AbstractSaveCommand
public AbstractSaveCommand(byte opcode, K k, long version, long lastAccessedAt, long maxIdleTime)
-
-
Method Detail
-
beforeTransmit
public boolean beforeTransmit()
- Overrides:
beforeTransmitin classAcknowledgedCommand<K,V>
-
execute
public abstract void execute(String initiator) throws DataStoreException
- Specified by:
executein classCommand<K,V>- Throws:
DataStoreException
-
getKeyMappingInfo
public String getKeyMappingInfo()
- Overrides:
getKeyMappingInfoin classCommand<K,V>
-
getVersion
public long getVersion()
-
getLastAccessedAt
public long getLastAccessedAt()
-
getMaxIdleTime
public long getMaxIdleTime()
-
hasState
public boolean hasState()
-
-