voldemort.server.protocol.pb
Class ProtoBuffRequestHandler
java.lang.Object
voldemort.server.protocol.AbstractRequestHandler
voldemort.server.protocol.pb.ProtoBuffRequestHandler
- All Implemented Interfaces:
- RequestHandler
public class ProtoBuffRequestHandler
- extends AbstractRequestHandler
A Protocol Buffers request handler
Method Summary |
StreamRequestHandler |
handleRequest(java.io.DataInputStream inputStream,
java.io.DataOutputStream outputStream)
Handles the request as determined by the protocol and command provided as
input. |
boolean |
isCompleteRequest(java.nio.ByteBuffer buffer)
This method is used by non-blocking code to determine if the give buffer
represents a complete request. |
com.google.protobuf.Message |
unknownStore(java.lang.String storeName,
VProto.RequestType type)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProtoBuffRequestHandler
public ProtoBuffRequestHandler(ErrorCodeMapper errorMapper,
StoreRepository storeRepository)
handleRequest
public StreamRequestHandler handleRequest(java.io.DataInputStream inputStream,
java.io.DataOutputStream outputStream)
throws java.io.IOException
- Description copied from interface:
RequestHandler
- Handles the request as determined by the protocol and command provided as
input.
- Returns:
- StreamRequestHandler if this is the beginning of a streaming
request, null if self-contained
- Throws:
java.io.IOException
isCompleteRequest
public boolean isCompleteRequest(java.nio.ByteBuffer buffer)
- Description copied from interface:
RequestHandler
- This method is used by non-blocking code to determine if the give buffer
represents a complete request. Because the non-blocking code can by
definition not just block waiting for more data, it's possible to get
partial reads, and this identifies that case.
- Parameters:
buffer
- Buffer to check; the buffer is reset to position 0 before
calling this method and the caller must reset it after the call
returns
- Returns:
- True if the buffer holds a complete request, false otherwise
unknownStore
public com.google.protobuf.Message unknownStore(java.lang.String storeName,
VProto.RequestType type)
Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao, Chinmay Soman, Vinoth Chandar, Zhongjie Wu