OperationImpl Class Reference

Inherits net::spy::memcached::protocol::BaseOperationImpl, and net::spy::memcached::ops::Operation.

Inherited by BaseGetOpImpl, BaseStoreOperationImpl, CASOperationImpl, DeleteOperationImpl, FlushOperationImpl, MutatorOperationImpl, StatsOperationImpl, and VersionOperationImpl.

Collaboration diagram for OperationImpl:

Collaboration graph
[legend]

List of all members.

Public Member Functions

abstract void handleLine (String line)
void readFromBuffer (ByteBuffer data) throws IOException

Protected Member Functions

final OperationReadType getReadType ()
final OperationStatus matchStatus (String line, OperationStatus...statii)
 OperationImpl (OperationCallback cb)
 OperationImpl ()
final void setArguments (ByteBuffer bb, Object...args)
final void setReadType (OperationReadType to)

Static Protected Attributes

static final byte[] CRLF = {'\r', '\n'}

Package Functions

OperationErrorType classifyError (String line)

Package Attributes

boolean foundCr = false
OperationReadType readType = OperationReadType.LINE

Private Attributes

final ByteArrayOutputStream byteBuffer = new ByteArrayOutputStream()

Static Private Attributes

static final String CHARSET = "UTF-8"


Detailed Description

Operations on a memcached connection.

Constructor & Destructor Documentation

OperationImpl (  )  [protected]

OperationImpl ( OperationCallback  cb  )  [protected]


Member Function Documentation

OperationErrorType classifyError ( String  line  )  [package]

final OperationReadType getReadType (  )  [protected]

abstract void handleLine ( String  line  )  [pure virtual]

final OperationStatus matchStatus ( String  line,
OperationStatus...  statii 
) [protected]

Match the status line provided against one of the given OperationStatus objects. If none match, return a failure status with the given line.

Parameters:
line the current line
statii several status objects
Returns:
the appropriate status object

void readFromBuffer ( ByteBuffer  data  )  throws IOException

Read data from the given byte buffer and dispatch to the appropriate read mechanism.

Implements Operation.

final void setArguments ( ByteBuffer  bb,
Object...  args 
) [protected]

Set some arguments for an operation into the given byte buffer.

final void setReadType ( OperationReadType  to  )  [protected]

Set the read type of this operation.


Member Data Documentation

final ByteArrayOutputStream byteBuffer = new ByteArrayOutputStream() [private]

final String CHARSET = "UTF-8" [static, private]

final byte [] CRLF = {'\r', '\n'} [static, protected]

boolean foundCr = false [package]

OperationReadType readType = OperationReadType.LINE [package]


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

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