|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.spy.memcached.compat.SpyObject
net.spy.memcached.protocol.BaseOperationImpl
net.spy.memcached.protocol.binary.SASLBaseOperationImpl
public abstract class SASLBaseOperationImpl
| Field Summary | |
|---|---|
protected CallbackHandler |
cbh
|
protected byte[] |
challenge
|
protected static byte[] |
EMPTY_BYTES
|
protected static int |
ERR_2BIG
|
protected static int |
ERR_BUSY
|
protected static int |
ERR_DELTA_BADVAL
|
protected static int |
ERR_EXISTS
|
protected static int |
ERR_INTERNAL
|
protected static int |
ERR_INVAL
|
protected static int |
ERR_NO_MEM
|
protected static int |
ERR_NOT_FOUND
|
protected static int |
ERR_NOT_MY_VBUCKET
|
protected static int |
ERR_NOT_STORED
|
protected static int |
ERR_NOT_SUPPORTED
|
protected static int |
ERR_TEMP_FAIL
|
protected static int |
ERR_UNKNOWN_COMMAND
|
protected int |
errorCode
|
protected int |
keyLen
|
protected String[] |
mech
|
protected static int |
MIN_RECV_PACKET
|
protected int |
opaque
|
protected Map<String,?> |
props
|
protected static byte |
REQ_MAGIC
|
protected static byte |
RES_MAGIC
|
protected long |
responseCas
|
protected int |
responseCmd
|
protected int |
responseOpaque
|
protected String |
serverName
|
protected static OperationStatus |
STATUS_OK
|
protected static int |
SUCCESS
Error code for operations. |
protected short |
vbucket
|
| Fields inherited from class net.spy.memcached.protocol.BaseOperationImpl |
|---|
callback, CANCELLED, notMyVbucketNodes |
| Constructor Summary | |
|---|---|
SASLBaseOperationImpl(int c,
String[] m,
byte[] ch,
String s,
Map<String,?> p,
CallbackHandler h,
OperationCallback cb)
|
|
| Method Summary | |
|---|---|
protected abstract byte[] |
buildResponse(SaslClient sc)
|
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)
Read data from the given byte buffer and dispatch to the appropriate read mechanism. |
protected void |
resetInput()
|
| 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 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, isTimedOut, isTimedOut, isTimedOutUnsent, setHandlingNode, timeOut, writeComplete |
| Field Detail |
|---|
protected final String[] mech
protected final byte[] challenge
protected final String serverName
protected final Map<String,?> props
protected final CallbackHandler cbh
protected static final byte REQ_MAGIC
protected static final byte RES_MAGIC
protected static final int MIN_RECV_PACKET
protected static final int SUCCESS
protected static final int ERR_NOT_FOUND
protected static final int ERR_EXISTS
protected static final int ERR_2BIG
protected static final int ERR_INVAL
protected static final int ERR_NOT_STORED
protected static final int ERR_DELTA_BADVAL
protected static final int ERR_NOT_MY_VBUCKET
protected static final int ERR_UNKNOWN_COMMAND
protected static final int ERR_NO_MEM
protected static final int ERR_NOT_SUPPORTED
protected static final int ERR_INTERNAL
protected static final int ERR_BUSY
protected static final int ERR_TEMP_FAIL
protected static final byte[] EMPTY_BYTES
protected static final OperationStatus STATUS_OK
protected short vbucket
protected final int opaque
protected int keyLen
protected int responseCmd
protected int errorCode
protected int responseOpaque
protected long responseCas
| Constructor Detail |
|---|
public SASLBaseOperationImpl(int c,
String[] m,
byte[] ch,
String s,
Map<String,?> p,
CallbackHandler h,
OperationCallback cb)
| Method Detail |
|---|
public void initialize()
Operation
initialize in interface Operationinitialize in class BaseOperationImpl
protected abstract byte[] buildResponse(SaslClient sc)
throws SaslException
SaslExceptionprotected void decodePayload(byte[] pl)
pl - the payload.
protected void finishedPayload(byte[] pl)
throws IOException
IOExceptionprotected void resetInput()
public void readFromBuffer(ByteBuffer b)
throws IOException
Operation
readFromBuffer in interface OperationreadFromBuffer in class BaseOperationImplIOException
protected OperationStatus getStatusForErrorCode(int errCode,
byte[] errPl)
throws IOException
errCode - the error code
IOExceptionprotected boolean opaqueIsValid()
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 | |||||||||