public class SyncProtocol extends ProtocolBase
| Modifier and Type | Class and Description |
|---|---|
class |
SyncProtocol.SyncBulkResponse |
class |
SyncProtocol.SyncLineResponse |
class |
SyncProtocol.SyncMultiBulkResponse |
class |
SyncProtocol.SyncMultiLineResponseBase
Abstract base for all multiline responses (as of now, Bulk and MultBulk).
|
class |
SyncProtocol.SyncResponseBase
Synchronous responses are guaranteed to be contiguous chunks (if the
client of this class is respecting its contract) -- meaning, it can go
ahead and read as much as it can in its first read without busy waiting
or reading one byte at a time.
|
protected static class |
SyncProtocol.ValueType |
ProtocolBase.StreamBufferRequestProtocol.Factory| Modifier and Type | Field and Description |
|---|---|
protected static int |
INPUT_STREAM_BUFFER_SIZE |
protected static int |
PREFERRED_LINE_BUFFER_SIZE
Initial size of the shared line buffer
|
protected static int |
PREFERRED_REQUEST_BUFFER_SIZE
Preferred size of request data buffer
|
ASCII_ZERO, COUNT_BYTE, CRLF, CRLF_LEN, DELIMETER_LEN, ERR_BYTE, NUM_BYTE, OK_BYTE, SIZE_BYTE, SPACE| Constructor and Description |
|---|
SyncProtocol() |
| Modifier and Type | Method and Description |
|---|---|
protected Response |
createBooleanResponse(Command cmd) |
protected Response |
createBulkResponse(Command cmd) |
protected Response |
createMultiBulkResponse(Command cmd) |
protected Response |
createNumberResponse(Command cmd) |
protected Request |
createRequest(ByteArrayOutputStream buffer) |
protected ByteArrayOutputStream |
createRequestBufffer(Command cmd) |
protected Response |
createStatusResponse(Command cmd) |
protected Response |
createStringResponse(Command cmd) |
createRequest, createRequestBuffer, createResponse, isCompatibleWithVersionprotected static final int PREFERRED_REQUEST_BUFFER_SIZE
protected static final int PREFERRED_LINE_BUFFER_SIZE
protected static final int INPUT_STREAM_BUFFER_SIZE
protected ByteArrayOutputStream createRequestBufffer(Command cmd)
createRequestBufffer in class ProtocolBasecmd - Command for this request - potentially useful for
optimizing buffers.ByteArrayOutputStream that
is used by all requests created by this Protocol implementation.protected Request createRequest(ByteArrayOutputStream buffer)
createRequest in class ProtocolBaseprotected Response createStatusResponse(Command cmd)
createStatusResponse in class ProtocolBaseprotected Response createBooleanResponse(Command cmd)
createBooleanResponse in class ProtocolBaseprotected Response createStringResponse(Command cmd)
createStringResponse in class ProtocolBaseprotected Response createNumberResponse(Command cmd)
createNumberResponse in class ProtocolBaseprotected Response createBulkResponse(Command cmd)
createBulkResponse in class ProtocolBaseprotected Response createMultiBulkResponse(Command cmd)
createMultiBulkResponse in class ProtocolBaseCopyright © 2009–2021. All rights reserved.