public class RedisClusterConnection extends Object implements RedisConnection
| Modifier and Type | Method and Description |
|---|---|
static void |
addMasterOnlyCommand(Command command) |
static void |
addReducer(Command command,
Function<List<Response>,Response> fn) |
static void |
addUnSupportedCommand(Command command,
String error) |
RedisConnection |
batch(List<Request> requests,
Handler<AsyncResult<List<Response>>> handler)
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> handler)
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. |
RedisConnection |
send(Request request,
Handler<AsyncResult<Response>> handler)
Send the given command to the redis server or cluster.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpipe, pipeTo, pipeTopublic static void addMasterOnlyCommand(Command command)
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> handler)
RedisConnectionendHandler in interface ReadStream<Response>endHandler in interface RedisConnectionpublic RedisConnection send(Request request, Handler<AsyncResult<Response>> handler)
RedisConnectionsend in interface RedisConnectionrequest - the command to sendhandler - the asynchronous result handler.public RedisConnection batch(List<Request> requests, Handler<AsyncResult<List<Response>>> handler)
RedisConnectionbatch in interface RedisConnectionrequests - list of command to sendhandler - the asynchronous result handler.public void close()
RedisConnectionclose in interface RedisConnectionpublic boolean pendingQueueFull()
RedisConnectionpendingQueueFull in interface RedisConnectionCopyright © 2020. All rights reserved.