net.spy.memcached.protocol.ascii
Class GetAndTouchOperationImpl
java.lang.Object
net.spy.memcached.compat.SpyObject
net.spy.memcached.protocol.BaseOperationImpl
net.spy.memcached.protocol.ascii.GetAndTouchOperationImpl
- All Implemented Interfaces:
- GetAndTouchOperation, KeyedOperation, Operation, VBucketAware
public class GetAndTouchOperationImpl
- extends BaseOperationImpl
- implements GetAndTouchOperation
|
Field Summary |
protected static byte[] |
CRLF
|
| Methods inherited from class net.spy.memcached.protocol.BaseOperationImpl |
addNotMyVbucketNode, cancel, getBuffer, getCallback, getException, getHandlingNode, getNotMyVbucketNodes, getState, getVbucket, handleError, hasErrored, isCancelled, isTimedOut, isTimedOut, isTimedOutUnsent, setBuffer, setCallback, setHandlingNode, setNotMyVbucketNodes, setVBucket, timeOut, transitionState, writeComplete |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.spy.memcached.ops.Operation |
cancel, getBuffer, getCallback, getException, getHandlingNode, getState, handleRead, hasErrored, initialize, isCancelled, isTimedOut, isTimedOut, isTimedOutUnsent, readFromBuffer, setHandlingNode, timeOut, writeComplete |
CRLF
protected static final byte[] CRLF
GetAndTouchOperationImpl
public GetAndTouchOperationImpl(String c,
int e,
GetAndTouchOperation.Callback cb,
String k)
getKeys
public final Collection<String> getKeys()
- Get the keys this GetOperation is looking for.
handleLine
public final void handleLine(String line)
handleRead
public final void handleRead(ByteBuffer b)
- Description copied from interface:
Operation
- Handle a raw data read.
- Specified by:
handleRead in interface Operation- Overrides:
handleRead in class BaseOperationImpl
initialize
public final void initialize()
- Description copied from interface:
Operation
- Initialize this operation. This is used to prepare output byte buffers
and stuff.
- Specified by:
initialize in interface Operation- Specified by:
initialize in class BaseOperationImpl
wasCancelled
protected final void wasCancelled()
- Description copied from class:
BaseOperationImpl
- This is called on each subclass whenever an operation was cancelled.
- Overrides:
wasCancelled in class BaseOperationImpl
matchStatus
protected final OperationStatus matchStatus(String line,
OperationStatus... statii)
- Match the status line provided against one of the given
OperationStatus objects. If none match, return a failure status with
the given line.
- Parameters:
line - the current linestatii - several status objects
- Returns:
- the appropriate status object
getReadType
protected final net.spy.memcached.protocol.ascii.OperationReadType getReadType()
setReadType
protected final void setReadType(net.spy.memcached.protocol.ascii.OperationReadType to)
- Set the read type of this operation.
setArguments
protected final void setArguments(ByteBuffer bb,
Object... args)
- Set some arguments for an operation into the given byte buffer.
readFromBuffer
public void readFromBuffer(ByteBuffer data)
throws IOException
- Description copied from interface:
Operation
- Read data from the given byte buffer and dispatch to the appropriate
read mechanism.
- Specified by:
readFromBuffer in interface Operation- Specified by:
readFromBuffer in class BaseOperationImpl
- Throws:
IOException