public class RedisStandaloneConnection extends Object implements RedisConnection, ParserHandler
| Constructor and Description |
|---|
RedisStandaloneConnection(Vertx vertx,
ContextInternal context,
ConnectionListener<RedisConnection> connectionListener,
NetSocket netSocket,
RedisOptions options) |
| 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.
|
void |
close()
Closes the connection or returns to the pool.
|
void |
end(Void v) |
RedisConnection |
endHandler(Handler<Void> handler)
Set an end handler.
|
RedisConnection |
exceptionHandler(Handler<Throwable> handler)
Set an exception handler on the read stream.
|
void |
fail(Throwable t) |
void |
fatal(Throwable t) |
RedisConnection |
fetch(long size)
Fetch the specified
amount of elements. |
void |
handle(Response reply) |
RedisConnection |
handler(Handler<Response> handler)
Set a data handler.
|
boolean |
isValid() |
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 request)
Send the given command to the redis server or cluster.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbatch, sendpipe, pipeTo, pipeTopublic RedisStandaloneConnection(Vertx vertx, ContextInternal context, ConnectionListener<RedisConnection> connectionListener, NetSocket netSocket, RedisOptions options)
public boolean isValid()
public void close()
RedisConnectionclose in interface RedisConnectionpublic boolean pendingQueueFull()
RedisConnectionpendingQueueFull in interface RedisConnectionpublic RedisConnection exceptionHandler(Handler<Throwable> handler)
RedisConnectionexceptionHandler in interface ReadStream<Response>exceptionHandler in interface StreamBaseexceptionHandler in interface RedisConnectionhandler - the exception handlerpublic RedisConnection endHandler(Handler<Void> handler)
RedisConnectionendHandler in interface ReadStream<Response>endHandler in interface RedisConnectionpublic 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 size)
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 Future<Response> send(Request request)
RedisConnectionsend in interface RedisConnectionrequest - the command to sendpublic Future<List<Response>> batch(List<Request> commands)
RedisConnectionbatch in interface RedisConnectioncommands - list of command to sendpublic void handle(Response reply)
handle in interface ParserHandlerpublic void end(Void v)
public void fail(Throwable t)
fail in interface ParserHandlerpublic void fatal(Throwable t)
fatal in interface ParserHandlerCopyright © 2021. All rights reserved.