public class RedisConnection 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<RedisConnection> |
__TYPE_ARG |
Constructor and Description |
---|
RedisConnection(Object delegate) |
RedisConnection(RedisConnection delegate) |
Modifier and Type | Method and Description |
---|---|
Single<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.
|
Completable |
close()
Closes the connection or returns to the pool.
|
RedisConnection |
endHandler(Handler<Void> endHandler)
Set an end handler.
|
boolean |
equals(Object o) |
RedisConnection |
exceptionHandler(Handler<Throwable> handler)
Set an exception handler on the read stream.
|
RedisConnection |
fetch(long amount)
Fetch the specified
amount of elements. |
RedisConnection |
getDelegate() |
RedisConnection |
handler(Handler<Response> handler)
Set a data handler.
|
int |
hashCode() |
static RedisConnection |
newInstance(RedisConnection arg) |
RedisConnection |
pause()
Pause the
ReadStream , it sets the buffer in fetch mode and clears the actual demand. |
boolean |
pendingQueueFull()
Flag to notify if the pending message queue (commands in transit) is full.
|
Pipe<Response> |
pipe()
Pause this stream and return a to transfer the elements of this stream to a destination .
|
Completable |
pipeTo(WriteStream<Response> dst)
Pipe this
ReadStream to the WriteStream . |
RedisConnection |
resume()
Resume reading, and sets the buffer in
flowing mode. |
Single<List<Response>> |
rxBatch(List<Request> commands)
Sends a list of commands in a single IO operation, this prevents any inter twinning to happen from other
client users.
|
Completable |
rxClose()
Closes the connection or returns to the pool.
|
Completable |
rxPipeTo(WriteStream<Response> dst)
Pipe this
ReadStream to the WriteStream . |
Maybe<Response> |
rxSend(Request command)
Send the given command to the redis server or cluster.
|
Maybe<Response> |
send(Request command)
Send the given command to the redis server or cluster.
|
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<RedisConnection> __TYPE_ARG
public RedisConnection(RedisConnection delegate)
public RedisConnection(Object delegate)
public RedisConnection 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 Completable pipeTo(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.
pipeTo
in interface ReadStream<Response>
dst
- the destination write streampublic 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.
rxPipeTo
in interface ReadStream<Response>
dst
- the destination write streampublic RedisConnection exceptionHandler(Handler<Throwable> handler)
ReadStream
exceptionHandler
in interface ReadStream<Response>
exceptionHandler
in interface StreamBase
handler
- public RedisConnection handler(Handler<Response> handler)
ReadStream
handler
in interface ReadStream<Response>
handler
- public RedisConnection pause()
ReadStream
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 RedisConnection resume()
ReadStream
flowing
mode.
If the ReadStream
has been paused, reading will recommence on it.resume
in interface ReadStream<Response>
public RedisConnection fetch(long amount)
ReadStream
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 RedisConnection endHandler(Handler<Void> endHandler)
ReadStream
endHandler
in interface ReadStream<Response>
endHandler
- public Maybe<Response> send(Request command)
command
- the command to sendpublic Maybe<Response> rxSend(Request command)
command
- the command to sendpublic Single<List<Response>> batch(List<Request> commands)
commands
- list of command to sendpublic Single<List<Response>> rxBatch(List<Request> commands)
commands
- list of command to sendpublic Completable close()
public Completable rxClose()
public boolean pendingQueueFull()
public static RedisConnection newInstance(RedisConnection arg)
Copyright © 2024 Eclipse. All rights reserved.