Class Redis
- All Implemented Interfaces:
MutinyDelegate
original
non Mutiny-ified interface using Vert.x codegen.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSends a list of commands in a single IO operation, this prevents any inter twinning to happen from other client users.batchAndAwait
(List<Request> commands) Blocking variant ofbatch(List)
.batchAndForget
(List<Request> commands) Variant ofbatch(List)
that ignores the result of the operation.void
close()
io.smallrye.mutiny.Uni<RedisConnection>
connect()
Connects to the redis server.Blocking variant ofconnect()
.Variant ofconnect()
that ignores the result of the operation.static Redis
createClient
(Vertx vertx) static Redis
createClient
(Vertx vertx, io.vertx.redis.client.RedisOptions options) static Redis
createClient
(Vertx vertx, String connectionString) boolean
io.vertx.redis.client.Redis
int
hashCode()
static Redis
newInstance
(io.vertx.redis.client.Redis arg) io.smallrye.mutiny.Uni<Response>
Send the given command to the redis server or cluster.sendAndAwait
(Request command) Blocking variant ofsend(io.vertx.mutiny.redis.client.Request)
.sendAndForget
(Request command) Variant ofsend(io.vertx.mutiny.redis.client.Request)
that ignores the result of the operation.toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
Redis
public Redis(io.vertx.redis.client.Redis delegate) -
Redis
-
-
Method Details
-
getDelegate
public io.vertx.redis.client.Redis getDelegate()- Specified by:
getDelegate
in interfaceMutinyDelegate
- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
createClient
- Parameters:
vertx
- the vertx instance- Returns:
- the client
-
createClient
- Parameters:
vertx
- the vertx instanceconnectionString
- a string URI following the scheme: redis://[username:password@][host][:port][/database]- Returns:
- the client
-
createClient
- Parameters:
vertx
- the vertx instanceoptions
- the user provided options- Returns:
- the client
-
connect
Connects to the redis server.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
connectAndAwait
Blocking variant ofconnect()
.This method waits 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 a RuntimeException).
- Returns:
- the RedisConnection instance produced by the operation.
-
connectAndForget
Variant ofconnect()
that ignores the result of the operation.This method subscribes on the result of
connect()
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromconnect()
but you don't need to compose it with other operations.- Returns:
- the instance of Redis to chain method calls.
-
close
public void close() -
send
Send the given command to the redis server or cluster.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
command
- the command to send- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
sendAndAwait
Blocking variant ofsend(io.vertx.mutiny.redis.client.Request)
.This method waits 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 a RuntimeException).
- Parameters:
command
- the command to send- Returns:
- the Response instance produced by the operation.
-
sendAndForget
Variant ofsend(io.vertx.mutiny.redis.client.Request)
that ignores the result of the operation.This method subscribes on the result of
send(io.vertx.mutiny.redis.client.Request)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromsend(io.vertx.mutiny.redis.client.Request)
but you don't need to compose it with other operations.- Parameters:
command
- the command to send- Returns:
- the instance of Redis to chain method calls.
-
batch
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
. Don't forget to subscribe on it to trigger the operation.- Parameters:
commands
- list of command to send- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
batchAndAwait
Blocking variant ofbatch(List)
.This method waits 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 a RuntimeException).
- Parameters:
commands
- list of command to send- Returns:
- the List
instance produced by the operation.
-
batchAndForget
Variant ofbatch(List)
that ignores the result of the operation.This method subscribes on the result of
batch(List)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation frombatch(List)
but you don't need to compose it with other operations.- Parameters:
commands
- list of command to send- Returns:
- the instance of Redis to chain method calls.
-
newInstance
-