java.lang.Object
io.lettuce.core.output.CommandOutput<K,V,TransactionResult>
io.lettuce.core.output.MultiOutput<K,V>
- Type Parameters:
K- Key type.V- Value type.
public class MultiOutput<K,V> extends CommandOutput<K,V,TransactionResult>
Output of all commands within a MULTI block.
- Author:
- Will Glozer, Mark Paluch
-
Field Summary
Fields inherited from class io.lettuce.core.output.CommandOutput
codec, error, output -
Constructor Summary
Constructors Constructor Description MultiOutput(RedisCodec<K,V> codec) -
Method Summary
Modifier and Type Method Description voidadd(RedisCommand<K,V,?> cmd)voidcancel()voidcomplete(int depth)Mark the command output complete.TransactionResultget()Get the command output.voidmulti(int count)Mark the beginning of a multi sequence (array).voidset(double number)Update the command output with a floating-point number.voidset(long integer)Update the command output with a 64-bit signed integer.voidset(ByteBuffer bytes)Update the command output with a sequence of bytes, ornull.voidsetBigNumber(ByteBuffer bytes)Update the command output with a big number.voidsetError(ByteBuffer error)Set command output to an error message from the server.voidsetSingle(ByteBuffer bytes)Update the command output with a sequence of bytes, ornullrepresenting a simple string.Methods inherited from class io.lettuce.core.output.CommandOutput
decodeAscii, getError, hasError, multiArray, multiMap, multiPush, multiSet, set, setError, toString
-
Constructor Details
-
MultiOutput
-
-
Method Details
-
add
-
cancel
public void cancel() -
set
public void set(long integer)Description copied from class:CommandOutputUpdate the command output with a 64-bit signed integer. ConcreteCommandOutputimplementations must override this method to decodenumber(integer) response values.- Overrides:
setin classCommandOutput<K,V,TransactionResult>- Parameters:
integer- The command output.
-
setSingle
Description copied from class:CommandOutputUpdate the command output with a sequence of bytes, ornullrepresenting a simple string. ConcreteCommandOutputimplementations must override this method to decodesingle/bytes response values.- Overrides:
setSinglein classCommandOutput<K,V,TransactionResult>- Parameters:
bytes- The command output, or null.
-
setBigNumber
Description copied from class:CommandOutputUpdate the command output with a big number. ConcreteCommandOutputimplementations must override this method to decodebig numberresponse values.- Overrides:
setBigNumberin classCommandOutput<K,V,TransactionResult>- Parameters:
bytes- The command output, or null.
-
set
public void set(double number)Description copied from class:CommandOutputUpdate the command output with a floating-point number. ConcreteCommandOutputimplementations must override this method to decodedoubleresponse values.- Overrides:
setin classCommandOutput<K,V,TransactionResult>- Parameters:
number- The command output.
-
set
Description copied from class:CommandOutputUpdate the command output with a sequence of bytes, ornull. ConcreteCommandOutputimplementations must override this method to decodebulk/bytes response values.- Overrides:
setin classCommandOutput<K,V,TransactionResult>- Parameters:
bytes- The command output, or null.
-
multi
public void multi(int count)Description copied from class:CommandOutputMark the beginning of a multi sequence (array).- Overrides:
multiin classCommandOutput<K,V,TransactionResult>- Parameters:
count- expected number of elements in this multi sequence.
-
setError
Description copied from class:CommandOutputSet command output to an error message from the server.- Overrides:
setErrorin classCommandOutput<K,V,TransactionResult>- Parameters:
error- Error message.
-
complete
public void complete(int depth)Description copied from class:CommandOutputMark the command output complete.- Overrides:
completein classCommandOutput<K,V,TransactionResult>- Parameters:
depth- Remaining depth of output queue.
-
get
Description copied from class:CommandOutputGet the command output.- Overrides:
getin classCommandOutput<K,V,TransactionResult>- Returns:
- The command output.
-