Modifier and Type | Method and Description |
---|---|
Redis |
batch(List<Request> commands,
io.vertx.core.Handler<io.vertx.core.AsyncResult<List<Response>>> handler) |
void |
close() |
Redis |
connect(io.vertx.core.Handler<io.vertx.core.AsyncResult<Redis>> handler)
Connects to the redis server.
|
static Redis |
createClient(io.vertx.core.Vertx vertx,
RedisOptions options)
Connect to redis, the
onConnect will get the Redis instance. |
static Redis |
createClient(io.vertx.core.Vertx vertx,
io.vertx.core.net.SocketAddress address)
Connect to redis, the
onConnect will get the Redis instance. |
Redis |
endHandler(io.vertx.core.Handler<Void> endHandler)
Set an end handler.
|
Redis |
exceptionHandler(io.vertx.core.Handler<Throwable> handler)
Set an exception handler on the read stream.
|
Redis |
fetch(long amount)
Fetch the specified
amount of elements. |
Redis |
handler(io.vertx.core.Handler<Response> handler)
Set a data handler.
|
Redis |
pause()
Pause the
ReadStream , it sets the buffer in fetch mode and clears the actual demand. |
Redis |
resume()
Resume reading, and sets the buffer in
flowing mode. |
Redis |
send(Request command,
io.vertx.core.Handler<io.vertx.core.AsyncResult<Response>> onSend) |
io.vertx.core.net.SocketAddress |
socketAddress()
Returns the address associated with this client.
|
static Redis createClient(io.vertx.core.Vertx vertx, io.vertx.core.net.SocketAddress address)
onConnect
will get the Redis
instance.
This connection will use the default options which are connect
to a standalone server on the default port on "localhost".static Redis createClient(io.vertx.core.Vertx vertx, RedisOptions options)
onConnect
will get the Redis
instance.Redis connect(io.vertx.core.Handler<io.vertx.core.AsyncResult<Redis>> handler)
handler
- the async result handlerRedis exceptionHandler(io.vertx.core.Handler<Throwable> handler)
exceptionHandler
in interface io.vertx.core.streams.ReadStream<Response>
exceptionHandler
in interface io.vertx.core.streams.StreamBase
handler
- the exception handlerRedis handler(io.vertx.core.Handler<Response> handler)
handler
in interface io.vertx.core.streams.ReadStream<Response>
Redis 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 io.vertx.core.streams.ReadStream<Response>
Redis resume()
flowing
mode.
If the ReadStream
has been paused, reading will recommence on it.resume
in interface io.vertx.core.streams.ReadStream<Response>
Redis 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 io.vertx.core.streams.ReadStream<Response>
Redis endHandler(io.vertx.core.Handler<Void> endHandler)
endHandler
in interface io.vertx.core.streams.ReadStream<Response>
Redis batch(List<Request> commands, io.vertx.core.Handler<io.vertx.core.AsyncResult<List<Response>>> handler)
io.vertx.core.net.SocketAddress socketAddress()
void close()
Copyright © 2019 Eclipse. All rights reserved.