public class ReplayOutput<K,V> extends CommandOutput<K,V,List<ReplayOutput.Signal>>
CommandOutput capturing output signals to replay these on a target CommandOutput. Replay is useful
when the response requires inspection prior to dispatching the actual output to a command target.| Modifier and Type | Class and Description |
|---|---|
static class |
ReplayOutput.BulkString |
static class |
ReplayOutput.ErrorBytes |
static class |
ReplayOutput.Signal
Encapsulates a replayable decoding signal.
|
codec, error, output| Constructor and Description |
|---|
ReplayOutput()
Initialize a new instance that encodes and decodes keys and values using the supplied codec.
|
| Modifier and Type | Method and Description |
|---|---|
void |
complete(int depth)
Mark the command output complete.
|
void |
multi(int count)
Mark the beginning of a multi sequence (array).
|
void |
replay(CommandOutput<?,?,?> target)
Replay all captured signals on a
CommandOutput. |
void |
set(ByteBuffer bytes)
Set the command output to a sequence of bytes, or null.
|
void |
set(long integer)
Set the command output to a 64-bit signed integer.
|
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.
|
decodeAscii, get, getError, hasError, setSingle, toStringpublic ReplayOutput()
public void set(ByteBuffer bytes)
CommandOutputCommandOutput implementations must override this
method unless they only receive an integer value which cannot be null.set in class CommandOutput<K,V,List<ReplayOutput.Signal>>bytes - The command output, or null.public void set(long integer)
CommandOutputCommandOutput implementations must override this
method unless they only receive a byte array value.set in class CommandOutput<K,V,List<ReplayOutput.Signal>>integer - The command output.public void setError(ByteBuffer error)
CommandOutputsetError in class CommandOutput<K,V,List<ReplayOutput.Signal>>error - Error message.public void setError(String error)
CommandOutputsetError in class CommandOutput<K,V,List<ReplayOutput.Signal>>error - Error message.public void complete(int depth)
CommandOutputcomplete in class CommandOutput<K,V,List<ReplayOutput.Signal>>depth - Remaining depth of output queue.public void multi(int count)
CommandOutputmulti in class CommandOutput<K,V,List<ReplayOutput.Signal>>count - expected number of elements in this multi sequence.public void replay(CommandOutput<?,?,?> target)
CommandOutput.target - the target CommandOutput.Copyright © 2020 lettuce.io. All rights reserved.