Class RedisConnection
- java.lang.Object
-
- io.vertx.mutiny.redis.client.RedisConnection
-
- All Implemented Interfaces:
io.vertx.mutiny.core.streams.ReadStream<Response>,io.vertx.mutiny.core.streams.StreamBase
public class RedisConnection extends Object implements io.vertx.mutiny.core.streams.ReadStream<Response>
A simple Redis client. NOTE: This class has been automatically generated from theoriginalnon Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static io.smallrye.mutiny.vertx.TypeArg<RedisConnection>__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description RedisConnection(io.vertx.redis.client.RedisConnection delegate)RedisConnection(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description io.smallrye.mutiny.Uni<List<Response>>batch(List<Request> commands)Sends a list of commands in a single IO operation, this prevents any inter twinning to happen from other client users.List<Response>batchAndAwait(List<Request> commands)Blocking variant ofbatch(List).RedisConnectionbatchAndForget(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.VoidcloseAndAwait()Blocking variant ofclose().RedisConnectioncloseAndForget()Variant ofclose()that ignores the result of the operation.RedisConnectionendHandler(Runnable endHandler)booleanequals(Object o)RedisConnectionexceptionHandler(Consumer<Throwable> handler)RedisConnectionfetch(long amount)io.vertx.redis.client.RedisConnectiongetDelegate()RedisConnectionhandler(Consumer<Response> handler)inthashCode()static RedisConnectionnewInstance(io.vertx.redis.client.RedisConnection arg)RedisConnectionpause()booleanpendingQueueFull()io.vertx.mutiny.core.streams.Pipe<Response>pipe()io.smallrye.mutiny.Uni<Void>pipeTo(io.vertx.mutiny.core.streams.WriteStream<Response> dst)VoidpipeToAndAwait(io.vertx.mutiny.core.streams.WriteStream<Response> dst)voidpipeToAndForget(io.vertx.mutiny.core.streams.WriteStream<Response> dst)RedisConnectionresume()io.smallrye.mutiny.Uni<Response>send(Request command)Send the given command to the redis server or cluster.ResponsesendAndAwait(Request command)Blocking variant ofsend(io.vertx.mutiny.redis.client.Request).RedisConnectionsendAndForget(Request command)Variant ofsend(io.vertx.mutiny.redis.client.Request)that ignores the result of the operation.Iterable<Response>toBlockingIterable()Stream<Response>toBlockingStream()io.smallrye.mutiny.Multi<Response>toMulti()StringtoString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final io.smallrye.mutiny.vertx.TypeArg<RedisConnection> __TYPE_ARG
-
-
Constructor Detail
-
RedisConnection
public RedisConnection(io.vertx.redis.client.RedisConnection delegate)
-
RedisConnection
public RedisConnection(Object delegate)
-
-
Method Detail
-
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
-
pipe
public io.vertx.mutiny.core.streams.Pipe<Response> 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
public Void pipeToAndAwait(io.vertx.mutiny.core.streams.WriteStream<Response> dst)
- Specified by:
pipeToAndAwaitin interfaceio.vertx.mutiny.core.streams.ReadStream<Response>
-
pipeToAndForget
public void pipeToAndForget(io.vertx.mutiny.core.streams.WriteStream<Response> dst)
- Specified by:
pipeToAndForgetin interfaceio.vertx.mutiny.core.streams.ReadStream<Response>
-
exceptionHandler
public RedisConnection exceptionHandler(Consumer<Throwable> handler)
- Specified by:
exceptionHandlerin interfaceio.vertx.mutiny.core.streams.ReadStream<Response>- Specified by:
exceptionHandlerin interfaceio.vertx.mutiny.core.streams.StreamBase- Parameters:
handler-- Returns:
-
handler
public RedisConnection handler(Consumer<Response> handler)
- Specified by:
handlerin interfaceio.vertx.mutiny.core.streams.ReadStream<Response>- Parameters:
handler-- Returns:
-
pause
public RedisConnection pause()
- Specified by:
pausein interfaceio.vertx.mutiny.core.streams.ReadStream<Response>- Returns:
- the instance of RedisConnection to chain method calls.
-
resume
public RedisConnection resume()
- Specified by:
resumein interfaceio.vertx.mutiny.core.streams.ReadStream<Response>- Returns:
- the instance of RedisConnection to chain method calls.
-
fetch
public RedisConnection fetch(long amount)
- Specified by:
fetchin interfaceio.vertx.mutiny.core.streams.ReadStream<Response>- Parameters:
amount-- Returns:
- the instance of RedisConnection to chain method calls.
-
endHandler
public RedisConnection endHandler(Runnable endHandler)
- Specified by:
endHandlerin interfaceio.vertx.mutiny.core.streams.ReadStream<Response>- Parameters:
endHandler-- Returns:
-
send
@CheckReturnValue public io.smallrye.mutiny.Uni<Response> send(Request command)
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
public Response sendAndAwait(Request command)
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
public RedisConnection sendAndForget(Request command)
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
@CheckReturnValue public io.smallrye.mutiny.Uni<List<Response>> batch(List<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. 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
public List<Response> batchAndAwait(List<Request> commands)
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
public RedisConnection batchAndForget(List<Request> commands)
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
@CheckReturnValue public io.smallrye.mutiny.Uni<Void> 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
public Void 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
public RedisConnection 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
@CheckReturnValue public io.smallrye.mutiny.Multi<Response> toMulti()
- Specified by:
toMultiin interfaceio.vertx.mutiny.core.streams.ReadStream<Response>
-
newInstance
public static RedisConnection newInstance(io.vertx.redis.client.RedisConnection arg)
-
-