public class CommandWrapper<K,V,T> extends Object implements RedisCommand<K,V,T>, CompleteableCommand<T>, DecoratedCommand<K,V,T>
| Modifier and Type | Field and Description |
|---|---|
protected RedisCommand<K,V,T> |
command |
| Constructor and Description |
|---|
CommandWrapper(RedisCommand<K,V,T> command) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Cancel a command.
|
void |
complete()
Complete a command.
|
boolean |
completeExceptionally(Throwable throwable) |
void |
encode(ByteBuf buf)
Encode the command.
|
CommandArgs<K,V> |
getArgs() |
RedisCommand<K,V,T> |
getDelegate()
The underlying command.
|
CommandOutput<K,V,T> |
getOutput()
The command output.
|
ProtocolKeyword |
getType() |
boolean |
isCancelled() |
boolean |
isDone() |
void |
onComplete(java.util.function.Consumer<? super T> action) |
void |
setOutput(CommandOutput<K,V,T> output)
Set a new output.
|
String |
toString() |
static <K,V,T> RedisCommand<K,V,T> |
unwrap(RedisCommand<K,V,T> wrapped)
Unwrap a wrapped command.
|
protected RedisCommand<K,V,T> command
public CommandWrapper(RedisCommand<K,V,T> command)
public CommandOutput<K,V,T> getOutput()
RedisCommandgetOutput in interface RedisCommand<K,V,T>public void complete()
RedisCommandcomplete in interface RedisCommand<K,V,T>public void cancel()
RedisCommandcancel in interface RedisCommand<K,V,T>public CommandArgs<K,V> getArgs()
getArgs in interface RedisCommand<K,V,T>public boolean completeExceptionally(Throwable throwable)
completeExceptionally in interface RedisCommand<K,V,T>throwable - the exceptiontrue if this invocation caused this CompletableFuture to transition to a completed state, else
falsepublic ProtocolKeyword getType()
getType in interface RedisCommand<K,V,T>public void encode(ByteBuf buf)
RedisCommandencode in interface RedisCommand<K,V,T>buf - byte buffer to operate on.public boolean isCancelled()
isCancelled in interface RedisCommand<K,V,T>public void setOutput(CommandOutput<K,V,T> output)
RedisCommandsetOutput in interface RedisCommand<K,V,T>output - the new command outputpublic void onComplete(java.util.function.Consumer<? super T> action)
onComplete in interface CompleteableCommand<T>public boolean isDone()
isDone in interface RedisCommand<K,V,T>public RedisCommand<K,V,T> getDelegate()
DecoratedCommandgetDelegate in interface DecoratedCommand<K,V,T>public static <K,V,T> RedisCommand<K,V,T> unwrap(RedisCommand<K,V,T> wrapped)
K - V - T - wrapped - Copyright © 2016. All rights reserved.