io.vertx.reactivex.redis.client

## Class Redis

- java.lang.Object
- - io.vertx.reactivex.redis.client.Redis

- All Implemented Interfaces:
    ReadStream<Response>, StreamBase

      public class Redis
      extends Object
      implements ReadStream<Response>

  A simple Redis client.

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static io.vertx.lang.rx.TypeArg<Redis>` | `__TYPE_ARG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Redis(Redis delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Redis` | `batch(List<Request> commands, Handler<AsyncResult<List<Response>>> handler)`
    `void` | `close()`
    `Redis` | `connect(Handler<AsyncResult<Redis>> handler)` Connects to the redis server.
    `static Redis` | `createClient(Vertx vertx, RedisOptions options)` Connect to redis, the `onConnect` will get the `Redis` instance.
    `static Redis` | `createClient(Vertx vertx, SocketAddress address)` Connect to redis, the `onConnect` will get the `Redis` instance.
    `Redis` | `endHandler(Handler<Void> endHandler)` Set an end handler.
    `boolean` | `equals(Object o)`
    `Redis` | `exceptionHandler(Handler<Throwable> handler)` Set an exception handler on the read stream.
    `Redis` | `fetch(long amount)` Fetch the specified `amount` of elements.
    `Redis` | `getDelegate()`
    `Redis` | `handler(Handler<Response> handler)` Set a data handler.
    `int` | `hashCode()`
    `static Redis` | `newInstance(Redis arg)`
    `Redis` | `pause()` Pause the `ReadStream`, it sets the buffer in `fetch` mode and clears the actual demand.
    `Pipe<Response>` | `pipe()` Pause this stream and return a to transfer the elements of this stream to a destination .
    `void` | `pipeTo(WriteStream<Response> dst)` Like `ReadStream.pipeTo(io.vertx.reactivex.core.streams.WriteStream<T>)` but with no completion handler.
    `void` | `pipeTo(WriteStream<Response> dst, Handler<AsyncResult<Void>> handler)` Pipe this `ReadStream` to the `WriteStream`.
    `Redis` | `resume()` Resume reading, and sets the buffer in `flowing` mode.
    `Single<List<Response>>` | `rxBatch(List<Request> commands)`
    `Single<Redis>` | `rxConnect()` Connects to the redis server.
    `Completable` | `rxPipeTo(WriteStream<Response> dst)` Pipe this `ReadStream` to the `WriteStream`.
    `Maybe<Response>` | `rxSend(Request command)`
    `Redis` | `send(Request command, Handler<AsyncResult<Response>> onSend)`
    `SocketAddress` | `socketAddress()` Returns the address associated with this client.
    `Flowable<Response>` | `toFlowable()`
    `Observable<Response>` | `toObservable()`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface io.vertx.reactivex.core.streams.ReadStream

      `newInstance, newInstance`

    - ### Methods inherited from interface io.vertx.reactivex.core.streams.StreamBase

      `newInstance`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<Redis> __TYPE_ARG

  - ### Constructor Detail

    - #### Redis

          public Redis(Redis delegate)

  - ### Method Detail

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

    - #### getDelegate

          public Redis getDelegate()

      Specified by:
        `getDelegate` in interface `ReadStream<Response>`
      Specified by:
        `getDelegate` in interface `StreamBase`

    - #### toObservable

          public Observable<Response> toObservable()

      Specified by:
        `toObservable` in interface `ReadStream<Response>`

    - #### toFlowable

          public Flowable<Response> toFlowable()

      Specified by:
        `toFlowable` in interface `ReadStream<Response>`

    - #### pipe

          public Pipe<Response> pipe()

      Pause this stream and return a to transfer the elements of this stream to a destination .

      The stream will be resumed when the pipe will be wired to a `WriteStream`.
      Specified by:
        `pipe` in interface `ReadStream<Response>`
      Returns:
        a pipe

    - #### pipeTo

          public void pipeTo(WriteStream<Response> dst)

      Like `ReadStream.pipeTo(io.vertx.reactivex.core.streams.WriteStream<T>)` but with no completion handler.
      Specified by:
        `pipeTo` in interface `ReadStream<Response>`
      Parameters:
        `dst` -

    - #### pipeTo

          public void pipeTo(WriteStream<Response> dst,
                             Handler<AsyncResult<Void>> handler)

      Pipe this `ReadStream` to the `WriteStream`.

      Elements emitted by this stream will be written to the write stream until this stream ends or fails.

      Once this stream has ended or failed, the write stream will be ended and the `handler` will be called with the result.

      Specified by:
        `pipeTo` in interface `ReadStream<Response>`
      Parameters:
        `dst` - the destination write stream
        `handler` -

    - #### rxPipeTo

          public Completable rxPipeTo(WriteStream<Response> dst)

      Pipe this `ReadStream` to the `WriteStream`.

      Elements emitted by this stream will be written to the write stream until this stream ends or fails.

      Once this stream has ended or failed, the write stream will be ended and the `handler` will be called with the result.

      Parameters:
        `dst` - the destination write stream
      Returns:

    - #### createClient

          public static Redis createClient(Vertx vertx,
                                           SocketAddress address)

      Connect to redis, the `onConnect` will get the `Redis` instance. This connection will use the default options which are connect to a standalone server on the default port on "localhost".
      Parameters:
        `vertx` -
        `address` -
      Returns:

    - #### createClient

          public static Redis createClient(Vertx vertx,
                                           RedisOptions options)

      Connect to redis, the `onConnect` will get the `Redis` instance.
      Parameters:
        `vertx` -
        `options` -
      Returns:

    - #### connect

          public Redis connect(Handler<AsyncResult<Redis>> handler)

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

    - #### rxConnect

          public Single<Redis> rxConnect()

      Connects to the redis server.
      Returns:
        a reference to this, so the API can be used fluently

    - #### exceptionHandler

          public Redis exceptionHandler(Handler<Throwable> handler)

      Set an exception handler on the read stream.
      Specified by:
        `exceptionHandler` in interface `ReadStream<Response>`
      Specified by:
        `exceptionHandler` in interface `StreamBase`
      Parameters:
        `handler` - the exception handler
      Returns:
        a reference to this, so the API can be used fluently

    - #### handler

          public Redis handler(Handler<Response> handler)

      Set a data handler. As data is read, the handler will be called with the data.
      Specified by:
        `handler` in interface `ReadStream<Response>`
      Parameters:
        `handler` -
      Returns:
        a reference to this, so the API can be used fluently

    - #### pause

          public Redis pause()

      Pause the `ReadStream`, it sets the buffer in `fetch` mode and clears the actual demand.

      While it's paused, no data will be sent to the data `handler`.

      Specified by:
        `pause` in interface `ReadStream<Response>`
      Returns:
        a reference to this, so the API can be used fluently

    - #### resume

          public Redis resume()

      Resume reading, and sets the buffer in `flowing` mode.

      If the `ReadStream` has been paused, reading will recommence on it.
      Specified by:
        `resume` in interface `ReadStream<Response>`
      Returns:
        a reference to this, so the API can be used fluently

    - #### fetch

          public Redis fetch(long amount)

      Fetch the specified `amount` of elements. If the `ReadStream` has been paused, reading will recommence with the specified `amount` of items, otherwise the specified `amount` will be added to the current stream demand.
      Specified by:
        `fetch` in interface `ReadStream<Response>`
      Parameters:
        `amount` -
      Returns:
        a reference to this, so the API can be used fluently

    - #### endHandler

          public Redis endHandler(Handler<Void> endHandler)

      Set an end handler. Once the stream has ended, and there is no more data to be read, this handler will be called.
      Specified by:
        `endHandler` in interface `ReadStream<Response>`
      Parameters:
        `endHandler` -
      Returns:
        a reference to this, so the API can be used fluently

    - #### send

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

    - #### rxSend

          public Maybe<Response> rxSend(Request command)

    - #### batch

          public Redis batch(List<Request> commands,
                             Handler<AsyncResult<List<Response>>> handler)

    - #### rxBatch

          public Single<List<Response>> rxBatch(List<Request> commands)

    - #### socketAddress

          public SocketAddress socketAddress()

      Returns the address associated with this client.
      Returns:
        the address.

    - #### close

          public void close()

    - #### newInstance

          public static Redis newInstance(Redis arg)

Copyright © 2019 Eclipse. All rights reserved.