voldemort.client.protocol.pb
Class ProtoBuffClientRequestFormat

java.lang.Object
  extended by voldemort.client.protocol.pb.ProtoBuffClientRequestFormat
All Implemented Interfaces:
RequestFormat

public class ProtoBuffClientRequestFormat
extends java.lang.Object
implements RequestFormat

The client side of the protocol buffers request format


Field Summary
 ErrorCodeMapper mapper
           
 
Constructor Summary
ProtoBuffClientRequestFormat()
           
 
Method Summary
 boolean isCompleteDeleteResponse(java.nio.ByteBuffer buffer)
           
 boolean isCompleteGetAllResponse(java.nio.ByteBuffer buffer)
           
 boolean isCompleteGetResponse(java.nio.ByteBuffer buffer)
           
 boolean isCompleteGetVersionResponse(java.nio.ByteBuffer buffer)
           
 boolean isCompletePutResponse(java.nio.ByteBuffer buffer)
           
 boolean readDeleteResponse(java.io.DataInputStream input)
           
 java.util.Map<ByteArray,java.util.List<Versioned<byte[]>>> readGetAllResponse(java.io.DataInputStream input)
           
 java.util.List<Versioned<byte[]>> readGetResponse(java.io.DataInputStream input)
           
 java.util.List<Version> readGetVersionResponse(java.io.DataInputStream stream)
           
 void readPutResponse(java.io.DataInputStream input)
           
 void throwException(VProto.Error error)
           
 void writeDeleteRequest(java.io.DataOutputStream output, java.lang.String storeName, ByteArray key, VectorClock version, RequestRoutingType routingType)
           
 void writeGetAllRequest(java.io.DataOutputStream output, java.lang.String storeName, java.lang.Iterable<ByteArray> keys, java.util.Map<ByteArray,byte[]> transforms, RequestRoutingType routingType)
           
 void writeGetRequest(java.io.DataOutputStream output, java.lang.String storeName, ByteArray key, byte[] transforms, RequestRoutingType routingType)
           
 void writeGetVersionRequest(java.io.DataOutputStream output, java.lang.String storeName, ByteArray key, RequestRoutingType routingType)
           
 void writePutRequest(java.io.DataOutputStream output, java.lang.String storeName, ByteArray key, byte[] value, byte[] transforms, VectorClock version, RequestRoutingType routingType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mapper

public final ErrorCodeMapper mapper
Constructor Detail

ProtoBuffClientRequestFormat

public ProtoBuffClientRequestFormat()
Method Detail

writeDeleteRequest

public void writeDeleteRequest(java.io.DataOutputStream output,
                               java.lang.String storeName,
                               ByteArray key,
                               VectorClock version,
                               RequestRoutingType routingType)
                        throws java.io.IOException
Specified by:
writeDeleteRequest in interface RequestFormat
Throws:
java.io.IOException

isCompleteDeleteResponse

public boolean isCompleteDeleteResponse(java.nio.ByteBuffer buffer)
Specified by:
isCompleteDeleteResponse in interface RequestFormat

readDeleteResponse

public boolean readDeleteResponse(java.io.DataInputStream input)
                           throws java.io.IOException
Specified by:
readDeleteResponse in interface RequestFormat
Throws:
java.io.IOException

writeGetRequest

public void writeGetRequest(java.io.DataOutputStream output,
                            java.lang.String storeName,
                            ByteArray key,
                            byte[] transforms,
                            RequestRoutingType routingType)
                     throws java.io.IOException
Specified by:
writeGetRequest in interface RequestFormat
Throws:
java.io.IOException

isCompleteGetResponse

public boolean isCompleteGetResponse(java.nio.ByteBuffer buffer)
Specified by:
isCompleteGetResponse in interface RequestFormat

readGetResponse

public java.util.List<Versioned<byte[]>> readGetResponse(java.io.DataInputStream input)
                                                  throws java.io.IOException
Specified by:
readGetResponse in interface RequestFormat
Throws:
java.io.IOException

writeGetAllRequest

public void writeGetAllRequest(java.io.DataOutputStream output,
                               java.lang.String storeName,
                               java.lang.Iterable<ByteArray> keys,
                               java.util.Map<ByteArray,byte[]> transforms,
                               RequestRoutingType routingType)
                        throws java.io.IOException
Specified by:
writeGetAllRequest in interface RequestFormat
Throws:
java.io.IOException

isCompleteGetAllResponse

public boolean isCompleteGetAllResponse(java.nio.ByteBuffer buffer)
Specified by:
isCompleteGetAllResponse in interface RequestFormat

readGetAllResponse

public java.util.Map<ByteArray,java.util.List<Versioned<byte[]>>> readGetAllResponse(java.io.DataInputStream input)
                                                                              throws java.io.IOException
Specified by:
readGetAllResponse in interface RequestFormat
Throws:
java.io.IOException

writePutRequest

public void writePutRequest(java.io.DataOutputStream output,
                            java.lang.String storeName,
                            ByteArray key,
                            byte[] value,
                            byte[] transforms,
                            VectorClock version,
                            RequestRoutingType routingType)
                     throws java.io.IOException
Specified by:
writePutRequest in interface RequestFormat
Throws:
java.io.IOException

isCompletePutResponse

public boolean isCompletePutResponse(java.nio.ByteBuffer buffer)
Specified by:
isCompletePutResponse in interface RequestFormat

readPutResponse

public void readPutResponse(java.io.DataInputStream input)
                     throws java.io.IOException
Specified by:
readPutResponse in interface RequestFormat
Throws:
java.io.IOException

throwException

public void throwException(VProto.Error error)

isCompleteGetVersionResponse

public boolean isCompleteGetVersionResponse(java.nio.ByteBuffer buffer)
Specified by:
isCompleteGetVersionResponse in interface RequestFormat

readGetVersionResponse

public java.util.List<Version> readGetVersionResponse(java.io.DataInputStream stream)
                                               throws java.io.IOException
Specified by:
readGetVersionResponse in interface RequestFormat
Throws:
java.io.IOException

writeGetVersionRequest

public void writeGetVersionRequest(java.io.DataOutputStream output,
                                   java.lang.String storeName,
                                   ByteArray key,
                                   RequestRoutingType routingType)
                            throws java.io.IOException
Specified by:
writeGetVersionRequest in interface RequestFormat
Throws:
java.io.IOException


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