Class RedisConnection
- All Implemented Interfaces:
io.vertx.mutiny.core.streams.ReadStream<Response>,io.vertx.mutiny.core.streams.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) booleanexceptionHandler(Consumer<Throwable> handler) fetch(long amount) io.vertx.redis.client.RedisConnectioninthashCode()static RedisConnectionnewInstance(io.vertx.redis.client.RedisConnection arg) pause()booleanio.vertx.mutiny.core.streams.Pipe<Response> pipe()io.smallrye.mutiny.Uni<Void> pipeToAndAwait(io.vertx.mutiny.core.streams.WriteStream<Response> dst) voidpipeToAndForget(io.vertx.mutiny.core.streams.WriteStream<Response> dst) 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:
getDelegatein interfaceio.vertx.mutiny.core.streams.ReadStream<Response>- Specified by:
getDelegatein interfaceio.vertx.mutiny.core.streams.StreamBase
-
toString
-
equals
-
hashCode
public int hashCode() -
pipe
- Specified by:
pipein interfaceio.vertx.mutiny.core.streams.ReadStream<Response>
-
pipeTo
@CheckReturnValue public io.smallrye.mutiny.Uni<Void> pipeTo(io.vertx.mutiny.core.streams.WriteStream<Response> dst) - Specified by:
pipeToin interfaceio.vertx.mutiny.core.streams.ReadStream<Response>
-
pipeToAndAwait
- Specified by:
pipeToAndAwaitin interfaceio.vertx.mutiny.core.streams.ReadStream<Response>
-
pipeToAndForget
- Specified by:
pipeToAndForgetin interfaceio.vertx.mutiny.core.streams.ReadStream<Response>
-
exceptionHandler
- Specified by:
exceptionHandlerin interfaceio.vertx.mutiny.core.streams.ReadStream<Response>- Specified by:
exceptionHandlerin interfaceio.vertx.mutiny.core.streams.StreamBase- Parameters:
handler-- Returns:
-
handler
- Specified by:
handlerin interfaceio.vertx.mutiny.core.streams.ReadStream<Response>- Parameters:
handler-- Returns:
-
pause
- Specified by:
pausein interfaceio.vertx.mutiny.core.streams.ReadStream<Response>- Returns:
- the instance of RedisConnection to chain method calls.
-
resume
- Specified by:
resumein interfaceio.vertx.mutiny.core.streams.ReadStream<Response>- Returns:
- the instance of RedisConnection to chain method calls.
-
fetch
- Specified by:
fetchin interfaceio.vertx.mutiny.core.streams.ReadStream<Response>- Parameters:
amount-- Returns:
- the instance of RedisConnection to chain method calls.
-
endHandler
- Specified by:
endHandlerin interfaceio.vertx.mutiny.core.streams.ReadStream<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
unifiring 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
unifiring 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
unifiring 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:
toMultiin interfaceio.vertx.mutiny.core.streams.ReadStream<Response>
-
toBlockingIterable
-
toBlockingStream
-
newInstance
-