Package io.lettuce.core.output
Class ObjectOutput<K,V>
- java.lang.Object
-
- io.lettuce.core.output.CommandOutput<K,V,Object>
-
- io.lettuce.core.output.ObjectOutput<K,V>
-
- Type Parameters:
K
- Key type.V
- Value type.
public class ObjectOutput<K,V> extends CommandOutput<K,V,Object>
RESP3-capable command output that represents the RESP3 response as RESP3 primitives including support for nesting. Decodes simple strings throughStringCodec.UTF8
.- Since:
- 6.3.0
- Author:
- Mark Paluch
-
-
Field Summary
-
Fields inherited from class io.lettuce.core.output.CommandOutput
codec, error, output
-
-
Constructor Summary
Constructors Constructor Description ObjectOutput(RedisCodec<K,V> codec)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
complete(int depth)
Mark the command output complete.void
multi(int count)
Mark the beginning of a multi sequence (array).void
multiMap(int count)
Mark the beginning of a multi sequence (map).void
set(boolean value)
Update the command output with a boolean.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
set(ByteBuffer bytes)
Update the command output with a sequence of bytes, ornull
.void
setBigNumber(ByteBuffer bytes)
Update the command output with a big number.void
setSingle(ByteBuffer bytes)
Update the command output with a sequence of bytes, ornull
representing a simple string.-
Methods inherited from class io.lettuce.core.output.CommandOutput
decodeAscii, get, getError, hasError, multiArray, multiPush, multiSet, setError, setError, toString
-
-
-
-
Constructor Detail
-
ObjectOutput
public ObjectOutput(RedisCodec<K,V> codec)
-
-
Method Detail
-
set
public void set(long integer)
Description copied from class:CommandOutput
Update the command output with a 64-bit signed integer. ConcreteCommandOutput
implementations must override this method to decodenumber
(integer) response values.- Overrides:
set
in classCommandOutput<K,V,Object>
- Parameters:
integer
- The command output.
-
set
public void set(double number)
Description copied from class:CommandOutput
Update the command output with a floating-point number. ConcreteCommandOutput
implementations must override this method to decodedouble
response values.- Overrides:
set
in classCommandOutput<K,V,Object>
- Parameters:
number
- The command output.
-
setBigNumber
public void setBigNumber(ByteBuffer bytes)
Description copied from class:CommandOutput
Update the command output with a big number. ConcreteCommandOutput
implementations must override this method to decodebig number
response values.- Overrides:
setBigNumber
in classCommandOutput<K,V,Object>
- Parameters:
bytes
- The command output, or null.
-
set
public void set(boolean value)
Description copied from class:CommandOutput
Update the command output with a boolean. ConcreteCommandOutput
implementations must override this method to decodeboolean
response values.- Overrides:
set
in classCommandOutput<K,V,Object>
- Parameters:
value
- The command output.
-
set
public void set(ByteBuffer bytes)
Description copied from class:CommandOutput
Update the command output with a sequence of bytes, ornull
. ConcreteCommandOutput
implementations must override this method to decodebulk
/bytes response values.- Overrides:
set
in classCommandOutput<K,V,Object>
- Parameters:
bytes
- The command output, or null.
-
setSingle
public void setSingle(ByteBuffer bytes)
Description copied from class:CommandOutput
Update the command output with a sequence of bytes, ornull
representing a simple string. ConcreteCommandOutput
implementations must override this method to decodesingle
/bytes response values.- Overrides:
setSingle
in classCommandOutput<K,V,Object>
- Parameters:
bytes
- The command output, or null.
-
complete
public void complete(int depth)
Description copied from class:CommandOutput
Mark the command output complete.- Overrides:
complete
in classCommandOutput<K,V,Object>
- Parameters:
depth
- Remaining depth of output queue.
-
multi
public void multi(int count)
Description copied from class:CommandOutput
Mark the beginning of a multi sequence (array).- Overrides:
multi
in classCommandOutput<K,V,Object>
- Parameters:
count
- expected number of elements in this multi sequence.
-
multiMap
public void multiMap(int count)
Description copied from class:CommandOutput
Mark the beginning of a multi sequence (map).- Overrides:
multiMap
in classCommandOutput<K,V,Object>
- Parameters:
count
- expected number of elements in this multi sequence.
-
-