public interface RedisConnection extends ReadStream<Response>
| Modifier and Type | Method and Description |
|---|---|
Future<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.
|
default 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.
|
void |
close()
Closes the connection or returns to the pool.
|
RedisConnection |
endHandler(Handler<Void> endHandler)
Set an end handler.
|
RedisConnection |
exceptionHandler(Handler<Throwable> handler)
Set an exception handler on the read stream.
|
RedisConnection |
fetch(long amount)
Fetch the specified
amount of elements. |
RedisConnection |
handler(Handler<Response> handler)
Set a data handler.
|
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.
|
RedisConnection |
resume()
Resume reading, and sets the buffer in
flowing mode. |
Future<Response> |
send(Request command)
Send the given command to the redis server or cluster.
|
default RedisConnection |
send(Request command,
Handler<AsyncResult<Response>> onSend)
Send the given command to the redis server or cluster.
|
pipe, pipeTo, pipeToRedisConnection exceptionHandler(Handler<Throwable> handler)
exceptionHandler in interface ReadStream<Response>exceptionHandler in interface StreamBasehandler - the exception handlerRedisConnection handler(Handler<Response> handler)
handler in interface ReadStream<Response>RedisConnection 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>RedisConnection resume()
flowing mode.
If the ReadStream has been paused, reading will recommence on it.resume in interface ReadStream<Response>RedisConnection 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>RedisConnection endHandler(Handler<Void> endHandler)
endHandler in interface ReadStream<Response>default RedisConnection send(Request command, Handler<AsyncResult<Response>> onSend)
command - the command to sendonSend - the asynchronous result handler.Future<Response> send(Request command)
command - the command to senddefault RedisConnection batch(List<Request> commands, Handler<AsyncResult<List<Response>>> onSend)
commands - list of command to sendonSend - the asynchronous result handler.Future<List<Response>> batch(List<Request> commands)
commands - list of command to sendvoid close()
boolean pendingQueueFull()
Copyright © 2021 Eclipse. All rights reserved.