Class OperationImpl
java.lang.Object
net.spy.memcached.compat.SpyObject
net.spy.memcached.protocol.BaseOperationImpl
net.spy.memcached.protocol.ascii.OperationImpl
- All Implemented Interfaces:
Operation
- Direct Known Subclasses:
BaseGetOpImpl, BaseStoreOperationImpl, CASOperationImpl, DeleteOperationImpl, FlushOperationImpl, MutatorOperationImpl, StatsOperationImpl, TouchOperationImpl, UnlockOperationImpl, VersionOperationImpl
Operations on a memcached connection.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ByteArrayOutputStreamprivate static final Stringprotected static final byte[]private byte[]private booleanprivate OperationReadTypeFields inherited from class BaseOperationImpl
callback, CANCELLED, notMyVbucketNodes, TIMED_OUT -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotected -
Method Summary
Modifier and TypeMethodDescription(package private) OperationErrorTypeclassifyError(String line) byte[]Returns the raw bytes of the error message content.protected final OperationReadTypeabstract voidhandleLine(String line) protected 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 voidSet the read type of this operation.Methods inherited from class BaseOperationImpl
addClone, cancel, getBuffer, getCallback, getCloneCount, getException, getHandlingNode, getState, getWriteCompleteTimestamp, handleError, handleRead, hasErrored, initialize, isCancelled, isTimedOut, isTimedOut, isTimedOutUnsent, setBuffer, setCallback, setCloneCount, setHandlingNode, timeOut, transitionState, wasCancelled, writeComplete, writingMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Operation
addClone, cancel, getBuffer, getCallback, getCloneCount, getException, getHandlingNode, getState, getWriteCompleteTimestamp, handleRead, hasErrored, initialize, isCancelled, isTimedOut, isTimedOut, isTimedOutUnsent, setCloneCount, setHandlingNode, timeOut, writeComplete, writing
-
Field Details
-
CRLF
protected static final byte[] CRLF -
CHARSET
- See Also:
-
byteBuffer
-
readType
-
foundCr
private boolean foundCr -
errorMsg
private byte[] errorMsg
-
-
Constructor Details
-
OperationImpl
protected OperationImpl() -
OperationImpl
-
-
Method Details
-
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
-
setReadType
Set the read type of this operation. -
setArguments
Set some arguments for an operation into the given byte buffer. -
classifyError
-
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
-
handleLine
-
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.
-