BaseOperationImpl Class Reference

Inherits net::spy::SpyObject.

Inherited by OperationImpl, and OperationImpl.

Collaboration diagram for BaseOperationImpl:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 BaseOperationImpl ()
final void cancel ()
final ByteBuffer getBuffer ()
final OperationCallback getCallback ()
final OperationException getException ()
final OperationState getState ()
void handleRead (ByteBuffer data)
final boolean hasErrored ()
abstract void initialize ()
final boolean isCancelled ()
abstract void readFromBuffer (ByteBuffer data) throws IOException
final void writeComplete ()

Static Public Attributes

static final OperationStatus CANCELLED

Protected Member Functions

void handleError (OperationErrorType eType, String line) throws IOException
final void setBuffer (ByteBuffer to)
void setCallback (OperationCallback to)
final void transitionState (OperationState newState)
void wasCancelled ()

Protected Attributes

OperationCallback callback = null

Private Attributes

boolean cancelled = false
ByteBuffer cmd = null
OperationState state = OperationState.WRITING


Detailed Description

Base class for protocol-specific operation implementations.

Constructor & Destructor Documentation


Member Function Documentation

final void cancel (  ) 

final ByteBuffer getBuffer (  ) 

final OperationCallback getCallback (  ) 

Get the operation callback associated with this operation.

final OperationException getException (  ) 

final OperationState getState (  ) 

void handleError ( OperationErrorType  eType,
String  line 
) throws IOException [protected]

void handleRead ( ByteBuffer  data  ) 

Reimplemented in BaseGetOpImpl.

final boolean hasErrored (  ) 

abstract void initialize (  )  [pure virtual]

final boolean isCancelled (  ) 

abstract void readFromBuffer ( ByteBuffer  data  )  throws IOException [pure virtual]

Implemented in OperationImpl, and OperationImpl.

final void setBuffer ( ByteBuffer  to  )  [protected]

Set the write buffer for this operation.

void setCallback ( OperationCallback  to  )  [protected]

Set the callback for this instance.

final void transitionState ( OperationState  newState  )  [protected]

Transition the state of this operation to the given state.

void wasCancelled (  )  [protected]

This is called on each subclass whenever an operation was cancelled.

Reimplemented in BaseGetOpImpl, BaseStoreOperationImpl, CASOperationImpl, MutatorOperationImpl, and StatsOperationImpl.

final void writeComplete (  ) 


Member Data Documentation

boolean cancelled = false [private]

final OperationStatus CANCELLED [static]

Initial value:

                new CancelledOperationStatus()
Status object for cancelled operations.

ByteBuffer cmd = null [private]

Reimplemented in BaseGetOpImpl, and OperationImpl.

OperationState state = OperationState.WRITING [private]


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:43:37 2012 for Project Wonder by  doxygen 1.5.8