public class Redis extends Object implements ReadStream<Response>
original non RX-ified interface using Vert.x codegen.| Modifier and Type | Field and Description |
|---|---|
static io.vertx.lang.rx.TypeArg<Redis> |
__TYPE_ARG |
| Modifier and Type | Method and Description |
|---|---|
Redis |
batch(List<Request> commands,
Handler<AsyncResult<List<Response>>> handler) |
Observable<List<Response>> |
batchObservable(List<Request> commands)
Deprecated.
|
void |
close() |
Redis |
connect(Handler<AsyncResult<Redis>> handler)
Connects to the redis server.
|
Observable<Redis> |
connectObservable()
Deprecated.
use
rxConnect() instead |
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.rxjava.core.streams.WriteStream<T>) but with no completion handler. |
void |
pipeTo(WriteStream<Response> dst,
Handler<AsyncResult<Void>> handler)
Pipe this
ReadStream to the WriteStream. |
Observable<Void> |
pipeToObservable(WriteStream<Response> dst)
Deprecated.
|
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.
|
Single<Void> |
rxPipeTo(WriteStream<Response> dst)
Pipe this
ReadStream to the WriteStream. |
Single<Response> |
rxSend(Request command) |
Redis |
send(Request command,
Handler<AsyncResult<Response>> onSend) |
Observable<Response> |
sendObservable(Request command)
Deprecated.
|
SocketAddress |
socketAddress()
Returns the address associated with this client.
|
Observable<Response> |
toObservable() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitnewInstance, newInstancenewInstancepublic static final io.vertx.lang.rx.TypeArg<Redis> __TYPE_ARG
public Redis(Redis delegate)
public Redis getDelegate()
getDelegate in interface ReadStream<Response>getDelegate in interface StreamBasepublic Observable<Response> toObservable()
toObservable in interface ReadStream<Response>public Pipe<Response> pipe()
WriteStream.pipe in interface ReadStream<Response>public void pipeTo(WriteStream<Response> dst)
ReadStream.pipeTo(io.vertx.rxjava.core.streams.WriteStream<T>) but with no completion handler.pipeTo in interface ReadStream<Response>dst - public void pipeTo(WriteStream<Response> dst, Handler<AsyncResult<Void>> handler)
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.
pipeTo in interface ReadStream<Response>dst - the destination write streamhandler - @Deprecated public Observable<Void> pipeToObservable(WriteStream<Response> dst)
rxPipeTo(io.vertx.rxjava.core.streams.WriteStream<io.vertx.rxjava.redis.client.Response>) insteadReadStream 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.
dst - the destination write streampublic Single<Void> rxPipeTo(WriteStream<Response> dst)
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.
dst - the destination write streampublic static Redis createClient(Vertx vertx, SocketAddress address)
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".vertx - address - public static Redis createClient(Vertx vertx, RedisOptions options)
onConnect will get the Redis instance.vertx - options - public Redis connect(Handler<AsyncResult<Redis>> handler)
handler - the async result handler@Deprecated public Observable<Redis> connectObservable()
rxConnect() insteadpublic Single<Redis> rxConnect()
public Redis exceptionHandler(Handler<Throwable> handler)
exceptionHandler in interface ReadStream<Response>exceptionHandler in interface StreamBasehandler - the exception handlerpublic Redis handler(Handler<Response> handler)
handler in interface ReadStream<Response>handler - public Redis pause()
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.
pause in interface ReadStream<Response>public Redis resume()
flowing mode.
If the ReadStream has been paused, reading will recommence on it.resume in interface ReadStream<Response>public Redis fetch(long amount)
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.fetch in interface ReadStream<Response>amount - public Redis endHandler(Handler<Void> endHandler)
endHandler in interface ReadStream<Response>endHandler - public Redis send(Request command, Handler<AsyncResult<Response>> onSend)
@Deprecated public Observable<Response> sendObservable(Request command)
@Deprecated public Observable<List<Response>> batchObservable(List<Request> commands)
public SocketAddress socketAddress()
public void close()
Copyright © 2019 Eclipse. All rights reserved.