Class RedisConnection
- All Implemented Interfaces:
MutinyDelegate
,ReadStream<Response>
,StreamBase
original
non Mutiny-ified interface using Vert.x codegen.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRedisConnection
(io.vertx.redis.client.RedisConnection delegate) RedisConnection
(Object delegate) -
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.io.smallrye.mutiny.Uni<Void>
close()
Closes the connection or returns to the pool.Blocking variant ofclose()
.Variant ofclose()
that ignores the result of the operation.endHandler
(Runnable endHandler) boolean
exceptionHandler
(Consumer<Throwable> handler) fetch
(long amount) io.vertx.redis.client.RedisConnection
int
hashCode()
static RedisConnection
newInstance
(io.vertx.redis.client.RedisConnection arg) pause()
boolean
pipe()
io.smallrye.mutiny.Uni<Void>
pipeTo
(WriteStream<Response> dst) Pipe thisReadStream
to theWriteStream
.Blocking variant ofReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream)
.void
Variant ofReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream)
that ignores the result of the operation.resume()
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.io.smallrye.mutiny.Multi<Response>
toMulti()
toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
RedisConnection
public RedisConnection(io.vertx.redis.client.RedisConnection delegate) -
RedisConnection
-
-
Method Details
-
getDelegate
public io.vertx.redis.client.RedisConnection getDelegate()- Specified by:
getDelegate
in interfaceMutinyDelegate
- Specified by:
getDelegate
in interfaceReadStream<Response>
- Specified by:
getDelegate
in interfaceStreamBase
- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
pipe
- Specified by:
pipe
in interfaceReadStream<Response>
- Returns:
- a pipe
-
pipeTo
Description copied from interface:ReadStream
Pipe thisReadStream
to theWriteStream
.Elements emitted by this stream will be written to the write stream until this stream ends or fails.
Once this stream has ended or failed, the write stream will be ended and the
handler
will be called with the result.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Specified by:
pipeTo
in interfaceReadStream<Response>
- Parameters:
dst
- the destination write stream- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
pipeToAndAwait
Description copied from interface:ReadStream
Blocking variant ofReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream)
.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).
- Specified by:
pipeToAndAwait
in interfaceReadStream<Response>
- Parameters:
dst
- the destination write stream- Returns:
- the Void instance produced by the operation.
-
pipeToAndForget
Description copied from interface:ReadStream
Variant ofReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream)
that ignores the result of the operation.This method subscribes on the result of
ReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream)
but you don't need to compose it with other operations.- Specified by:
pipeToAndForget
in interfaceReadStream<Response>
- Parameters:
dst
- the destination write stream
-
exceptionHandler
- Specified by:
exceptionHandler
in interfaceReadStream<Response>
- Specified by:
exceptionHandler
in interfaceStreamBase
- Parameters:
handler
-- Returns:
-
handler
- Specified by:
handler
in interfaceReadStream<Response>
- Parameters:
handler
-- Returns:
-
pause
- Specified by:
pause
in interfaceReadStream<Response>
- Returns:
- the instance of RedisConnection to chain method calls.
-
resume
- Specified by:
resume
in interfaceReadStream<Response>
- Returns:
- the instance of RedisConnection to chain method calls.
-
fetch
- Specified by:
fetch
in interfaceReadStream<Response>
- Parameters:
amount
-- Returns:
- the instance of RedisConnection to chain method calls.
-
endHandler
- Specified by:
endHandler
in interfaceReadStream<Response>
- Parameters:
endHandler
-- Returns:
-
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 RedisConnection 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 RedisConnection to chain method calls.
-
close
Closes the connection or returns to the pool.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.
-
closeAndAwait
Blocking variant ofclose()
.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 Void instance produced by the operation.
-
closeAndForget
Variant ofclose()
that ignores the result of the operation.This method subscribes on the result of
close()
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromclose()
but you don't need to compose it with other operations.- Returns:
- the instance of RedisConnection to chain method calls.
-
pendingQueueFull
public boolean pendingQueueFull()- Returns:
- true is queue is full.
-
toMulti
- Specified by:
toMulti
in interfaceReadStream<Response>
-
toBlockingIterable
-
toBlockingStream
-
newInstance
-