org.shoal.ha.cache.impl.command
Class Command<K,V>
java.lang.Object
org.shoal.ha.cache.impl.command.Command<K,V>
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- AcknowledgedCommand, LoadRequestCommand, LoadResponseCommand, NoOpCommand, RemoveExpiredCommand, RemoveExpiredResultCommand, ReplicationFramePayloadCommand, SimpleAckCommand, SizeRequestCommand, SizeResponseCommand, StaleCopyRemoveCommand
public abstract class Command<K,V>
- extends java.lang.Object
- implements java.io.Serializable
- Author:
- Mahesh Kannan
- See Also:
- Serialized Form
|
Constructor Summary |
protected |
Command(byte opcode)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
dsc
protected transient DataStoreContext<K,V> dsc
targetInstanceName
protected transient java.lang.String targetInstanceName
Command
protected Command(byte opcode)
initialize
public final void initialize(DataStoreContext<K,V> rs)
setKey
protected final void setKey(K k)
getKey
public final K getKey()
getDataStoreContext
protected final DataStoreContext<K,V> getDataStoreContext()
getCommandManager
protected final CommandManager<K,V> getCommandManager()
getTargetName
public java.lang.String getTargetName()
getOpcode
public final byte getOpcode()
setTargetName
protected void setTargetName(java.lang.String val)
prepareTransmit
public void prepareTransmit(DataStoreContext<K,V> ctx)
throws java.io.IOException
- Throws:
java.io.IOException
captureState
protected static byte[] captureState(java.lang.Object obj)
throws DataStoreException
- Throws:
DataStoreException
getKeyMappingInfo
public java.lang.String getKeyMappingInfo()
getName
public final java.lang.String getName()
execute
public abstract void execute(java.lang.String initiator)
throws DataStoreException
- Throws:
DataStoreException
onSuccess
public void onSuccess()
onFailure
public void onFailure()
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
isArtificialKey
protected boolean isArtificialKey()
beforeTransmit
protected abstract boolean beforeTransmit()
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2012. All Rights Reserved.