Class 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 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:
        getDelegate in interface io.vertx.mutiny.core.streams.ReadStream<Response>
        Specified by:
        getDelegate in interface io.vertx.mutiny.core.streams.StreamBase
      • 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:
      • 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.
      • 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>
      • newInstance

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