Class MutatorOperationImpl
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.MutatorOperationImpl
- All Implemented Interfaces:
KeyedOperation, MutatorOperation, Operation, VBucketAware
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final longprivate static final byteprivate static final byteprivate final longprivate final intprivate final MutatorFields 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
ConstructorsConstructorDescriptionMutatorOperationImpl(Mutator m, String k, long b, long d, int e, OperationCallback cb) -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddecodePayload(byte[] pl) Decode the given payload for this command.longgetBy()Get the amount we're mutating by.longGet the default value (for when there's no value to mutate).intGet the expiration to set in case of a new entry.getType()Get the mutator type used for 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
-
CMD_INCR
private static final byte CMD_INCR- See Also:
-
CMD_DECR
private static final byte CMD_DECR- See Also:
-
mutator
-
by
private final long by -
exp
private final int exp -
def
private final long def
-
-
Constructor Details
-
MutatorOperationImpl
-
-
Method Details
-
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
-
decodePayload
protected void decodePayload(byte[] pl) Description copied from class:OperationImplDecode the given payload for this command.- Overrides:
decodePayloadin classOperationImpl- Parameters:
pl- the payload.
-
getBy
public long getBy()Description copied from interface:MutatorOperationGet the amount we're mutating by.- Specified by:
getByin interfaceMutatorOperation
-
getDefault
public long getDefault()Description copied from interface:MutatorOperationGet the default value (for when there's no value to mutate).- Specified by:
getDefaultin interfaceMutatorOperation
-
getExpiration
public int getExpiration()Description copied from interface:MutatorOperationGet the expiration to set in case of a new entry.- Specified by:
getExpirationin interfaceMutatorOperation
-
getType
Description copied from interface:MutatorOperationGet the mutator type used for this operation.- Specified by:
getTypein interfaceMutatorOperation
-
toString
- Overrides:
toStringin classSingleKeyOperationImpl
-