Inherited by ConcatenationOperationImpl, DeleteOperationImpl, FlushOperationImpl, GetOperationImpl, MultiGetOperationImpl, MutatorOperationImpl, NoopOperationImpl, StoreOperationImpl, and VersionOperationImpl.

Public Member Functions | |
| void | readFromBuffer (ByteBuffer b) throws IOException |
Protected Member Functions | |
| void | decodePayload (byte[] pl) |
| void | finishedPayload (byte[] pl) throws IOException |
| OperationStatus | getStatusForErrorCode (int errCode, byte[] errPl) |
| boolean | opaqueIsValid () |
| OperationImpl (int c, int o, OperationCallback cb) | |
| void | prepareBuffer (String key, long cas, byte[] val, Object...extraHeaders) |
| void | resetInput () |
Protected Attributes | |
| int | errorCode |
| final int | opaque |
| long | responseCas |
| int | responseCmd |
| int | responseOpaque |
Static Protected Attributes | |
| static final byte[] | EMPTY_BYTES = new byte[0] |
| static final int | ERR_EXISTS = 2 |
| static final int | ERR_NOT_FOUND = 1 |
| static final int | ERR_NOT_STORED = 5 |
| static final OperationStatus | EXISTS_STATUS |
| static final int | MIN_RECV_PACKET = 24 |
| static final OperationStatus | NOT_FOUND_STATUS |
| static final OperationStatus | NOT_STORED_STATUS |
| static final byte | REQ_MAGIC = (byte)0x80 |
| static final byte | RES_MAGIC = (byte)0x81 |
| static final OperationStatus | STATUS_OK |
Static Package Functions | |
| static int | decodeInt (byte[] data, int i) |
| static long | decodeLong (byte[] data, int i) |
| static int | decodeShort (byte[] data, int i) |
| static long | decodeUnsignedInt (byte[] data, int i) |
| static int | generateOpaque () |
Private Attributes | |
| final int | cmd |
| final byte[] | header = new byte[MIN_RECV_PACKET] |
| int | headerOffset = 0 |
| byte[] | payload = null |
| int | payloadOffset = 0 |
Static Private Attributes | |
| static final AtomicInteger | seqNumber = new AtomicInteger(0) |
| OperationImpl | ( | int | c, | |
| int | o, | |||
| OperationCallback | cb | |||
| ) | [protected] |
Construct with opaque.
| o | the opaque value. | |
| cb |
| static int decodeInt | ( | byte[] | data, | |
| int | i | |||
| ) | [static, package] |
| static long decodeLong | ( | byte[] | data, | |
| int | i | |||
| ) | [static, package] |
| void decodePayload | ( | byte[] | pl | ) | [protected] |
Decode the given payload for this command.
| pl | the payload. |
Reimplemented in GetOperationImpl, MutatorOperationImpl, and VersionOperationImpl.
| static int decodeShort | ( | byte[] | data, | |
| int | i | |||
| ) | [static, package] |
| static long decodeUnsignedInt | ( | byte[] | data, | |
| int | i | |||
| ) | [static, package] |
| void finishedPayload | ( | byte[] | pl | ) | throws IOException [protected] |
Reimplemented in MultiGetOperationImpl.
| static int generateOpaque | ( | ) | [static, package] |
Generate an opaque ID.
| OperationStatus getStatusForErrorCode | ( | int | errCode, | |
| byte[] | errPl | |||
| ) | [protected] |
Get the OperationStatus object for the given error code.
| errCode | the error code |
Reimplemented in ConcatenationOperationImpl, DeleteOperationImpl, GetOperationImpl, MutatorOperationImpl, and StoreOperationImpl.
| boolean opaqueIsValid | ( | ) | [protected] |
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.
Reimplemented in MultiGetOperationImpl.
| void prepareBuffer | ( | String | key, | |
| long | cas, | |||
| byte[] | val, | |||
| Object... | extraHeaders | |||
| ) | [protected] |
Prepare a send buffer.
| cmd | the command identifier | |
| key | the key (for keyed ops) | |
| val | the data payload | |
| extraHeaders | any additional headers that need to be sent |
| void readFromBuffer | ( | ByteBuffer | b | ) | throws IOException [virtual] |
Implements BaseOperationImpl.
| void resetInput | ( | ) | [protected] |
final int cmd [private] |
Reimplemented from BaseOperationImpl.
final byte [] EMPTY_BYTES = new byte[0] [static, protected] |
final int ERR_EXISTS = 2 [static, protected] |
final int ERR_NOT_FOUND = 1 [static, protected] |
Error code for items that were not found.
final int ERR_NOT_STORED = 5 [static, protected] |
int errorCode [protected] |
final OperationStatus EXISTS_STATUS [static, protected] |
Initial value:
new CASOperationStatus(false, "Object exists", CASResponse.EXISTS)
final byte [] header = new byte[MIN_RECV_PACKET] [private] |
int headerOffset = 0 [private] |
final int MIN_RECV_PACKET = 24 [static, protected] |
final OperationStatus NOT_FOUND_STATUS [static, protected] |
Initial value:
new CASOperationStatus(false, "Not Found", CASResponse.NOT_FOUND)
final OperationStatus NOT_STORED_STATUS [static, protected] |
Initial value:
new CASOperationStatus(false, "Not Stored", CASResponse.NOT_FOUND)
final int opaque [protected] |
int payloadOffset = 0 [private] |
final byte REQ_MAGIC = (byte)0x80 [static, protected] |
final byte RES_MAGIC = (byte)0x81 [static, protected] |
long responseCas [protected] |
int responseCmd [protected] |
int responseOpaque [protected] |
final AtomicInteger seqNumber = new AtomicInteger(0) [static, private] |
final OperationStatus STATUS_OK [static, protected] |
Initial value:
new CASOperationStatus(true, "OK", CASResponse.OK)
1.5.8