voldemort.client.protocol.admin
Class QueryKeyResult

java.lang.Object
  extended by voldemort.client.protocol.admin.QueryKeyResult

public class QueryKeyResult
extends java.lang.Object

Return type of AdminClient.QueryKeys. Intended to ensure the following invariant: .hasValues() == !.hasException()


Constructor Summary
QueryKeyResult(ByteArray key, java.lang.Exception exception)
           
QueryKeyResult(ByteArray key, java.util.List<Versioned<byte[]>> values)
           
 
Method Summary
 java.lang.Exception getException()
           
 ByteArray getKey()
           
 java.util.List<Versioned<byte[]>> getValues()
           
 boolean hasException()
           
 boolean hasValues()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryKeyResult

public QueryKeyResult(ByteArray key,
                      java.util.List<Versioned<byte[]>> values)

QueryKeyResult

public QueryKeyResult(ByteArray key,
                      java.lang.Exception exception)
Method Detail

getKey

public ByteArray getKey()

hasValues

public boolean hasValues()
Returns:
true iff values were returned.

getValues

public java.util.List<Versioned<byte[]>> getValues()

hasException

public boolean hasException()
Returns:
true iff exception occured during queryKeys.

getException

public java.lang.Exception getException()


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