voldemort.coordinator
Class HttpPutRequestExecutor

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

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

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


Constructor Summary
HttpPutRequestExecutor(CompositeVoldemortRequest<ByteArray,byte[]> putRequestObject, org.jboss.netty.channel.MessageEvent requestEvent, DynamicTimeoutStoreClient<ByteArray,byte[]> storeClient, long startTimestampInNs, StoreStats coordinatorPerfStats)
           
HttpPutRequestExecutor(org.jboss.netty.channel.MessageEvent requestEvent)
          Dummy constructor invoked during a Noop Put operation
 
Method Summary
 void run()
           
 void writeResponse(VectorClock successfulPutVC)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpPutRequestExecutor

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

Parameters:
requestEvent - MessageEvent used to write the response

HttpPutRequestExecutor

public HttpPutRequestExecutor(CompositeVoldemortRequest<ByteArray,byte[]> putRequestObject,
                              org.jboss.netty.channel.MessageEvent requestEvent,
                              DynamicTimeoutStoreClient<ByteArray,byte[]> storeClient,
                              long startTimestampInNs,
                              StoreStats coordinatorPerfStats)
Parameters:
putRequestObject - 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(VectorClock successfulPutVC)

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