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 |
---|---|
RedisConnection |
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.
|
RedisConnection |
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.
|
RedisConnection |
close()
Closes the connection or returns to the pool.
|
RedisConnection |
close(Handler<AsyncResult<Void>> onClose)
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 .
|
void |
pipeTo(WriteStream<Response> dst)
Pipe this
ReadStream to the WriteStream . |
void |
pipeTo(WriteStream<Response> dst,
Handler<AsyncResult<Void>> handler)
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.
|
Single<Void> |
rxClose()
Closes the connection or returns to the pool.
|
Single<Void> |
rxPipeTo(WriteStream<Response> dst)
Pipe this
ReadStream to the WriteStream . |
Single<Response> |
rxSend(Request command)
Send the given command to the redis server or cluster.
|
RedisConnection |
send(Request command)
Send the given command to the redis server or cluster.
|
RedisConnection |
send(Request command,
Handler<AsyncResult<Response>> onSend)
Send the given command to the redis server or cluster.
|
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 Pipe<Response> pipe()
WriteStream
.pipe
in interface ReadStream<Response>
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 void 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 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.
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 RedisConnection send(Request command, Handler<AsyncResult<Response>> onSend)
command
- the command to sendonSend
- the asynchronous result handler.public RedisConnection send(Request command)
command
- the command to sendpublic Single<Response> rxSend(Request command)
command
- the command to sendpublic RedisConnection batch(List<Request> commands, Handler<AsyncResult<List<Response>>> onSend)
commands
- list of command to sendonSend
- the asynchronous result handler.public RedisConnection batch(List<Request> commands)
commands
- list of command to sendpublic Single<List<Response>> rxBatch(List<Request> commands)
commands
- list of command to sendpublic RedisConnection close(Handler<AsyncResult<Void>> onClose)
onClose
- public RedisConnection close()
public boolean pendingQueueFull()
public static RedisConnection newInstance(RedisConnection arg)
Copyright © 2022 Eclipse. All rights reserved.