net.spy.memcached.protocol.binary
Class SASLStepOperationImpl
java.lang.Object
net.spy.memcached.compat.SpyObject
net.spy.memcached.protocol.BaseOperationImpl
net.spy.memcached.protocol.binary.SASLBaseOperationImpl
net.spy.memcached.protocol.binary.SASLStepOperationImpl
- All Implemented Interfaces:
- Operation, SASLStepOperation
public class SASLStepOperationImpl
- extends SASLBaseOperationImpl
- implements SASLStepOperation
Methods inherited from class net.spy.memcached.protocol.BaseOperationImpl |
cancel, getBuffer, getCallback, getException, getHandlingNode, getState, handleError, handleRead, hasErrored, isCancelled, isTimedOut, isTimedOut, isTimedOutUnsent, setBuffer, setCallback, setHandlingNode, timeOut, transitionState, wasCancelled, writeComplete |
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, initialize, isCancelled, isTimedOut, isTimedOut, isTimedOutUnsent, readFromBuffer, setHandlingNode, timeOut, writeComplete |
REQ_MAGIC
protected static final byte REQ_MAGIC
- See Also:
- Constant Field Values
RES_MAGIC
protected static final byte RES_MAGIC
- See Also:
- Constant Field Values
MIN_RECV_PACKET
protected static final int MIN_RECV_PACKET
- See Also:
- Constant Field Values
ERR_NOT_FOUND
protected static final int ERR_NOT_FOUND
- Error code for items that were not found.
- See Also:
- Constant Field Values
ERR_EXISTS
protected static final int ERR_EXISTS
- See Also:
- Constant Field Values
ERR_EINVAL
protected static final int ERR_EINVAL
- See Also:
- Constant Field Values
ERR_NOT_STORED
protected static final int ERR_NOT_STORED
- See Also:
- Constant Field Values
NOT_FOUND_STATUS
protected static final OperationStatus NOT_FOUND_STATUS
EXISTS_STATUS
protected static final OperationStatus EXISTS_STATUS
NOT_STORED_STATUS
protected static final OperationStatus NOT_STORED_STATUS
EMPTY_BYTES
protected static final byte[] EMPTY_BYTES
STATUS_OK
protected static final OperationStatus STATUS_OK
opaque
protected final int opaque
keyLen
protected int keyLen
responseCmd
protected int responseCmd
errorCode
protected int errorCode
responseOpaque
protected int responseOpaque
responseCas
protected long responseCas
SASLStepOperationImpl
public SASLStepOperationImpl(String[] m,
byte[] ch,
String s,
Map<String,?> p,
CallbackHandler h,
OperationCallback c)
buildResponse
protected byte[] buildResponse(SaslClient sc)
throws SaslException
- Specified by:
buildResponse
in class SASLBaseOperationImpl
- Throws:
SaslException
resetInput
protected void resetInput()
readFromBuffer
public void readFromBuffer(ByteBuffer b)
throws IOException
- Description copied from interface:
Operation
- Read data from the given byte buffer and dispatch to the appropriate
read mechanism.
- Specified by:
readFromBuffer
in interface Operation
- Specified by:
readFromBuffer
in class BaseOperationImpl
- Throws:
IOException
getStatusForErrorCode
protected OperationStatus getStatusForErrorCode(int errCode,
byte[] errPl)
- Get the OperationStatus object for the given error code.
- Parameters:
errCode
- the error code
- Returns:
- the status to return, or null if this is an exceptional case
opaqueIsValid
protected boolean opaqueIsValid()
- Validate an opaque value from the header.
This may be overridden from a subclass where the opaque isn't expected
to always be the same as the request opaque.
prepareBuffer
protected void prepareBuffer(String key,
long cas,
byte[] val,
Object... extraHeaders)
- Prepare a send buffer.
- Parameters:
key
- the key (for keyed ops)cas
- the cas valueval
- the data payloadextraHeaders
- any additional headers that need to be sent