Class Redis
- All Implemented Interfaces:
MutinyDelegate
NOTE: This class has been automatically generated from the original non Mutiny-ified interface.
- See Also:
-
Redis
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.smallrye.mutiny.Uni<List<io.vertx.redis.client.Response>>Sends a list of commands in a single IO operation, this prevents any inter twinning to happen from other client users.List<io.vertx.redis.client.Response>batchAndAwait(List<io.vertx.redis.client.Request> commands) Sends a list of commands in a single IO operation, this prevents any inter twinning to happen from other client users.batchAndForget(List<io.vertx.redis.client.Request> commands) Sends a list of commands in a single IO operation, this prevents any inter twinning to happen from other client users.io.smallrye.mutiny.Uni<Void>close()Closes the client and terminates any connection.voidCloses the client and terminates any connection.Closes the client and terminates any connection.io.smallrye.mutiny.Uni<RedisConnection>connect()Connects to the Redis server.Connects to the Redis server.Connects to the Redis server.static RediscreateClient(Vertx vertx) Create a new Redis client using the default client options.static RediscreateClient(Vertx vertx, io.vertx.redis.client.RedisOptions options) Create a new Redis client using the given client options.static RediscreateClient(Vertx vertx, String connectionString) Create a new Redis client using the default client options.static RediscreateClusterClient(Vertx vertx, io.vertx.redis.client.RedisOptions options, Supplier<io.smallrye.mutiny.Uni<io.vertx.redis.client.RedisClusterConnectOptions>> connectOptions) Creates a new cluster Redis client.static RediscreateReplicationClient(Vertx vertx, io.vertx.redis.client.RedisOptions options, Supplier<io.smallrye.mutiny.Uni<io.vertx.redis.client.RedisReplicationConnectOptions>> connectOptions) Creates a new replication Redis client.static RediscreateSentinelClient(Vertx vertx, io.vertx.redis.client.RedisOptions options, Supplier<io.smallrye.mutiny.Uni<io.vertx.redis.client.RedisSentinelConnectOptions>> connectOptions) Creates a new sentinel Redis client.static RediscreateStandaloneClient(Vertx vertx, io.vertx.redis.client.RedisOptions options, Supplier<io.smallrye.mutiny.Uni<io.vertx.redis.client.RedisStandaloneConnectOptions>> connectOptions) Creates a new standalone Redis client.booleanio.vertx.redis.client.RedisGet the delegate instance.inthashCode()static RedisnewInstance(io.vertx.redis.client.Redis delegate) Creates a new instance of theRedis.io.smallrye.mutiny.Uni<io.vertx.redis.client.Response>send(io.vertx.redis.client.Request command) Send the given command to the Redis server or cluster.io.vertx.redis.client.ResponsesendAndAwait(io.vertx.redis.client.Request command) Send the given command to the Redis server or cluster.sendAndForget(io.vertx.redis.client.Request command) Send the given command to the Redis server or cluster.toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
Redis
public Redis(io.vertx.redis.client.Redis delegate) Create a new instance ofRedisdelegating to the given (non-null) instance ofRedis. -
Redis
-
-
Method Details
-
getDelegate
public io.vertx.redis.client.Redis 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
-
connect
Connects to the Redis server.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.
- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
Redis.connect()
-
connectAndAwait
Connects to the Redis server.Unlike the bare Vert.x variant, this method returns a
RedisConnection. 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).- Returns:
- The operation result
- See Also:
-
Redis.connect()
-
connectAndForget
Connects to the Redis server.Unlike the bare Vert.x variant, this method ignores the
RedisConnectionresult or any failure.- Returns:
- The current instance to chain operations if needed.
- See Also:
-
Redis.connect()
-
close
Closes the client and terminates any connection.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.
- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
Redis.close()
-
closeAndAwait
public void closeAndAwait()Closes the client and terminates any connection.Unlike the bare Vert.x variant, this method returns a
Void. 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).- See Also:
-
Redis.close()
-
closeAndForget
Closes the client and terminates any connection.Unlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Returns:
- The current instance to chain operations if needed.
- See Also:
-
Redis.close()
-
send
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.redis.client.Response> send(io.vertx.redis.client.Request command) Send the given command to the Redis server or cluster.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:
command- the command to send- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
Redis.send(Request)
-
sendAndAwait
public io.vertx.redis.client.Response sendAndAwait(io.vertx.redis.client.Request command) Send the given command to the Redis server or cluster.Unlike the bare Vert.x variant, this method returns a
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:
command- the command to send- Returns:
- The operation result
- See Also:
-
Redis.send(Request)
-
sendAndForget
Send the given command to the Redis server or cluster.Unlike the bare Vert.x variant, this method ignores the
Responseresult or any failure.- Parameters:
command- the command to send- Returns:
- The current instance to chain operations if needed.
- See Also:
-
Redis.send(Request)
-
batch
@CheckReturnValue public io.smallrye.mutiny.Uni<List<io.vertx.redis.client.Response>> batch(List<io.vertx.redis.client.Request> commands) Sends a list of commands in a single IO operation, this prevents any inter twinning to happen from other client users.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:
commands- list of command to send- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
Redis.batch(List)
-
batchAndAwait
public List<io.vertx.redis.client.Response> batchAndAwait(List<io.vertx.redis.client.Request> commands) Sends a list of commands in a single IO operation, this prevents any inter twinning to happen from other client users.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:
commands- list of command to send- Returns:
- The operation result
- See Also:
-
Redis.batch(List)
-
batchAndForget
Sends a list of commands in a single IO operation, this prevents any inter twinning to happen from other client users.Unlike the bare Vert.x variant, this method ignores the
List<io.vertx.redis.client.Response>result or any failure.- Parameters:
commands- list of command to send- Returns:
- The current instance to chain operations if needed.
- See Also:
-
Redis.batch(List)
-
createClient
Create a new Redis client using the default client options.- Parameters:
vertx- the vertx instance- Returns:
- the client
-
createClient
Create a new Redis client using the default client options. Does not support rediss (redis over ssl scheme) for now.- Parameters:
connectionString- a string URI following the scheme: redis://[username:password@][host][:port][/database]vertx- the vertx instance- Returns:
- the client
- See Also:
-
createClient
Create a new Redis client using the given client options.- Parameters:
vertx- the Vert.x instanceoptions- the user provided options- Returns:
- the client
-
createStandaloneClient
public static Redis createStandaloneClient(Vertx vertx, io.vertx.redis.client.RedisOptions options, Supplier<io.smallrye.mutiny.Uni<io.vertx.redis.client.RedisStandaloneConnectOptions>> connectOptions) Creates a new standalone Redis client. Theoptionsare used to obtainRedisOptions.getType(),RedisOptions.getNetClientOptions(),RedisOptions.getPoolOptions()andRedisOptions.getTracingPolicy(). TheconnectOptionsare queried for every connection attempt.If
options.getType() != RedisClientType.STANDALONE, an exception is thrown.- Parameters:
vertx- the Vert.x instanceoptions- the static optionsconnectOptions- supplier of the dynamic options- Returns:
- the standalone client
-
createReplicationClient
public static Redis createReplicationClient(Vertx vertx, io.vertx.redis.client.RedisOptions options, Supplier<io.smallrye.mutiny.Uni<io.vertx.redis.client.RedisReplicationConnectOptions>> connectOptions) Creates a new replication Redis client. Theoptionsare used to obtainRedisOptions.getType(),RedisOptions.getNetClientOptions(),RedisOptions.getPoolOptions()andRedisOptions.getTracingPolicy(). TheconnectOptionsare queried for every connection attempt.If
options.getType() != RedisClientType.REPLICATION, an exception is thrown.- Parameters:
vertx- the Vert.x instanceoptions- the static optionsconnectOptions- supplier of the dynamic options- Returns:
- the replication client
-
createSentinelClient
public static Redis createSentinelClient(Vertx vertx, io.vertx.redis.client.RedisOptions options, Supplier<io.smallrye.mutiny.Uni<io.vertx.redis.client.RedisSentinelConnectOptions>> connectOptions) Creates a new sentinel Redis client. Theoptionsare used to obtainRedisOptions.getType(),RedisOptions.getNetClientOptions(),RedisOptions.getPoolOptions()andRedisOptions.getTracingPolicy(). TheconnectOptionsare queried for every connection attempt.If
options.getType() != RedisClientType.SENTINEL, an exception is thrown.- Parameters:
vertx- the Vert.x instanceoptions- the static optionsconnectOptions- supplier of the dynamic options- Returns:
- the sentinel client
-
createClusterClient
public static Redis createClusterClient(Vertx vertx, io.vertx.redis.client.RedisOptions options, Supplier<io.smallrye.mutiny.Uni<io.vertx.redis.client.RedisClusterConnectOptions>> connectOptions) Creates a new cluster Redis client. Theoptionsare used to obtainRedisOptions.getType(),RedisOptions.getNetClientOptions(),RedisOptions.getPoolOptions()andRedisOptions.getTracingPolicy(). TheconnectOptionsare queried for every connection attempt.If
options.getType() != RedisClientType.CLUSTER, an exception is thrown.- Parameters:
vertx- the Vert.x instanceoptions- the static optionsconnectOptions- supplier of the dynamic options- Returns:
- the cluster client
-
newInstance
Creates a new instance of theRedis. -
hashCode
public int hashCode() -
equals
-
toString
-