public class PooledRedisConnection extends Object implements RedisConnection
| Constructor and Description |
|---|
PooledRedisConnection(Lease<RedisConnection> lease) |
| Modifier and Type | Method and Description |
|---|---|
RedisConnection |
actual() |
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.
|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbatch, sendpipe, pipeTo, pipeTopublic PooledRedisConnection(Lease<RedisConnection> lease)
public RedisConnection actual()
public RedisConnection exceptionHandler(Handler<Throwable> handler)
RedisConnectionexceptionHandler in interface ReadStream<Response>exceptionHandler in interface StreamBaseexceptionHandler in interface RedisConnectionhandler - the exception handlerpublic RedisConnection handler(Handler<Response> handler)
RedisConnectionhandler in interface ReadStream<Response>handler in interface RedisConnectionpublic RedisConnection pause()
RedisConnectionReadStream, 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>pause in interface RedisConnectionpublic RedisConnection resume()
RedisConnectionflowing mode.
If the ReadStream has been paused, reading will recommence on it.resume in interface ReadStream<Response>resume in interface RedisConnectionpublic RedisConnection fetch(long amount)
RedisConnectionamount 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>fetch in interface RedisConnectionpublic RedisConnection endHandler(Handler<Void> endHandler)
RedisConnectionendHandler in interface ReadStream<Response>endHandler in interface RedisConnectionpublic Future<Response> send(Request command)
RedisConnectionsend in interface RedisConnectioncommand - the command to sendpublic Future<List<Response>> batch(List<Request> commands)
RedisConnectionbatch in interface RedisConnectioncommands - list of command to sendpublic void close()
RedisConnectionclose in interface RedisConnectionpublic boolean pendingQueueFull()
RedisConnectionpendingQueueFull in interface RedisConnectionCopyright © 2021. All rights reserved.