Class StoreOperationImpl
java.lang.Object
net.spy.memcached.compat.SpyObject
net.spy.memcached.protocol.BaseOperationImpl
net.spy.memcached.protocol.binary.OperationImpl
net.spy.memcached.protocol.binary.SingleKeyOperationImpl
net.spy.memcached.protocol.binary.StoreOperationImpl
- All Implemented Interfaces:
CASOperation, KeyedOperation, Operation, StoreOperation, VBucketAware
-
Nested Class Summary
Nested classes/interfaces inherited from interface StoreOperation
StoreOperation.Callback -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final byte(package private) static final byteprivate final longprivate final byte[]private final int(package private) static final intprivate final intprivate static final byte(package private) static final byteprivate static final byte(package private) static final byteprivate final StoreTypeFields inherited from class SingleKeyOperationImpl
keyFields inherited from class OperationImpl
DUMMY_OPCODE, EMPTY_BYTES, ERR_2BIG, ERR_BUSY, ERR_DELTA_BADVAL, ERR_EXISTS, ERR_INTERNAL, ERR_INVAL, ERR_NO_MEM, ERR_NOT_FOUND, ERR_NOT_MY_VBUCKET, ERR_NOT_STORED, ERR_NOT_SUPPORTED, ERR_TEMP_FAIL, ERR_UNKNOWN_COMMAND, errorCode, keyLen, MIN_RECV_PACKET, opaque, REQ_MAGIC, RES_MAGIC, responseCas, responseCmd, responseOpaque, STATUS_OK, SUCCESS, vbucketFields inherited from class BaseOperationImpl
callback, CANCELLED, notMyVbucketNodes, TIMED_OUT -
Constructor Summary
ConstructorsConstructorDescriptionStoreOperationImpl(StoreType t, String k, int f, int e, byte[] d, long c, StoreOperation.Callback cb) -
Method Summary
Modifier and TypeMethodDescriptionprivate static byteprotected voiddecodePayload(byte[] pl) Decode the given payload for this command.longGet the CAS value advised for this operation.byte[]getData()Get the bytes to be set during this operation.intGet the expiration value to be set.intgetFlags()Get the flags to be set.Get the store type used by this operation.voidInitialize this operation.toString()Methods inherited from class SingleKeyOperationImpl
addNotMyVbucketNode, getKeys, getNotMyVbucketNodes, getVBucket, setNotMyVbucketNodes, setVBucketMethods inherited from class OperationImpl
decodeByte, decodeInt, decodeLong, decodeShort, decodeUnsignedInt, finishedPayload, generateOpaque, getErrorMsg, getStatusForErrorCode, opaqueIsValid, prepareBuffer, readFromBuffer, resetInputMethods inherited from class BaseOperationImpl
addClone, cancel, getBuffer, getCallback, getCloneCount, getException, getHandlingNode, getState, getWriteCompleteTimestamp, handleError, handleRead, hasErrored, isCancelled, isTimedOut, isTimedOut, isTimedOutUnsent, setBuffer, setCallback, setCloneCount, setHandlingNode, timeOut, transitionState, wasCancelled, writeComplete, writingMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface KeyedOperation
getKeysMethods inherited from interface Operation
addClone, cancel, getBuffer, getCallback, getCloneCount, getErrorMsg, getException, getHandlingNode, getState, getWriteCompleteTimestamp, handleRead, hasErrored, isCancelled, isTimedOut, isTimedOut, isTimedOutUnsent, readFromBuffer, setCloneCount, setHandlingNode, timeOut, writeComplete, writing
-
Field Details
-
SET
private static final byte SET- See Also:
-
ADD
private static final byte ADD- See Also:
-
REPLACE
private static final byte REPLACE- See Also:
-
SETQ
static final byte SETQ- See Also:
-
ADDQ
static final byte ADDQ- See Also:
-
REPLACEQ
static final byte REPLACEQ- See Also:
-
EXTRA_LEN
static final int EXTRA_LEN- See Also:
-
storeType
-
flags
private final int flags -
exp
private final int exp -
cas
private final long cas -
data
private final byte[] data
-
-
Constructor Details
-
StoreOperationImpl
public StoreOperationImpl(StoreType t, String k, int f, int e, byte[] d, long c, StoreOperation.Callback cb)
-
-
Method Details
-
cmdMap
-
initialize
public void initialize()Description copied from interface:OperationInitialize this operation. This is used to prepare output byte buffers and stuff.- Specified by:
initializein interfaceOperation- Specified by:
initializein classBaseOperationImpl
-
getCasValue
public long getCasValue()Description copied from interface:CASOperationGet the CAS value advised for this operation.- Specified by:
getCasValuein interfaceCASOperation
-
getExpiration
public int getExpiration()Description copied from interface:StoreOperationGet the expiration value to be set.- Specified by:
getExpirationin interfaceCASOperation- Specified by:
getExpirationin interfaceStoreOperation
-
getFlags
public int getFlags()Description copied from interface:StoreOperationGet the flags to be set.- Specified by:
getFlagsin interfaceCASOperation- Specified by:
getFlagsin interfaceStoreOperation
-
getData
public byte[] getData()Description copied from interface:StoreOperationGet the bytes to be set during this operation.Note, this returns an exact reference to the bytes and the data must not be modified.
- Specified by:
getDatain interfaceCASOperation- Specified by:
getDatain interfaceStoreOperation
-
getStoreType
Description copied from interface:StoreOperationGet the store type used by this operation.- Specified by:
getStoreTypein interfaceCASOperation- Specified by:
getStoreTypein interfaceStoreOperation
-
decodePayload
protected void decodePayload(byte[] pl) Description copied from class:OperationImplDecode the given payload for this command.- Overrides:
decodePayloadin classOperationImpl- Parameters:
pl- the payload.
-
toString
- Overrides:
toStringin classSingleKeyOperationImpl
-