Package net.spy.memcached.protocol.ascii
Class MutatorOperationImpl
java.lang.Object
net.spy.memcached.compat.SpyObject
net.spy.memcached.protocol.BaseOperationImpl
net.spy.memcached.protocol.ascii.OperationImpl
net.spy.memcached.protocol.ascii.MutatorOperationImpl
- All Implemented Interfaces:
KeyedOperation
,MutatorOperation
,Operation
Operation for mutating integers inside of memcached.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final long
private final String
private final Mutator
private static final OperationStatus
static final int
Fields inherited from class net.spy.memcached.protocol.ascii.OperationImpl
CRLF
Fields inherited from class net.spy.memcached.protocol.BaseOperationImpl
callback, CANCELLED, notMyVbucketNodes, TIMED_OUT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
getBy()
Get the amount we're mutating by.long
Get the default value (for when there's no value to mutate).int
Get the expiration to set in case of a new entry.getKeys()
Get the keys requested in this GetOperation.getType()
Get the mutator type used for this operation.void
handleLine
(String line) void
Initialize this operation.toString()
protected void
This is called on each subclass whenever an operation was cancelled.Methods inherited from class net.spy.memcached.protocol.ascii.OperationImpl
classifyError, getErrorMsg, getReadType, matchStatus, readFromBuffer, setArguments, setReadType
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, 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.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
-
OVERHEAD
public static final int OVERHEAD- See Also:
-
NOT_FOUND
-
mutator
-
key
-
amount
private final long amount
-
-
Constructor Details
-
MutatorOperationImpl
-
-
Method Details
-
handleLine
- Specified by:
handleLine
in classOperationImpl
-
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
-
wasCancelled
protected void wasCancelled()Description copied from class:BaseOperationImpl
This is called on each subclass whenever an operation was cancelled.- Overrides:
wasCancelled
in classBaseOperationImpl
-
getKeys
Description copied from interface:KeyedOperation
Get the keys requested in this GetOperation.- Specified by:
getKeys
in interfaceKeyedOperation
-
getBy
public long getBy()Description copied from interface:MutatorOperation
Get the amount we're mutating by.- Specified by:
getBy
in interfaceMutatorOperation
-
getDefault
public long getDefault()Description copied from interface:MutatorOperation
Get the default value (for when there's no value to mutate).- Specified by:
getDefault
in interfaceMutatorOperation
-
getExpiration
public int getExpiration()Description copied from interface:MutatorOperation
Get the expiration to set in case of a new entry.- Specified by:
getExpiration
in interfaceMutatorOperation
-
getType
Description copied from interface:MutatorOperation
Get the mutator type used for this operation.- Specified by:
getType
in interfaceMutatorOperation
-
toString
-