Class ConcatenationOperationImpl
- 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.ConcatenationOperationImpl
-
- All Implemented Interfaces:
ConcatenationOperation
,KeyedOperation
,Operation
,VBucketAware
class ConcatenationOperationImpl extends SingleKeyOperationImpl implements ConcatenationOperation
-
-
Field Summary
Fields Modifier and Type Field Description private static int
APPEND
private long
cas
private ConcatenationType
catType
private byte[]
data
private static int
PREPEND
-
Fields inherited from class net.spy.memcached.protocol.binary.SingleKeyOperationImpl
key
-
Fields inherited from class net.spy.memcached.protocol.binary.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, vbucket
-
Fields inherited from class net.spy.memcached.protocol.BaseOperationImpl
callback, CANCELLED, notMyVbucketNodes, TIMED_OUT
-
-
Constructor Summary
Constructors Constructor Description ConcatenationOperationImpl(ConcatenationType t, java.lang.String k, byte[] d, long c, OperationCallback cb)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static byte
cmdMap(ConcatenationType t)
long
getCasValue()
Get the CAS value sent with this operation.byte[]
getData()
Get the bytes to be set during this operation.ConcatenationType
getStoreType()
Get the concatenation type for this operation.void
initialize()
Initialize this operation.java.lang.String
toString()
-
Methods inherited from class net.spy.memcached.protocol.binary.SingleKeyOperationImpl
addNotMyVbucketNode, getKeys, getNotMyVbucketNodes, getVBucket, setNotMyVbucketNodes, setVBucket
-
Methods inherited from class net.spy.memcached.protocol.binary.OperationImpl
decodeByte, decodeInt, decodeLong, decodePayload, decodeShort, decodeUnsignedInt, finishedPayload, generateOpaque, getErrorMsg, getStatusForErrorCode, opaqueIsValid, prepareBuffer, readFromBuffer, resetInput
-
Methods inherited from class net.spy.memcached.protocol.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, writing
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.spy.memcached.ops.KeyedOperation
getKeys
-
Methods inherited from interface net.spy.memcached.ops.Operation
addClone, cancel, getBuffer, getCallback, getCloneCount, getErrorMsg, getException, getHandlingNode, getState, getWriteCompleteTimestamp, handleRead, hasErrored, isCancelled, isTimedOut, isTimedOut, isTimedOutUnsent, readFromBuffer, setCloneCount, setHandlingNode, timeOut, writeComplete, writing
-
-
-
-
Field Detail
-
APPEND
private static final int APPEND
- See Also:
- Constant Field Values
-
PREPEND
private static final int PREPEND
- See Also:
- Constant Field Values
-
cas
private final long cas
-
catType
private final ConcatenationType catType
-
data
private final byte[] data
-
-
Constructor Detail
-
ConcatenationOperationImpl
public ConcatenationOperationImpl(ConcatenationType t, java.lang.String k, byte[] d, long c, OperationCallback cb)
-
-
Method Detail
-
cmdMap
private static byte cmdMap(ConcatenationType t)
-
initialize
public void initialize()
Description copied from interface:Operation
Initialize this operation. This is used to prepare output byte buffers and stuff.- Specified by:
initialize
in interfaceOperation
- Specified by:
initialize
in classBaseOperationImpl
-
getCasValue
public long getCasValue()
Description copied from interface:ConcatenationOperation
Get the CAS value sent with this operation.- Specified by:
getCasValue
in interfaceConcatenationOperation
-
getData
public byte[] getData()
Description copied from interface:ConcatenationOperation
Get 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:
getData
in interfaceConcatenationOperation
-
getStoreType
public ConcatenationType getStoreType()
Description copied from interface:ConcatenationOperation
Get the concatenation type for this operation.- Specified by:
getStoreType
in interfaceConcatenationOperation
-
toString
public java.lang.String toString()
- Overrides:
toString
in classSingleKeyOperationImpl
-
-