voldemort.coordinator
Class HttpGetRequestExecutor

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

public class HttpGetRequestExecutor
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
HttpGetRequestExecutor(CompositeVoldemortRequest<ByteArray,byte[]> getRequestObject, org.jboss.netty.channel.MessageEvent requestEvent, DynamicTimeoutStoreClient<ByteArray,byte[]> storeClient, long startTimestampInNs, StoreStats coordinatorPerfStats)
           
HttpGetRequestExecutor(org.jboss.netty.channel.MessageEvent requestEvent)
          Dummy constructor invoked during a Noop Get operation
 
Method Summary
 void run()
           
 void writeResponse(java.util.List<Versioned<byte[]>> versionedValues)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpGetRequestExecutor

public HttpGetRequestExecutor(org.jboss.netty.channel.MessageEvent requestEvent)
Dummy constructor invoked during a Noop Get operation

Parameters:
requestEvent - MessageEvent used to write the response

HttpGetRequestExecutor

public HttpGetRequestExecutor(CompositeVoldemortRequest<ByteArray,byte[]> getRequestObject,
                              org.jboss.netty.channel.MessageEvent requestEvent,
                              DynamicTimeoutStoreClient<ByteArray,byte[]> storeClient,
                              long startTimestampInNs,
                              StoreStats coordinatorPerfStats)
Parameters:
getRequestObject - The request object containing key and timeout values
requestEvent - Reference to the MessageEvent for the response / error
storeClient - Reference to the fat client for performing this Get operation
coordinatorPerfStats - Stats object used to measure the turnaround time
startTimestampInNs - start timestamp of the request
Method Detail

writeResponse

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

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