io.vertx.redis.client

## Interface Redis

-     public interface Redis

  A simple Redis client.

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `Future<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.
    `default Redis` | `batch(List<Request> commands, Handler<AsyncResult<List<Response>>> onSend)` Sends a list of commands in a single IO operation, this prevents any inter twinning to happen from other client users.
    `void` | `close()` Closes the client and terminates any connection.
    `Future<RedisConnection>` | `connect()` Connects to the redis server.
    `default Redis` | `connect(Handler<AsyncResult<RedisConnection>> handler)` Connects to the redis server.
    `static Redis` | `createClient(Vertx vertx)` Create a new redis client using the default client options.
    `static Redis` | `createClient(Vertx vertx, RedisOptions options)` Create a new redis client using the given client options.
    `static Redis` | `createClient(Vertx vertx, String connectionString)` Create a new redis client using the default client options.
    `Future<Response>` | `send(Request command)` Send the given command to the redis server or cluster.
    `default Redis` | `send(Request command, Handler<AsyncResult<Response>> onSend)` Send the given command to the redis server or cluster.

- - ### Method Detail

    - #### createClient

          static Redis createClient(Vertx vertx)

      Create a new redis client using the default client options.
      Parameters:
        `vertx` - the vertx instance
      Returns:
        the client

    - #### createClient

          static Redis createClient(Vertx vertx,
                                    String connectionString)

      Create a new redis client using the default client options. Does not support rediss (redis over ssl scheme) for now.
      Parameters:
        `connectionString` - a string URI following the scheme: redis://[username:password@][host][:port][/database]
        `vertx` - the vertx instance
      Returns:
        the client
      See Also:
        Redis scheme on iana.org

    - #### createClient

          static Redis createClient(Vertx vertx,
                                    RedisOptions options)

      Create a new redis client using the given client options.
      Parameters:
        `vertx` - the vertx instance
        `options` - the user provided options
      Returns:
        the client

    - #### connect

          default Redis connect(Handler<AsyncResult<RedisConnection>> handler)

      Connects to the redis server.
      Parameters:
        `handler` - the async result handler
      Returns:
        a reference to this, so the API can be used fluently

    - #### connect

          Future<RedisConnection> connect()

      Connects to the redis server.
      Returns:
        a future with the result of the operation

    - #### close

          void close()

      Closes the client and terminates any connection.

    - #### send

          default Redis send(Request command,
                             Handler<AsyncResult<Response>> onSend)

      Send the given command to the redis server or cluster.
      Parameters:
        `command` - the command to send
        `onSend` - the asynchronous result handler.
      Returns:
        fluent self.

    - #### send

          Future<Response> send(Request command)

      Send the given command to the redis server or cluster.
      Parameters:
        `command` - the command to send
      Returns:
        a future with the result of the operation

    - #### batch

          default Redis batch(List<Request> commands,
                              Handler<AsyncResult<List<Response>>> onSend)

      Sends a list of commands in a single IO operation, this prevents any inter twinning to happen from other client users.
      Parameters:
        `commands` - list of command to send
        `onSend` - the asynchronous result handler.
      Returns:
        fluent self.

    - #### batch

          Future<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.
      Parameters:
        `commands` - list of command to send
      Returns:
        a future with the result of the operation

Copyright © 2024 Eclipse. All rights reserved.