-
- All Superinterfaces:
ReadStream<Response>
,StreamBase
public interface RedisConnection extends ReadStream<Response>
A simple Redis client.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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.Future<Void>
close()
Closes the connection or returns to the pool.RedisConnection
endHandler(Handler<Void> endHandler)
RedisConnection
exceptionHandler(Handler<Throwable> handler)
RedisConnection
fetch(long amount)
RedisConnection
handler(Handler<Response> handler)
RedisConnection
pause()
boolean
pendingQueueFull()
Flag to notify if the pending message queue (commands in transit) is full.RedisConnection
resume()
Future<Response>
send(Request command)
Send the given command to the redis server or cluster.-
Methods inherited from interface io.vertx.core.streams.ReadStream
blockingStream, collect, pipe, pipeTo
-
-
-
-
Method Detail
-
exceptionHandler
RedisConnection exceptionHandler(Handler<Throwable> handler)
- Specified by:
exceptionHandler
in interfaceReadStream<Response>
- Specified by:
exceptionHandler
in interfaceStreamBase
-
handler
RedisConnection handler(Handler<Response> handler)
- Specified by:
handler
in interfaceReadStream<Response>
-
pause
RedisConnection pause()
- Specified by:
pause
in interfaceReadStream<Response>
-
resume
RedisConnection resume()
- Specified by:
resume
in interfaceReadStream<Response>
-
fetch
RedisConnection fetch(long amount)
- Specified by:
fetch
in interfaceReadStream<Response>
-
endHandler
RedisConnection endHandler(Handler<Void> endHandler)
- Specified by:
endHandler
in interfaceReadStream<Response>
-
send
Future<Response> send(Request command)
Send the given command to the redis server or cluster.- Parameters:
command
- the command to send- Returns:
- a future with the result of the operation
-
batch
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.- Parameters:
commands
- list of command to send- Returns:
- a future with the result of the operation
-
pendingQueueFull
boolean pendingQueueFull()
Flag to notify if the pending message queue (commands in transit) is full.When the pending message queue is full and a new send command is issued it will result in a exception to be thrown. Checking this flag before sending can allow the application to wait before sending the next message.
- Returns:
- true is queue is full.
-
-