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) |
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() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
newInstance, newInstance
newInstance
public 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 StreamBase
public Observable<Response> toObservable()
toObservable
in interface ReadStream<Response>
public Flowable<Response> toFlowable()
toFlowable
in interface ReadStream<Response>
public Pipe<Response> pipe()
WriteStream
.pipe
in interface ReadStream<Response>
public void pipeTo(WriteStream<Response> dst)
ReadStream.pipeTo(io.vertx.reactivex.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
- public Completable 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 handlerpublic Single<Redis> rxConnect()
public Redis exceptionHandler(Handler<Throwable> handler)
exceptionHandler
in interface ReadStream<Response>
exceptionHandler
in interface StreamBase
handler
- 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)
public SocketAddress socketAddress()
public void close()
Copyright © 2019 Eclipse. All rights reserved.