Class ReplicaGetsOperationImpl
- java.lang.Object
-
- net.spy.memcached.compat.SpyObject
-
- net.spy.memcached.protocol.BaseOperationImpl
-
- net.spy.memcached.protocol.binary.OperationImpl
-
- net.spy.memcached.protocol.binary.SingleKeyOperationImpl
-
- net.spy.memcached.protocol.binary.ReplicaGetsOperationImpl
-
- All Implemented Interfaces:
KeyedOperation
,Operation
,ReplicaGetsOperation
,VBucketAware
public class ReplicaGetsOperationImpl extends SingleKeyOperationImpl implements ReplicaGetsOperation
Implementation of the replica gets operation.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.spy.memcached.ops.ReplicaGetsOperation
ReplicaGetsOperation.Callback
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static int
EXTRA_HDR_LEN
Length of the extra header stuff for a GET response.(package private) static byte
REPLICA_GET_CMD
private int
replicaIndex
-
Fields inherited from class net.spy.memcached.protocol.binary.SingleKeyOperationImpl
key
-
Fields inherited from class net.spy.memcached.protocol.binary.OperationImpl
DUMMY_OPCODE, EMPTY_BYTES, ERR_2BIG, ERR_BUSY, ERR_DELTA_BADVAL, ERR_EXISTS, ERR_INTERNAL, ERR_INVAL, ERR_NO_MEM, ERR_NOT_FOUND, ERR_NOT_MY_VBUCKET, ERR_NOT_STORED, ERR_NOT_SUPPORTED, ERR_TEMP_FAIL, ERR_UNKNOWN_COMMAND, errorCode, keyLen, MIN_RECV_PACKET, opaque, REQ_MAGIC, RES_MAGIC, responseCas, responseCmd, responseOpaque, STATUS_OK, SUCCESS, vbucket
-
Fields inherited from class net.spy.memcached.protocol.BaseOperationImpl
callback, CANCELLED, notMyVbucketNodes, TIMED_OUT
-
-
Constructor Summary
Constructors Constructor Description ReplicaGetsOperationImpl(java.lang.String k, int index, ReplicaGetsOperation.Callback cb)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
decodePayload(byte[] pl)
Decode the given payload for this command.int
getReplicaIndex()
void
initialize()
Initialize this operation.-
Methods inherited from class net.spy.memcached.protocol.binary.SingleKeyOperationImpl
addNotMyVbucketNode, getKeys, getNotMyVbucketNodes, getVBucket, setNotMyVbucketNodes, setVBucket, toString
-
Methods inherited from class net.spy.memcached.protocol.binary.OperationImpl
decodeByte, decodeInt, decodeLong, decodeShort, decodeUnsignedInt, finishedPayload, generateOpaque, getErrorMsg, getStatusForErrorCode, opaqueIsValid, prepareBuffer, readFromBuffer, resetInput
-
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, wasCancelled, 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.KeyedOperation
getKeys
-
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 Detail
-
REPLICA_GET_CMD
static final byte REPLICA_GET_CMD
- See Also:
- Constant Field Values
-
replicaIndex
private final int replicaIndex
-
EXTRA_HDR_LEN
static final int EXTRA_HDR_LEN
Length of the extra header stuff for a GET response.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ReplicaGetsOperationImpl
public ReplicaGetsOperationImpl(java.lang.String k, int index, ReplicaGetsOperation.Callback cb)
-
-
Method Detail
-
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
-
decodePayload
protected void decodePayload(byte[] pl)
Description copied from class:OperationImpl
Decode the given payload for this command.- Overrides:
decodePayload
in classOperationImpl
- Parameters:
pl
- the payload.
-
getReplicaIndex
public int getReplicaIndex()
- Specified by:
getReplicaIndex
in interfaceReplicaGetsOperation
-
-