Package io.vertx.rxjava3.redis.client
Class Redis
- java.lang.Object
-
- io.vertx.rxjava3.redis.client.Redis
-
-
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 io.reactivex.rxjava3.core.Single<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.voidclose()Closes the client and terminates any connection.io.reactivex.rxjava3.core.Single<RedisConnection>connect()Connects to the redis server.static RediscreateClient(Vertx vertx)Create a new redis client using the default client options.static RediscreateClient(Vertx vertx, RedisOptions options)Create a new redis client using the given client options.static RediscreateClient(Vertx vertx, String connectionString)Create a new redis client using the default client options.booleanequals(Object o)RedisgetDelegate()inthashCode()static RedisnewInstance(Redis arg)io.reactivex.rxjava3.core.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.io.reactivex.rxjava3.core.Single<RedisConnection>rxConnect()Connects to the redis server.io.reactivex.rxjava3.core.Maybe<Response>rxSend(Request command)Send the given command to the redis server or cluster.io.reactivex.rxjava3.core.Maybe<Response>send(Request command)Send the given command to the redis server or cluster.StringtoString()
-
-
-
Method Detail
-
getDelegate
public 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, 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 io.reactivex.rxjava3.core.Single<RedisConnection> connect()
Connects to the redis server.- Returns:
- a reference to this, so the API can be used fluently
-
rxConnect
public io.reactivex.rxjava3.core.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 io.reactivex.rxjava3.core.Maybe<Response> send(Request command)
Send the given command to the redis server or cluster.- Parameters:
command- the command to send- Returns:
- fluent self.
-
rxSend
public io.reactivex.rxjava3.core.Maybe<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 io.reactivex.rxjava3.core.Single<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:
- fluent self.
-
rxBatch
public io.reactivex.rxjava3.core.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.
-
-