public class SyncProtocol.SyncLineResponse extends SyncProtocol.SyncResponseBase implements StatusResponse, ValueResponse
Response.Type| Modifier and Type | Field and Description |
|---|---|
private boolean |
booleanValue |
private SyncProtocol.ValueType |
flavor |
private long |
longValue |
private java.lang.String |
stringValue |
buffer, offset| Modifier | Constructor and Description |
|---|---|
|
SyncLineResponse(byte[] buff,
Command cmd,
SyncProtocol.ValueType flavor) |
private |
SyncLineResponse(Command cmd,
SyncProtocol.ValueType flavor) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
getBooleanValue() |
long |
getLongValue()
Redis number values are "64bit signed integers".
|
java.lang.String |
getStringValue() |
void |
read(java.io.InputStream in)
Delegates the io handling to the base class and parses the value reponse
based on the data flavor.
|
protected void |
reset(Command cmd) |
protected void |
reset(Command cmd,
SyncProtocol.ValueType flavor) |
readSingleLineResponse, resetassertResponseRead, didRead, didRead, getStatus, getType, isError, writeprivate SyncProtocol.ValueType flavor
private java.lang.String stringValue
private long longValue
private boolean booleanValue
private SyncLineResponse(Command cmd, SyncProtocol.ValueType flavor)
public SyncLineResponse(byte[] buff,
Command cmd,
SyncProtocol.ValueType flavor)
bs - cmd - status - protected void reset(Command cmd)
protected void reset(Command cmd, SyncProtocol.ValueType flavor)
public boolean getBooleanValue()
throws java.lang.IllegalStateException
getBooleanValue in interface ValueResponsejava.lang.IllegalStateExceptionpublic long getLongValue()
throws java.lang.IllegalStateException
ValueResponsegetLongValue in interface ValueResponsejava.lang.IllegalStateExceptionpublic java.lang.String getStringValue()
throws java.lang.IllegalStateException
getStringValue in interface ValueResponsejava.lang.IllegalStateExceptionpublic void read(java.io.InputStream in)
throws ClientRuntimeException,
ProviderException
read in interface Messagein - the steam to read from.ClientRuntimeException - to indicate a system error, potentially network related
and hopefully recoverable. Typically used to wrap and propagate the IO stream's thrown
IOExceptions.ProviderException - to indicate operational error not directly related to the stream,
and should be treated as a bug.