Class RedisCluster
- All Implemented Interfaces:
MutinyDelegate
create() with an instance of Redis
or RedisConnection that are not Redis cluster client/connection leads to
an exception.
NOTE: This class has been automatically generated from the original non Mutiny-ified interface.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRedisCluster(io.vertx.redis.client.RedisCluster delegate) Create a new instance ofRedisClusterdelegating to the given (non-null) instance ofRedisCluster.RedisCluster(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionstatic RedisClusterstatic RedisClustercreate(RedisConnection connection) booleanio.vertx.redis.client.RedisClusterGet the delegate instance.io.smallrye.mutiny.Uni<io.vertx.redis.client.RequestGrouping>groupByNodes(List<io.vertx.redis.client.Request> requests) Groups therequestsinto aRequestGrouping, which contains: keyed requests: requests that include a key and it is therefore possible to determine to which master node they should be sent; all requests in each inner list in thekeyedcollection are guaranteed to be sent to the same master node; unkeyed requests: requests that do not include a key and it is therefore not possible to determine to which master node they should be sent. If any of therequestsincludes multiple keys that belong to different master nodes, the resulting uni will fail.io.vertx.redis.client.RequestGroupinggroupByNodesAndAwait(List<io.vertx.redis.client.Request> requests) Groups therequestsinto aRequestGrouping, which contains: keyed requests: requests that include a key and it is therefore possible to determine to which master node they should be sent; all requests in each inner list in thekeyedcollection are guaranteed to be sent to the same master node; unkeyed requests: requests that do not include a key and it is therefore not possible to determine to which master node they should be sent. If any of therequestsincludes multiple keys that belong to different master nodes, the resulting underlying uni will fail.groupByNodesAndForget(List<io.vertx.redis.client.Request> requests) Groups therequestsinto aRequestGrouping, which contains: keyed requests: requests that include a key and it is therefore possible to determine to which master node they should be sent; all requests in each inner list in thekeyedcollection are guaranteed to be sent to the same master node; unkeyed requests: requests that do not include a key and it is therefore not possible to determine to which master node they should be sent. If any of therequestsincludes multiple keys that belong to different master nodes, the resulting underlying uni will fail.inthashCode()static RedisClusternewInstance(io.vertx.redis.client.RedisCluster delegate) Creates a new instance of theRedisCluster.io.smallrye.mutiny.Uni<List<io.vertx.redis.client.Response>>onAllMasterNodes(io.vertx.redis.client.Request request) Runs therequestagainst all master nodes in the cluster.List<io.vertx.redis.client.Response>onAllMasterNodesAndAwait(io.vertx.redis.client.Request request) Runs therequestagainst all master nodes in the cluster.onAllMasterNodesAndForget(io.vertx.redis.client.Request request) Runs therequestagainst all master nodes in the cluster.io.smallrye.mutiny.Uni<List<io.vertx.redis.client.Response>>onAllNodes(io.vertx.redis.client.Request request) Runs therequestagainst all nodes in the cluster.List<io.vertx.redis.client.Response>onAllNodesAndAwait(io.vertx.redis.client.Request request) Runs therequestagainst all nodes in the cluster.onAllNodesAndForget(io.vertx.redis.client.Request request) Runs therequestagainst all nodes in the cluster.toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
RedisCluster
public RedisCluster(io.vertx.redis.client.RedisCluster delegate) Create a new instance ofRedisClusterdelegating to the given (non-null) instance ofRedisCluster. -
RedisCluster
-
-
Method Details
-
getDelegate
public io.vertx.redis.client.RedisCluster getDelegate()Get the delegate instance.This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.
- Specified by:
getDelegatein interfaceMutinyDelegate- Returns:
- the delegate instance
-
onAllNodes
@CheckReturnValue public io.smallrye.mutiny.Uni<List<io.vertx.redis.client.Response>> onAllNodes(io.vertx.redis.client.Request request) Runs therequestagainst all nodes in the cluster. Returns a uni that completes with a list of responses, one from each node, or failure when one of the operations fails. Note that in case of a failure, there are no guarantees that the request was or wasn't executed successfully on other Redis cluster nodes. No result order is guaranteed either.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
request- the request, must not benull- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
RedisCluster.onAllNodes(Request)
-
onAllNodesAndAwait
public List<io.vertx.redis.client.Response> onAllNodesAndAwait(io.vertx.redis.client.Request request) Runs therequestagainst all nodes in the cluster. Returns a underlying uni that completes with a list of responses, one from each node, or failure when one of the operations fails. Note that in case of a failure, there are no guarantees that the request was or wasn't executed successfully on other Redis cluster nodes. No result order is guaranteed either.Unlike the bare Vert.x variant, this method returns a
List<io.vertx.redis.client.Response>. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
request- the request, must not benull- Returns:
- The operation result
- See Also:
-
RedisCluster.onAllNodes(Request)
-
onAllNodesAndForget
Runs therequestagainst all nodes in the cluster. Returns a underlying uni that completes with a list of responses, one from each node, or failure when one of the operations fails. Note that in case of a failure, there are no guarantees that the request was or wasn't executed successfully on other Redis cluster nodes. No result order is guaranteed either.Unlike the bare Vert.x variant, this method ignores the
List<io.vertx.redis.client.Response>result or any failure.- Parameters:
request- the request, must not benull- Returns:
- The current instance to chain operations if needed.
- See Also:
-
RedisCluster.onAllNodes(Request)
-
onAllMasterNodes
@CheckReturnValue public io.smallrye.mutiny.Uni<List<io.vertx.redis.client.Response>> onAllMasterNodes(io.vertx.redis.client.Request request) Runs therequestagainst all master nodes in the cluster. Returns a uni that completes with a list of responses, one from each master node, or failure when one of the operations fails. Note that in case of a failure, there are no guarantees that the request was or wasn't executed successfully on other Redis cluster master nodes. No result order is guaranteed either.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
request- the request, must not benull- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
RedisCluster.onAllMasterNodes(Request)
-
onAllMasterNodesAndAwait
public List<io.vertx.redis.client.Response> onAllMasterNodesAndAwait(io.vertx.redis.client.Request request) Runs therequestagainst all master nodes in the cluster. Returns a underlying uni that completes with a list of responses, one from each master node, or failure when one of the operations fails. Note that in case of a failure, there are no guarantees that the request was or wasn't executed successfully on other Redis cluster master nodes. No result order is guaranteed either.Unlike the bare Vert.x variant, this method returns a
List<io.vertx.redis.client.Response>. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
request- the request, must not benull- Returns:
- The operation result
- See Also:
-
RedisCluster.onAllMasterNodes(Request)
-
onAllMasterNodesAndForget
Runs therequestagainst all master nodes in the cluster. Returns a underlying uni that completes with a list of responses, one from each master node, or failure when one of the operations fails. Note that in case of a failure, there are no guarantees that the request was or wasn't executed successfully on other Redis cluster master nodes. No result order is guaranteed either.Unlike the bare Vert.x variant, this method ignores the
List<io.vertx.redis.client.Response>result or any failure.- Parameters:
request- the request, must not benull- Returns:
- The current instance to chain operations if needed.
- See Also:
-
RedisCluster.onAllMasterNodes(Request)
-
groupByNodes
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.redis.client.RequestGrouping> groupByNodes(List<io.vertx.redis.client.Request> requests) Groups therequestsinto aRequestGrouping, which contains:- keyed requests: requests that include a key and it is therefore possible
to determine to which master node they should be sent; all requests in each inner list
in the
keyedcollection are guaranteed to be sent to the same master node; - unkeyed requests: requests that do not include a key and it is therefore not possible to determine to which master node they should be sent.
requestsincludes multiple keys that belong to different master nodes, the resulting uni will fail.If the cluster client was created with
RedisReplicas#SHAREorRedisReplicas#ALWAYSand the commands are executed individually (usingsend(), notbatch()), it is possible that the commands will be spread across different replicas of the same master node.Note that this method is only reliable in case the Redis cluster is in a stable state. In case of resharding, failover or in general any change of cluster topology, there are no guarantees on the validity of the result.
Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
requests- the requests, must not benull- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
RedisCluster.groupByNodes(List)
- keyed requests: requests that include a key and it is therefore possible
to determine to which master node they should be sent; all requests in each inner list
in the
-
groupByNodesAndAwait
public io.vertx.redis.client.RequestGrouping groupByNodesAndAwait(List<io.vertx.redis.client.Request> requests) Groups therequestsinto aRequestGrouping, which contains:- keyed requests: requests that include a key and it is therefore possible
to determine to which master node they should be sent; all requests in each inner list
in the
keyedcollection are guaranteed to be sent to the same master node; - unkeyed requests: requests that do not include a key and it is therefore not possible to determine to which master node they should be sent.
requestsincludes multiple keys that belong to different master nodes, the resulting underlying uni will fail.If the cluster client was created with
RedisReplicas#SHAREorRedisReplicas#ALWAYSand the commands are executed individually (usingsend(), notbatch()), it is possible that the commands will be spread across different replicas of the same master node.Note that this method is only reliable in case the Redis cluster is in a stable state. In case of resharding, failover or in general any change of cluster topology, there are no guarantees on the validity of the result.
Unlike the bare Vert.x variant, this method returns a
RequestGrouping. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
requests- the requests, must not benull- Returns:
- The operation result
- See Also:
-
RedisCluster.groupByNodes(List)
- keyed requests: requests that include a key and it is therefore possible
to determine to which master node they should be sent; all requests in each inner list
in the
-
groupByNodesAndForget
Groups therequestsinto aRequestGrouping, which contains:- keyed requests: requests that include a key and it is therefore possible
to determine to which master node they should be sent; all requests in each inner list
in the
keyedcollection are guaranteed to be sent to the same master node; - unkeyed requests: requests that do not include a key and it is therefore not possible to determine to which master node they should be sent.
requestsincludes multiple keys that belong to different master nodes, the resulting underlying uni will fail.If the cluster client was created with
RedisReplicas#SHAREorRedisReplicas#ALWAYSand the commands are executed individually (usingsend(), notbatch()), it is possible that the commands will be spread across different replicas of the same master node.Note that this method is only reliable in case the Redis cluster is in a stable state. In case of resharding, failover or in general any change of cluster topology, there are no guarantees on the validity of the result.
Unlike the bare Vert.x variant, this method ignores the
RequestGroupingresult or any failure.- Parameters:
requests- the requests, must not benull- Returns:
- The current instance to chain operations if needed.
- See Also:
-
RedisCluster.groupByNodes(List)
- keyed requests: requests that include a key and it is therefore possible
to determine to which master node they should be sent; all requests in each inner list
in the
-
create
-
create
-
newInstance
Creates a new instance of theRedisCluster. -
hashCode
public int hashCode() -
equals
-
toString
-