Class ClusterCommandExecutor.NodeResult<T>
java.lang.Object
org.springframework.data.redis.connection.ClusterCommandExecutor.NodeResult<T>
- Enclosing class:
- ClusterCommandExecutor
ClusterCommandExecutor.NodeResult encapsulates the actual value returned by a ClusterCommandExecutor.ClusterCommandCallback on a given
RedisClusterNode.- Since:
- 1.7
- Author:
- Christoph Strobl, John Blum
-
Constructor Summary
ConstructorsConstructorDescriptionNodeResult(RedisClusterNode node, T value) Create a newClusterCommandExecutor.NodeResult.NodeResult(RedisClusterNode node, T value, byte[] key) Create a newClusterCommandExecutor.NodeResult. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbyte[]getKey()Return thebyte[] keymapped to the value stored in Redis.getNode()Get theRedisClusterNodethe command was executed on.getValue()Get the actual value of the command execution.inthashCode()<U> UApply themapper functionto the value and return the mapped value.
-
Constructor Details
-
NodeResult
Create a newClusterCommandExecutor.NodeResult.- Parameters:
node- must not be null.value- can be null.
-
NodeResult
Create a newClusterCommandExecutor.NodeResult.- Parameters:
node- must not be null.value- can be null.key- must not be null.
-
-
Method Details
-
getNode
Get theRedisClusterNodethe command was executed on.- Returns:
- never null.
-
getKey
public byte[] getKey()Return thebyte[] keymapped to the value stored in Redis.- Returns:
- a
byte[] byte arrayof the key mapped to the value stored in Redis.
-
getValue
Get the actual value of the command execution.- Returns:
- can be null.
-
mapValue
Apply themapper functionto the value and return the mapped value.- Type Parameters:
U- type of the mapped value.- Parameters:
mapper- must not be null.- Returns:
- the mapped value.
- Since:
- 2.1
-
equals
-
hashCode
public int hashCode()
-