|
||||||||||
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
public abstract class BaseOperationImpl
Base class for protocol-specific operation implementations.
Field Summary | |
---|---|
protected OperationCallback |
callback
|
static OperationStatus |
CANCELLED
Status object for cancelled operations. |
Constructor Summary | |
---|---|
BaseOperationImpl()
|
Method Summary | |
---|---|
void |
cancel()
|
ByteBuffer |
getBuffer()
|
OperationCallback |
getCallback()
Get the operation callback associated with this operation. |
OperationException |
getException()
|
MemcachedNode |
getHandlingNode()
|
OperationState |
getState()
|
protected void |
handleError(OperationErrorType eType,
String line)
|
void |
handleRead(ByteBuffer data)
|
boolean |
hasErrored()
|
abstract void |
initialize()
|
boolean |
isCancelled()
|
abstract void |
readFromBuffer(ByteBuffer data)
|
protected void |
setBuffer(ByteBuffer to)
Set the write buffer for this operation. |
protected void |
setCallback(OperationCallback to)
Set the callback for this instance. |
void |
setHandlingNode(MemcachedNode to)
|
protected void |
transitionState(OperationState newState)
Transition the state of this operation to the given state. |
protected void |
wasCancelled()
This is called on each subclass whenever an operation was cancelled. |
void |
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 |
Field Detail |
---|
public static final OperationStatus CANCELLED
protected OperationCallback callback
Constructor Detail |
---|
public BaseOperationImpl()
Method Detail |
---|
public final OperationCallback getCallback()
protected void setCallback(OperationCallback to)
public final boolean isCancelled()
public final boolean hasErrored()
public final OperationException getException()
public final void cancel()
protected void wasCancelled()
public final OperationState getState()
public final ByteBuffer getBuffer()
protected final void setBuffer(ByteBuffer to)
protected final void transitionState(OperationState newState)
public final void writeComplete()
public abstract void initialize()
public abstract void readFromBuffer(ByteBuffer data) throws IOException
IOException
protected void handleError(OperationErrorType eType, String line) throws IOException
IOException
public void handleRead(ByteBuffer data)
public MemcachedNode getHandlingNode()
public void setHandlingNode(MemcachedNode to)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |