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
ConstructorDescriptionNodeResult
(RedisClusterNode node, T value) Create a newClusterCommandExecutor.NodeResult
.NodeResult
(RedisClusterNode node, T value, byte[] key) Create a newClusterCommandExecutor.NodeResult
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
byte[]
getKey()
Return thekey
mapped to the value stored in Redis.getNode()
Get theRedisClusterNode
the command was executed on.getValue()
Get the actual value of the command execution.int
hashCode()
<U> U
Apply themapper function
to 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 theRedisClusterNode
the command was executed on.- Returns:
- never null.
-
getKey
public byte[] getKey()Return thekey
mapped to the value stored in Redis.- Returns:
- a
byte array
of 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 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
-
equals
-
hashCode
public int hashCode()
-