voldemort.client.protocol.vold
Class VoldemortNativeClientRequestFormat

java.lang.Object
  extended by voldemort.client.protocol.vold.VoldemortNativeClientRequestFormat
All Implemented Interfaces:
RequestFormat

public class VoldemortNativeClientRequestFormat
extends java.lang.Object
implements RequestFormat

The RequestFormat for a low-overhead custom binary protocol


Constructor Summary
VoldemortNativeClientRequestFormat(int protocolVersion)
           
 
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 inputStream)
           
 java.util.Map<ByteArray,java.util.List<Versioned<byte[]>>> readGetAllResponse(java.io.DataInputStream stream)
           
 java.util.List<Versioned<byte[]>> readGetResponse(java.io.DataInputStream inputStream)
           
 java.util.List<Version> readGetVersionResponse(java.io.DataInputStream stream)
           
 void readPutResponse(java.io.DataInputStream inputStream)
           
 void writeDeleteRequest(java.io.DataOutputStream outputStream, 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 outputStream, 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 outputStream, 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
 

Constructor Detail

VoldemortNativeClientRequestFormat

public VoldemortNativeClientRequestFormat(int protocolVersion)
Method Detail

writeDeleteRequest

public void writeDeleteRequest(java.io.DataOutputStream outputStream,
                               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 inputStream)
                           throws java.io.IOException
Specified by:
readDeleteResponse in interface RequestFormat
Throws:
java.io.IOException

writeGetRequest

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

readGetResponse

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

isCompleteGetResponse

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

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 stream)
                                                                              throws java.io.IOException
Specified by:
readGetAllResponse in interface RequestFormat
Throws:
java.io.IOException

writePutRequest

public void writePutRequest(java.io.DataOutputStream outputStream,
                            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 inputStream)
                     throws java.io.IOException
Specified by:
readPutResponse in interface RequestFormat
Throws:
java.io.IOException

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