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, @Nullable T value) Create a newClusterCommandExecutor.NodeResult.NodeResult(RedisClusterNode node, @Nullable 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.Get the actual value of the command execution or raise an error if null.getValue()Get the actual value of the command execution.inthashCode()<U> @Nullable 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
-
getRequiredValue
Get the actual value of the command execution or raise an error if null.- Returns:
- can be null.
- Throws:
IllegalArgumentException- in case the value is null.- Since:
- 4.0
-
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
-