com.basho.riak.client.raw
Class JSONErrorParser

java.lang.Object
  extended by com.basho.riak.client.raw.JSONErrorParser

public class JSONErrorParser
extends Object

Exceptions come back from Riak as JSON, parses exceptions, and throws the most specific exception it can.

Author:
russell

Constructor Summary
JSONErrorParser()
           
 
Method Summary
static boolean isTimeoutException(String json)
          Does the json represent a riak map/reduce timeout exception?
static RiakException parseException(String json)
          Parses some Riak error json into a checked exception of the most specific type it can manage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSONErrorParser

public JSONErrorParser()
Method Detail

parseException

public static RiakException parseException(String json)
Parses some Riak error json into a checked exception of the most specific type it can manage.

Parameters:
json - The error from Riak
Returns:
a RiakException as specific as possible
Throws:
IOException

isTimeoutException

public static boolean isTimeoutException(String json)
Does the json represent a riak map/reduce timeout exception?

Parameters:
json - an error String from Riak
Returns:
true if json represents an m/r timeout, false otherwse
Throws:
IOException


Copyright © 2012. All Rights Reserved.