Package net.spy.memcached.protocol.ascii
Class BaseGetOpImpl
java.lang.Object
net.spy.memcached.compat.SpyObject
net.spy.memcached.protocol.BaseOperationImpl
net.spy.memcached.protocol.ascii.OperationImpl
net.spy.memcached.protocol.ascii.BaseGetOpImpl
- All Implemented Interfaces:
Operation
- Direct Known Subclasses:
GetAndTouchOperationImpl
,GetlOperationImpl
,GetOperationImpl
,GetsOperationImpl
Base class for get and gets handlers.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate long
private final String
private int
private String
private byte[]
private static final OperationStatus
protected final int
private final byte[]
private boolean
private final Collection
<String> private static final OperationStatus
private byte
private static final OperationStatus
private int
private static final byte[]
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
ConstructorsConstructorDescriptionBaseGetOpImpl
(String c, int e, OperationCallback cb, String k) BaseGetOpImpl
(String c, OperationCallback cb, Collection<String> k) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected int
final Collection
<String> getKeys()
Get the keys this GetOperation is looking for.final void
handleLine
(String line) final void
Handle a raw data read.final void
Initialize this operation.toString()
protected final 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, 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, getException, getHandlingNode, getState, getWriteCompleteTimestamp, hasErrored, isCancelled, isTimedOut, isTimedOut, isTimedOutUnsent, setCloneCount, setHandlingNode, timeOut, writeComplete, writing
-
Field Details
-
END
-
NOT_FOUND
-
LOCK_ERROR
-
RN_BYTES
private static final byte[] RN_BYTES -
cmd
-
keys
-
currentKey
-
exp
protected final int exp -
expBytes
private final byte[] expBytes -
casValue
private long casValue -
currentFlags
private int currentFlags -
data
private byte[] data -
readOffset
private int readOffset -
lookingFor
private byte lookingFor -
hasValue
private boolean hasValue
-
-
Constructor Details
-
BaseGetOpImpl
-
BaseGetOpImpl
-
-
Method Details
-
getKeys
Get the keys this GetOperation is looking for. -
handleLine
- Specified by:
handleLine
in classOperationImpl
-
handleRead
Description copied from interface:Operation
Handle a raw data read.- Specified by:
handleRead
in interfaceOperation
- Overrides:
handleRead
in classBaseOperationImpl
-
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 interfaceOperation
- Specified by:
initialize
in classBaseOperationImpl
-
afterKeyBytesSize
protected int afterKeyBytesSize() -
afterKeyBytes
-
wasCancelled
protected final void wasCancelled()Description copied from class:BaseOperationImpl
This is called on each subclass whenever an operation was cancelled.- Overrides:
wasCancelled
in classBaseOperationImpl
-
toString
-