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 the original non Mutiny-ified interface using Vert.x codegen.

  • Field Details

    • __TYPE_ARG

      public static final io.smallrye.mutiny.vertx.TypeArg<RedisConnection> __TYPE_ARG
  • Constructor Details

    • RedisConnection

      public RedisConnection(io.vertx.redis.client.RedisConnection delegate)
    • RedisConnection

      public RedisConnection(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.redis.client.RedisConnection getDelegate()
      Specified by:
      getDelegate in interface io.vertx.mutiny.core.streams.ReadStream<Response>
      Specified by:
      getDelegate in interface io.vertx.mutiny.core.streams.StreamBase
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • pipe

      public io.vertx.mutiny.core.streams.Pipe<Response> pipe()
      Specified by:
      pipe in interface io.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:
      pipeTo in interface io.vertx.mutiny.core.streams.ReadStream<Response>
    • pipeToAndAwait

      public Void pipeToAndAwait(io.vertx.mutiny.core.streams.WriteStream<Response> dst)
      Specified by:
      pipeToAndAwait in interface io.vertx.mutiny.core.streams.ReadStream<Response>
    • pipeToAndForget

      public void pipeToAndForget(io.vertx.mutiny.core.streams.WriteStream<Response> dst)
      Specified by:
      pipeToAndForget in interface io.vertx.mutiny.core.streams.ReadStream<Response>
    • exceptionHandler

      public RedisConnection exceptionHandler(Consumer<Throwable> handler)
      Specified by:
      exceptionHandler in interface io.vertx.mutiny.core.streams.ReadStream<Response>
      Specified by:
      exceptionHandler in interface io.vertx.mutiny.core.streams.StreamBase
      Parameters:
      handler -
      Returns:
    • handler

      public RedisConnection handler(Consumer<Response> handler)
      Specified by:
      handler in interface io.vertx.mutiny.core.streams.ReadStream<Response>
      Parameters:
      handler -
      Returns:
    • pause

      public RedisConnection pause()
      Specified by:
      pause in interface io.vertx.mutiny.core.streams.ReadStream<Response>
      Returns:
      the instance of RedisConnection to chain method calls.
    • resume

      public RedisConnection resume()
      Specified by:
      resume in interface io.vertx.mutiny.core.streams.ReadStream<Response>
      Returns:
      the instance of RedisConnection to chain method calls.
    • fetch

      public RedisConnection fetch(long amount)
      Specified by:
      fetch in interface io.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:
      endHandler in interface io.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 uni firing the result of the operation when completed, or a failure if the operation failed.
    • sendAndAwait

      public Response sendAndAwait(Request command)
      Blocking variant of send(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 of send(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 from send(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 uni firing the result of the operation when completed, or a failure if the operation failed.
    • batchAndAwait

      public List<Response> batchAndAwait(List<Request> commands)
      Blocking variant of batch(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 of batch(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 from batch(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 uni firing the result of the operation when completed, or a failure if the operation failed.
    • closeAndAwait

      public Void closeAndAwait()
      Blocking variant of close().

      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 of close() 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 from close() 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:
      toMulti in interface io.vertx.mutiny.core.streams.ReadStream<Response>
    • toBlockingIterable

      public Iterable<Response> toBlockingIterable()
    • toBlockingStream

      public Stream<Response> toBlockingStream()
    • newInstance

      public static RedisConnection newInstance(io.vertx.redis.client.RedisConnection arg)