Class ClusterCommandExecutor.NodeResult<T>
java.lang.Object
org.springframework.data.redis.connection.ClusterCommandExecutor.NodeResult<T>
- Type Parameters:
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
-
Constructor Summary
ConstructorDescriptionNodeResult
(RedisClusterNode node, T value) Create newClusterCommandExecutor.NodeResult
.NodeResult
(RedisClusterNode node, T value, byte[] key) Create newClusterCommandExecutor.NodeResult
. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
getKey()
getNode()
Get theRedisClusterNode
the command was executed on.getValue()
Get the actual value of the command execution.<U> U
Apply themapper function
to the value and return the mapped value.
-
Constructor Details
-
NodeResult
Create newClusterCommandExecutor.NodeResult
.- Parameters:
node
- must not be null.value
- can be null.
-
NodeResult
Create newClusterCommandExecutor.NodeResult
.- Parameters:
node
- must not be null.value
- can be null.key
- must not be null.
-
-
Method Details
-
getValue
Get the actual value of the command execution.- Returns:
- can be null.
-
getNode
Get theRedisClusterNode
the command was executed on.- Returns:
- never null.
-
getKey
public byte[] getKey()- Returns:
-
mapValue
Apply themapper function
to 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
-