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
    --- | ---
    `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.
    `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.
    `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 www.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

          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

    - #### 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.

    - #### 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.

Copyright © 2021 Eclipse. All rights reserved.