Package io.vertx.rxjava.redis.client
Class Redis
- java.lang.Object
-
- io.vertx.rxjava.redis.client.Redis
-
public class Redis extends Object
A simple Redis client. NOTE: This class has been automatically generated from theoriginal
non RX-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<Redis>
__TYPE_ARG
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Redis
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.Redis
batch(List<Request> commands, io.vertx.core.Handler<io.vertx.core.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.Redis
connect()
Connects to the redis server.Redis
connect(io.vertx.core.Handler<io.vertx.core.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, io.vertx.redis.client.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.boolean
equals(Object o)
io.vertx.redis.client.Redis
getDelegate()
int
hashCode()
static Redis
newInstance(io.vertx.redis.client.Redis arg)
rx.Single<List<Response>>
rxBatch(List<Request> commands)
Sends a list of commands in a single IO operation, this prevents any inter twinning to happen from other client users.rx.Single<RedisConnection>
rxConnect()
Connects to the redis server.rx.Single<Response>
rxSend(Request command)
Send the given command to the redis server or cluster.Redis
send(Request command)
Send the given command to the redis server or cluster.Redis
send(Request command, io.vertx.core.Handler<io.vertx.core.AsyncResult<Response>> onSend)
Send the given command to the redis server or cluster.String
toString()
-
-
-
Constructor Detail
-
Redis
public Redis(io.vertx.redis.client.Redis delegate)
-
Redis
public Redis(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.redis.client.Redis getDelegate()
-
createClient
public static Redis createClient(Vertx vertx)
Create a new redis client using the default client options.- Parameters:
vertx
- the vertx instance- Returns:
- the client
-
createClient
public static Redis createClient(Vertx vertx, String connectionString)
Create a new redis client using the default client options. Does not support rediss (redis over ssl scheme) for now.- Parameters:
vertx
- the vertx instanceconnectionString
- a string URI following the scheme: redis://[username:password@][host][:port][/database]- Returns:
- the client
-
createClient
public static Redis createClient(Vertx vertx, io.vertx.redis.client.RedisOptions options)
Create a new redis client using the given client options.- Parameters:
vertx
- the vertx instanceoptions
- the user provided options- Returns:
- the client
-
connect
public Redis connect(io.vertx.core.Handler<io.vertx.core.AsyncResult<RedisConnection>> handler)
Connects to the redis server.- Parameters:
handler
- the async result handler- Returns:
- a reference to this, so the API can be used fluently
-
connect
public Redis connect()
Connects to the redis server.- Returns:
- a reference to this, so the API can be used fluently
-
rxConnect
public rx.Single<RedisConnection> rxConnect()
Connects to the redis server.- Returns:
- a reference to this, so the API can be used fluently
-
close
public void close()
Closes the client and terminates any connection.
-
send
public Redis send(Request command, io.vertx.core.Handler<io.vertx.core.AsyncResult<Response>> onSend)
Send the given command to the redis server or cluster.- Parameters:
command
- the command to sendonSend
- the asynchronous result handler.- Returns:
- fluent self.
-
send
public Redis send(Request command)
Send the given command to the redis server or cluster.- Parameters:
command
- the command to send- Returns:
- fluent self.
-
rxSend
public rx.Single<Response> rxSend(Request command)
Send the given command to the redis server or cluster.- Parameters:
command
- the command to send- Returns:
- fluent self.
-
batch
public Redis batch(List<Request> commands, io.vertx.core.Handler<io.vertx.core.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.- Parameters:
commands
- list of command to sendonSend
- the asynchronous result handler.- Returns:
- fluent self.
-
batch
public Redis 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:
- fluent self.
-
rxBatch
public rx.Single<List<Response>> rxBatch(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:
- fluent self.
-
newInstance
public static Redis newInstance(io.vertx.redis.client.Redis arg)
-
-