voldemort.coordinator
Class HttpGetAllRequestExecutor

java.lang.Object
  extended by voldemort.coordinator.HttpGetAllRequestExecutor
All Implemented Interfaces:
java.lang.Runnable

public class HttpGetAllRequestExecutor
extends java.lang.Object
implements java.lang.Runnable

A Runnable class that uses the specified Fat client to perform a Voldemort GET operation. This is invoked by a FatClientWrapper thread to satisfy a corresponding REST GET request.


Constructor Summary
HttpGetAllRequestExecutor(CompositeVoldemortRequest<ByteArray,byte[]> getAllRequestObject, org.jboss.netty.channel.MessageEvent requestMessageEvent, DynamicTimeoutStoreClient<ByteArray,byte[]> storeClient, java.lang.String storeName, long startTimestampInNs, StoreStats coordinatorPerfStats)
           
 
Method Summary
 void run()
           
 void writeResponse(java.util.Map<ByteArray,java.util.List<Versioned<byte[]>>> versionedResponses)
           
 void writeResponseOld(java.util.Map<ByteArray,Versioned<byte[]>> responseVersioned)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpGetAllRequestExecutor

public HttpGetAllRequestExecutor(CompositeVoldemortRequest<ByteArray,byte[]> getAllRequestObject,
                                 org.jboss.netty.channel.MessageEvent requestMessageEvent,
                                 DynamicTimeoutStoreClient<ByteArray,byte[]> storeClient,
                                 java.lang.String storeName,
                                 long startTimestampInNs,
                                 StoreStats coordinatorPerfStats)
Parameters:
getAllRequestObject - The request object containing key and timeout values
requestMessageEvent - Reference to the MessageEvent for the response / error
storeClient - Reference to the fat client for performing this Get operation
storeName - Name of the store intended to be included in the response (content-location)
coordinatorPerfStats - Stats object used to measure the turnaround time
startTimestampInNs - start timestamp of the request
Method Detail

writeResponse

public void writeResponse(java.util.Map<ByteArray,java.util.List<Versioned<byte[]>>> versionedResponses)
                   throws java.lang.Exception
Throws:
java.lang.Exception

writeResponseOld

public void writeResponseOld(java.util.Map<ByteArray,Versioned<byte[]>> responseVersioned)

run

public void run()
Specified by:
run in interface java.lang.Runnable


Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao, Chinmay Soman, Vinoth Chandar, Zhongjie Wu