Class OptimizedSetImpl
java.lang.Object
net.spy.memcached.compat.SpyObject
net.spy.memcached.protocol.BaseOperationImpl
net.spy.memcached.protocol.binary.OperationImpl
net.spy.memcached.protocol.binary.MultiKeyOperationImpl
net.spy.memcached.protocol.binary.OptimizedSetImpl
- All Implemented Interfaces:
KeyedOperation, Operation, VBucketAware
Optimized Set operation for folding a bunch of sets together.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate final Map<Integer, OperationCallback> private static final OperationCallbackprivate final List<CASOperation> private final intFields inherited from class MultiKeyOperationImpl
vbmapFields 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
ConstructorsConstructorDescriptionOptimizedSetImpl(CASOperation firstStore) Construct an optimized get starting with the given get operation. -
Method Summary
Modifier and TypeMethodDescriptionvoidintbytes()private static byteprotected voidfinishedPayload(byte[] pl) voidInitialize this operation.protected booleanValidate an opaque value from the header.intsize()Methods inherited from class MultiKeyOperationImpl
addNotMyVbucketNode, getKeys, getNotMyVbucketNodes, getVBucket, setNotMyVbucketNodes, setVBucket, toStringMethods inherited from class OperationImpl
decodeByte, decodeInt, decodeLong, decodePayload, decodeShort, decodeUnsignedInt, generateOpaque, getErrorMsg, getStatusForErrorCode, 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 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
-
NOOP_CALLBACK
-
terminalOpaque
private final int terminalOpaque -
callbacks
-
ops
-
byteCount
private int byteCount
-
-
Constructor Details
-
OptimizedSetImpl
Construct an optimized get starting with the given get operation.
-
-
Method Details
-
addOperation
-
size
public int size() -
bytes
public int bytes() -
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
-
cmdMap
-
finishedPayload
- Overrides:
finishedPayloadin classOperationImpl- Throws:
IOException
-
opaqueIsValid
protected boolean opaqueIsValid()Description copied from class:OperationImplValidate an opaque value from the header. This may be overridden from a subclass where the opaque isn't expected to always be the same as the request opaque.- Overrides:
opaqueIsValidin classOperationImpl
-