Package 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.BaseGetOpImpl
net.spy.memcached.protocol.ascii.GetAndTouchOperationImpl
- All Implemented Interfaces:
GetAndTouchOperation,KeyedOperation,Operation
Implementation of the get and touch operation.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.spy.memcached.ops.GetAndTouchOperation
GetAndTouchOperation.Callback -
Field Summary
FieldsFields inherited from class net.spy.memcached.protocol.BaseOperationImpl
callback, CANCELLED, notMyVbucketNodes, TIMED_OUT -
Constructor Summary
ConstructorsConstructorDescriptionGetAndTouchOperationImpl(String k, int e, GetAndTouchOperation.Callback cb) GetAndTouchOperationImpl(Collection<String> k, int e, GetAndTouchOperation.Callback cb) -
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]byte[]Returns the raw bytes of the error message content.intGet the expiration to set in case of a new entry.protected final net.spy.memcached.protocol.ascii.OperationReadTypeprotected final OperationStatusmatchStatus(String line, OperationStatus... statii) Match the status line provided against one of the given OperationStatus objects.voidreadFromBuffer(ByteBuffer data) Read data from the given byte buffer and dispatch to the appropriate read mechanism.protected final voidsetArguments(ByteBuffer bb, Object... args) Set some arguments for an operation into the given byte buffer.protected final voidsetReadType(net.spy.memcached.protocol.ascii.OperationReadType to) Set the read type of this operation.Methods inherited from class net.spy.memcached.protocol.ascii.BaseGetOpImpl
extraBytesAfter, getKeys, handleLine, handleRead, initialize, toString, wasCancelledMethods inherited from class net.spy.memcached.protocol.BaseOperationImpl
addClone, cancel, getBuffer, getCallback, getCloneCount, getException, getHandlingNode, getState, getWriteCompleteTimestamp, handleError, hasErrored, isCancelled, isTimedOut, isTimedOut, isTimedOutUnsent, setBuffer, setCallback, setCloneCount, setHandlingNode, timeOut, transitionState, writeComplete, writingMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.spy.memcached.ops.KeyedOperation
getKeysMethods inherited from interface net.spy.memcached.ops.Operation
addClone, cancel, getBuffer, getCallback, getCloneCount, getErrorMsg, getException, getHandlingNode, getState, getWriteCompleteTimestamp, handleRead, hasErrored, initialize, isCancelled, isTimedOut, isTimedOut, isTimedOutUnsent, readFromBuffer, setCloneCount, setHandlingNode, timeOut, writeComplete, writing
-
Field Details
-
CRLF
protected static final byte[] CRLF
-
-
Constructor Details
-
GetAndTouchOperationImpl
-
GetAndTouchOperationImpl
-
-
Method Details
-
getExpiration
public int getExpiration()Description copied from interface:GetAndTouchOperationGet the expiration to set in case of a new entry.- Specified by:
getExpirationin interfaceGetAndTouchOperation
-
extraBytesBefore
protected byte[] extraBytesBefore()- Overrides:
extraBytesBeforein classBaseGetOpImpl
-
matchStatus
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
Set some arguments for an operation into the given byte buffer. -
readFromBuffer
Description copied from interface:OperationRead data from the given byte buffer and dispatch to the appropriate read mechanism.- Specified by:
readFromBufferin interfaceOperation- Specified by:
readFromBufferin classBaseOperationImpl- Throws:
IOException
-
getErrorMsg
public byte[] getErrorMsg()Description copied from interface:OperationReturns the raw bytes of the error message content.- Specified by:
getErrorMsgin interfaceOperation- Returns:
- the raw error message content.
-