voldemort.coordinator
Class VoldemortHttpRequestHandler

java.lang.Object
  extended by org.jboss.netty.channel.SimpleChannelUpstreamHandler
      extended by voldemort.coordinator.VoldemortHttpRequestHandler
All Implemented Interfaces:
org.jboss.netty.channel.ChannelHandler, org.jboss.netty.channel.ChannelUpstreamHandler
Direct Known Subclasses:
NoopHttpRequestHandler

public class VoldemortHttpRequestHandler
extends org.jboss.netty.channel.SimpleChannelUpstreamHandler

A class to handle the HTTP request and execute the same on behalf of the thin client. Currently, we're using a fat client to handle this request.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler
org.jboss.netty.channel.ChannelHandler.Sharable
 
Field Summary
static java.lang.String CUSTOM_RESOLVING_STRATEGY
           
static java.lang.String DEFAULT_RESOLVING_STRATEGY
           
 org.jboss.netty.handler.codec.http.HttpRequest request
           
static java.lang.String SCHEMATA
           
static java.lang.String X_VOLD_INCONSISTENCY_RESOLVER
           
static java.lang.String X_VOLD_REQUEST_TIMEOUT_MS
           
static java.lang.String X_VOLD_VECTOR_CLOCK
           
 
Constructor Summary
VoldemortHttpRequestHandler()
           
VoldemortHttpRequestHandler(java.util.Map<java.lang.String,FatClientWrapper> fatClientMap, CoordinatorErrorStats errorStats)
           
 
Method Summary
 void exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ExceptionEvent e)
           
protected  byte getOperationType(org.jboss.netty.handler.codec.http.HttpMethod httpMethod, java.util.List<ByteArray> keyList)
          Method to determine the operation type
 void messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.MessageEvent e)
           
 
Methods inherited from class org.jboss.netty.channel.SimpleChannelUpstreamHandler
channelBound, channelClosed, channelConnected, channelDisconnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, handleUpstream, writeComplete
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

request

public org.jboss.netty.handler.codec.http.HttpRequest request

X_VOLD_REQUEST_TIMEOUT_MS

public static final java.lang.String X_VOLD_REQUEST_TIMEOUT_MS
See Also:
Constant Field Values

X_VOLD_INCONSISTENCY_RESOLVER

public static final java.lang.String X_VOLD_INCONSISTENCY_RESOLVER
See Also:
Constant Field Values

X_VOLD_VECTOR_CLOCK

public static final java.lang.String X_VOLD_VECTOR_CLOCK
See Also:
Constant Field Values

CUSTOM_RESOLVING_STRATEGY

public static final java.lang.String CUSTOM_RESOLVING_STRATEGY
See Also:
Constant Field Values

DEFAULT_RESOLVING_STRATEGY

public static final java.lang.String DEFAULT_RESOLVING_STRATEGY
See Also:
Constant Field Values

SCHEMATA

public static final java.lang.String SCHEMATA
See Also:
Constant Field Values
Constructor Detail

VoldemortHttpRequestHandler

public VoldemortHttpRequestHandler()

VoldemortHttpRequestHandler

public VoldemortHttpRequestHandler(java.util.Map<java.lang.String,FatClientWrapper> fatClientMap,
                                   CoordinatorErrorStats errorStats)
Method Detail

messageReceived

public void messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx,
                            org.jboss.netty.channel.MessageEvent e)
                     throws java.lang.Exception
Overrides:
messageReceived in class org.jboss.netty.channel.SimpleChannelUpstreamHandler
Throws:
java.lang.Exception

getOperationType

protected byte getOperationType(org.jboss.netty.handler.codec.http.HttpMethod httpMethod,
                                java.util.List<ByteArray> keyList)
Method to determine the operation type

Parameters:
httpMethod - The HTTP Method object received by the Netty handler
keyList -
Returns:
A voldemortOpCode object representing the operation type

exceptionCaught

public void exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx,
                            org.jboss.netty.channel.ExceptionEvent e)
                     throws java.lang.Exception
Overrides:
exceptionCaught in class org.jboss.netty.channel.SimpleChannelUpstreamHandler
Throws:
java.lang.Exception


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