|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.spy.memcached.compat.SpyObject net.spy.memcached.protocol.BaseOperationImpl net.spy.memcached.protocol.binary.OptimizedSetImpl
public class OptimizedSetImpl
Field Summary | |
---|---|
protected static byte[] |
EMPTY_BYTES
|
protected static int |
ERR_EINVAL
|
protected static int |
ERR_EXISTS
|
protected static int |
ERR_NOT_FOUND
Error code for items that were not found. |
protected static int |
ERR_NOT_STORED
|
protected int |
errorCode
|
protected static OperationStatus |
EXISTS_STATUS
|
protected int |
keyLen
|
protected static int |
MIN_RECV_PACKET
|
protected static OperationStatus |
NOT_FOUND_STATUS
|
protected static OperationStatus |
NOT_STORED_STATUS
|
protected int |
opaque
|
protected static byte |
REQ_MAGIC
|
protected static byte |
RES_MAGIC
|
protected long |
responseCas
|
protected int |
responseCmd
|
protected int |
responseOpaque
|
protected static OperationStatus |
STATUS_OK
|
Fields inherited from class net.spy.memcached.protocol.BaseOperationImpl |
---|
callback, CANCELLED |
Constructor Summary | |
---|---|
OptimizedSetImpl(CASOperation firstStore)
Construct an optimized get starting with the given get operation. |
Method Summary | |
---|---|
void |
addOperation(CASOperation op)
|
int |
bytes()
|
protected void |
decodePayload(byte[] pl)
Decode the given payload for this command. |
protected void |
finishedPayload(byte[] pl)
|
protected OperationStatus |
getStatusForErrorCode(int errCode,
byte[] errPl)
Get the OperationStatus object for the given error code. |
void |
initialize()
Initialize this operation. |
protected boolean |
opaqueIsValid()
Validate an opaque value from the header. |
protected void |
prepareBuffer(String key,
long cas,
byte[] val,
Object... extraHeaders)
Prepare a send buffer. |
void |
readFromBuffer(ByteBuffer b)
|
protected void |
resetInput()
|
int |
size()
|
Methods inherited from class net.spy.memcached.protocol.BaseOperationImpl |
---|
cancel, getBuffer, getCallback, getException, getHandlingNode, getState, handleError, handleRead, hasErrored, isCancelled, setBuffer, setCallback, setHandlingNode, transitionState, wasCancelled, writeComplete |
Methods inherited from class net.spy.memcached.compat.SpyObject |
---|
getLogger |
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, isCancelled, readFromBuffer, setHandlingNode, writeComplete |
Field Detail |
---|
protected static final byte REQ_MAGIC
protected static final byte RES_MAGIC
protected static final int MIN_RECV_PACKET
protected static final int ERR_NOT_FOUND
protected static final int ERR_EXISTS
protected static final int ERR_EINVAL
protected static final int ERR_NOT_STORED
protected static final OperationStatus NOT_FOUND_STATUS
protected static final OperationStatus EXISTS_STATUS
protected static final OperationStatus NOT_STORED_STATUS
protected static final byte[] EMPTY_BYTES
protected static final OperationStatus STATUS_OK
protected final int opaque
protected int keyLen
protected int responseCmd
protected int errorCode
protected int responseOpaque
protected long responseCas
Constructor Detail |
---|
public OptimizedSetImpl(CASOperation firstStore)
Method Detail |
---|
public void addOperation(CASOperation op)
public int size()
public int bytes()
public void initialize()
Operation
initialize
in interface Operation
initialize
in class BaseOperationImpl
protected void finishedPayload(byte[] pl) throws IOException
IOException
protected OperationStatus getStatusForErrorCode(int errCode, byte[] errPl)
errCode
- the error code
protected boolean opaqueIsValid()
protected void resetInput()
public void readFromBuffer(ByteBuffer b) throws IOException
readFromBuffer
in class BaseOperationImpl
IOException
protected void decodePayload(byte[] pl)
pl
- the payload.protected void prepareBuffer(String key, long cas, byte[] val, Object... extraHeaders)
key
- the key (for keyed ops)cas
- the cas valueval
- the data payloadextraHeaders
- any additional headers that need to be sent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |