voldemort.store.http
Class HttpResponseCodeErrorMapper

java.lang.Object
  extended by voldemort.store.http.HttpResponseCodeErrorMapper

public class HttpResponseCodeErrorMapper
extends java.lang.Object

A Mapping of HTTP response codes to exceptions You must add matching entries in both mapResponseCodeToError and mapErrorToResponseCode


Nested Class Summary
static class HttpResponseCodeErrorMapper.ResponseCode
          A struct to hold the response code and response text for an HTTP error.
 
Constructor Summary
HttpResponseCodeErrorMapper()
           
 
Method Summary
 HttpResponseCodeErrorMapper.ResponseCode mapErrorToResponseCode(VoldemortException v)
           
 VoldemortException mapResponseCodeToError(int responseCode, java.lang.String message)
           
 void throwError(int responseCode, java.lang.String message)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpResponseCodeErrorMapper

public HttpResponseCodeErrorMapper()
Method Detail

mapResponseCodeToError

public VoldemortException mapResponseCodeToError(int responseCode,
                                                 java.lang.String message)

mapErrorToResponseCode

public HttpResponseCodeErrorMapper.ResponseCode mapErrorToResponseCode(VoldemortException v)

throwError

public void throwError(int responseCode,
                       java.lang.String message)


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