Package net.spy.memcached.protocol
Class GetCallbackWrapper
- java.lang.Object
-
- net.spy.memcached.protocol.GetCallbackWrapper
-
- All Implemented Interfaces:
GetOperation.Callback,OperationCallback
public class GetCallbackWrapper extends java.lang.Object implements GetOperation.Callback
Wrapper callback for use in optimized gets.
-
-
Field Summary
Fields Modifier and Type Field Description private GetOperation.Callbackcbprivate booleancompletedprivate static OperationStatusENDprivate intremainingKeys
-
Constructor Summary
Constructors Constructor Description GetCallbackWrapper(int k, GetOperation.Callback c)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcomplete()Called whenever an operation completes.voidgotData(java.lang.String key, int flags, byte[] data)Callback for each result from a get.voidreceivedStatus(OperationStatus status)Method invoked with the status when the operation is complete.
-
-
-
Field Detail
-
END
private static final OperationStatus END
-
completed
private boolean completed
-
remainingKeys
private int remainingKeys
-
cb
private GetOperation.Callback cb
-
-
Constructor Detail
-
GetCallbackWrapper
public GetCallbackWrapper(int k, GetOperation.Callback c)
-
-
Method Detail
-
gotData
public void gotData(java.lang.String key, int flags, byte[] data)Description copied from interface:GetOperation.CallbackCallback for each result from a get.- Specified by:
gotDatain interfaceGetOperation.Callback- Parameters:
key- the key that was retrievedflags- the flags for this valuedata- the data stored under this key
-
receivedStatus
public void receivedStatus(OperationStatus status)
Description copied from interface:OperationCallbackMethod invoked with the status when the operation is complete.- Specified by:
receivedStatusin interfaceOperationCallback- Parameters:
status- the result of the operation
-
complete
public void complete()
Description copied from interface:OperationCallbackCalled whenever an operation completes.- Specified by:
completein interfaceOperationCallback
-
-