public class SyncProtocol.SyncLineResponse extends SyncProtocol.SyncResponseBase implements StatusResponse, ValueResponse
Response.Type
Constructor and Description |
---|
SyncLineResponse(byte[] buff,
Command cmd,
SyncProtocol.ValueType flavor) |
Modifier and Type | Method and Description |
---|---|
boolean |
getBooleanValue() |
long |
getLongValue()
Redis number values are "64bit signed integers".
|
String |
getStringValue() |
void |
read(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) |
reset
assertResponseRead, didRead, didRead, getStatus, getType, isError, write
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 IllegalStateException
getBooleanValue
in interface ValueResponse
IllegalStateException
public long getLongValue() throws IllegalStateException
ValueResponse
getLongValue
in interface ValueResponse
IllegalStateException
public String getStringValue() throws IllegalStateException
getStringValue
in interface ValueResponse
IllegalStateException
public void read(InputStream in) throws ClientRuntimeException, ProviderException
read
in interface Message
in
- 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
IOException
s.ProviderException
- to indicate operational error not directly related to the stream,
and should be treated as a bug.Copyright © 2009–2015. All rights reserved.