net.spy.memcached.protocol
Class ProxyCallback

java.lang.Object
  extended by net.spy.memcached.protocol.ProxyCallback
All Implemented Interfaces:
GetOperation.Callback, OperationCallback

public class ProxyCallback
extends Object
implements GetOperation.Callback

Proxy callback used for dispatching callbacks over optimized gets.


Constructor Summary
ProxyCallback()
           
 
Method Summary
 void addCallbacks(GetOperation o)
           
 void complete()
          Called whenever an operation completes.
 void gotData(String key, int flags, byte[] data)
          Callback for each result from a get.
 int numCallbacks()
           
 int numKeys()
           
 void receivedStatus(OperationStatus status)
          Method invoked with the status when the operation is complete.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyCallback

public ProxyCallback()
Method Detail

addCallbacks

public void addCallbacks(GetOperation o)

gotData

public void gotData(String key,
                    int flags,
                    byte[] data)
Description copied from interface: GetOperation.Callback
Callback for each result from a get.

Specified by:
gotData in interface GetOperation.Callback
Parameters:
key - the key that was retrieved
flags - the flags for this value
data - the data stored under this key

receivedStatus

public void receivedStatus(OperationStatus status)
Description copied from interface: OperationCallback
Method invoked with the status when the operation is complete.

Specified by:
receivedStatus in interface OperationCallback
Parameters:
status - the result of the operation

complete

public void complete()
Description copied from interface: OperationCallback
Called whenever an operation completes.

Specified by:
complete in interface OperationCallback

numKeys

public int numKeys()

numCallbacks

public int numCallbacks()