public abstract class TapOperationImpl extends OperationImpl implements TapOperation
TapOperation.Callback
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
callback, CANCELLED, notMyVbucketNodes, TIMED_OUT
Modifier | Constructor and Description |
---|---|
protected |
TapOperationImpl(OperationCallback cb) |
Modifier and Type | Method and Description |
---|---|
abstract void |
initialize()
Initialize this operation.
|
void |
readFromBuffer(ByteBuffer data)
Read from the incoming
ByteBuffer . |
decodePayload, finishedPayload, getErrorMsg, getStatusForErrorCode, opaqueIsValid, prepareBuffer, resetInput, toString
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
streamClosed
addClone, cancel, getBuffer, getCallback, getCloneCount, getErrorMsg, getException, getHandlingNode, getState, getWriteCompleteTimestamp, handleRead, hasErrored, isCancelled, isTimedOut, isTimedOut, isTimedOutUnsent, setCloneCount, setHandlingNode, timeOut, writeComplete, writing
protected TapOperationImpl(OperationCallback cb)
public abstract void initialize()
Operation
initialize
in interface Operation
initialize
in class BaseOperationImpl
public void readFromBuffer(ByteBuffer data) throws IOException
OperationImpl
ByteBuffer
.
Reading from the buffer is done in stages, depending on how much data
can be read at once. First, the header is read and then parsed (24
bytes, indicated by OperationImpl.MIN_RECV_PACKET
). Then, the payload is read
(if one is available for this operation and can be loaded fully).readFromBuffer
in interface Operation
readFromBuffer
in class OperationImpl
data
- the buffer to read from.IOException
- if an error happened during parsing/reading.Copyright © 2017. All rights reserved.