public interface Redis
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.
|
default Redis |
batch(List<Request> commands,
Handler<AsyncResult<List<Response>>> onSend)
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 client and terminates any connection.
|
Future<RedisConnection> |
connect()
Connects to the redis server.
|
default Redis |
connect(Handler<AsyncResult<RedisConnection>> handler)
Connects to the redis server.
|
static Redis |
createClient(Vertx vertx)
Create a new redis client using the default client options.
|
static Redis |
createClient(Vertx vertx,
RedisOptions options)
Create a new redis client using the given client options.
|
static Redis |
createClient(Vertx vertx,
String connectionString)
Create a new redis client using the default client options.
|
Future<Response> |
send(Request command)
Send the given command to the redis server or cluster.
|
default Redis |
send(Request command,
Handler<AsyncResult<Response>> onSend)
Send the given command to the redis server or cluster.
|
static Redis createClient(Vertx vertx)
vertx
- the vertx instancestatic Redis createClient(Vertx vertx, String connectionString)
connectionString
- a string URI following the scheme: redis://[username:password@][host][:port][/database]vertx
- the vertx instancestatic Redis createClient(Vertx vertx, RedisOptions options)
vertx
- the vertx instanceoptions
- the user provided optionsdefault Redis connect(Handler<AsyncResult<RedisConnection>> handler)
handler
- the async result handlerFuture<RedisConnection> connect()
void close()
default Redis send(Request command, Handler<AsyncResult<Response>> onSend)
command
- the command to sendonSend
- the asynchronous result handler.Future<Response> send(Request command)
command
- the command to senddefault Redis batch(List<Request> commands, Handler<AsyncResult<List<Response>>> onSend)
commands
- list of command to sendonSend
- the asynchronous result handler.Copyright © 2024 Eclipse. All rights reserved.