public class TransformingOutput<K,V,S,T> extends CommandOutput<K,V,T>
| Modifier and Type | Class and Description |
|---|---|
static class |
TransformingOutput.TransformingAccessor
Accessor for the underlying output.
|
codec, error, output| Modifier and Type | Method and Description |
|---|---|
void |
complete(int depth)
Mark the command output complete.
|
T |
get()
Get the command output.
|
String |
getError()
Get the error that occurred.
|
boolean |
hasError()
Check if the command resulted in an error.
|
void |
multi(int count)
Mark the beginning of a multi sequence (array).
|
void |
multiArray(int count)
Mark the beginning of a multi sequence (array).
|
void |
multiMap(int count)
Mark the beginning of a multi sequence (map).
|
void |
multiPush(int count)
Mark the beginning of a multi sequence (push-array).
|
void |
multiSet(int count)
Mark the beginning of a set.
|
void |
set(boolean value)
Update the command output with a boolean.
|
void |
set(ByteBuffer bytes)
Update the command output with a sequence of bytes, or
null. |
void |
set(double number)
Update the command output with a floating-point number.
|
void |
set(long integer)
Update the command output with a 64-bit signed integer.
|
void |
setBigNumber(ByteBuffer bytes)
Update the command output with a big number.
|
void |
setError(ByteBuffer error)
Set command output to an error message from the server.
|
void |
setError(String error)
Set command output to an error message from the client.
|
void |
setSingle(ByteBuffer bytes)
Update the command output with a sequence of bytes, or
null representing a simple string. |
static <K,V,S,T> CommandOutput<K,V,T> |
transform(CommandOutput<K,V,S> delegate,
Function<TransformingOutput.TransformingAccessor,T> mappingFunction)
Create a new transforming output.
|
decodeAscii, toStringpublic static <K,V,S,T> CommandOutput<K,V,T> transform(CommandOutput<K,V,S> delegate, Function<TransformingOutput.TransformingAccessor,T> mappingFunction)
public void set(ByteBuffer bytes)
CommandOutputnull. Concrete CommandOutput implementations must
override this method to decode bulk/bytes response values.set in class CommandOutput<K,V,T>bytes - The command output, or null.public void setSingle(ByteBuffer bytes)
CommandOutputnull representing a simple string. Concrete
CommandOutput implementations must override this method to decode single/bytes response values.setSingle in class CommandOutput<K,V,T>bytes - The command output, or null.public void setBigNumber(ByteBuffer bytes)
CommandOutputCommandOutput implementations must override this method to
decode big number response values.setBigNumber in class CommandOutput<K,V,T>bytes - The command output, or null.public void set(long integer)
CommandOutputCommandOutput implementations must override this
method to decode number (integer) response values.set in class CommandOutput<K,V,T>integer - The command output.public void set(double number)
CommandOutputCommandOutput implementations must override this
method to decode double response values.set in class CommandOutput<K,V,T>number - The command output.public void set(boolean value)
CommandOutputCommandOutput implementations must override this method to
decode boolean response values.set in class CommandOutput<K,V,T>value - The command output.public void setError(ByteBuffer error)
CommandOutputsetError in class CommandOutput<K,V,T>error - Error message.public void setError(String error)
CommandOutputsetError in class CommandOutput<K,V,T>error - Error message.public boolean hasError()
CommandOutputhasError in class CommandOutput<K,V,T>public String getError()
CommandOutputgetError in class CommandOutput<K,V,T>public T get()
CommandOutputget in class CommandOutput<K,V,T>public void complete(int depth)
CommandOutputcomplete in class CommandOutput<K,V,T>depth - Remaining depth of output queue.public void multi(int count)
CommandOutputmulti in class CommandOutput<K,V,T>count - expected number of elements in this multi sequence.public void multiArray(int count)
CommandOutputmultiArray in class CommandOutput<K,V,T>count - expected number of elements in this multi sequence.public void multiPush(int count)
CommandOutputmultiPush in class CommandOutput<K,V,T>count - expected number of elements in this multi sequence.public void multiMap(int count)
CommandOutputmultiMap in class CommandOutput<K,V,T>count - expected number of elements in this multi sequence.public void multiSet(int count)
CommandOutputmultiSet in class CommandOutput<K,V,T>count - expected number of elements in this multi sequence.Copyright © 2024 lettuce.io. All rights reserved.