T - public static class ClusterCommandExecutor.NodeResult<T> extends Object
ClusterCommandExecutor.NodeResult encapsulates the actual value returned by a ClusterCommandExecutor.ClusterCommandCallback on a given
RedisClusterNode.| Constructor and Description |
|---|
NodeResult(RedisClusterNode node,
T value)
Create new
ClusterCommandExecutor.NodeResult. |
NodeResult(RedisClusterNode node,
T value,
byte[] key)
Create new
ClusterCommandExecutor.NodeResult. |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getKey() |
RedisClusterNode |
getNode()
Get the
RedisClusterNode the command was executed on. |
T |
getValue()
Get the actual value of the command execution.
|
<U> U |
mapValue(Function<? super T,? extends U> mapper)
Apply the
mapper function to the value and return the mapped value. |
public NodeResult(RedisClusterNode node, @Nullable T value)
ClusterCommandExecutor.NodeResult.node - must not be null.value - can be null.public NodeResult(RedisClusterNode node, @Nullable T value, byte[] key)
ClusterCommandExecutor.NodeResult.node - must not be null.value - can be null.key - must not be null.@Nullable public T getValue()
public RedisClusterNode getNode()
RedisClusterNode the command was executed on.public byte[] getKey()
@Nullable public <U> U mapValue(Function<? super T,? extends U> mapper)
mapper function to the value and return the mapped value.U - type of the mapped value.mapper - must not be null.Copyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.