Class Redis
java.lang.Object
io.vertx.reactivex.redis.client.Redis
- All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSends a list of commands in a single IO operation, this prevents any inter twinning to happen from other client users.close()Closes the client and terminates any connection.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.static RediscreateClusterClient(Vertx vertx, RedisOptions options, Supplier<Future<RedisClusterConnectOptions>> connectOptions) Creates a new cluster Redis client.static RediscreateReplicationClient(Vertx vertx, RedisOptions options, Supplier<Future<RedisReplicationConnectOptions>> connectOptions) Creates a new replication Redis client.static RediscreateSentinelClient(Vertx vertx, RedisOptions options, Supplier<Future<RedisSentinelConnectOptions>> connectOptions) Creates a new sentinel Redis client.static RediscreateStandaloneClient(Vertx vertx, RedisOptions options, Supplier<Future<RedisStandaloneConnectOptions>> connectOptions) Creates a new standalone Redis client.booleaninthashCode()static RedisnewInstance(Redis arg) Sends a list of commands in a single IO operation, this prevents any inter twinning to happen from other client users.rxClose()Closes the client and terminates any connection.Connects to the Redis server.Send the given command to the Redis server or cluster.Send the given command to the Redis server or cluster.toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
Redis
-
Redis
-
-
Method Details
-
toString
-
equals
-
hashCode
-
getDelegate
- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate
-
createClient
-
createClient
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
Create a new Redis client using the given client options.- Parameters:
vertx- the Vert.x instanceoptions- the user provided options- Returns:
- the client
-
createStandaloneClient
public static Redis createStandaloneClient(Vertx vertx, RedisOptions options, Supplier<Future<RedisStandaloneConnectOptions>> connectOptions) Creates a new standalone Redis client. Theoptionsare used to obtainRedisOptions,RedisOptions,RedisOptionsandRedisOptions. TheconnectOptionsare queried for every connection attempt.If
options.getType() != RedisClientType.STANDALONE, an exception is thrown.- Parameters:
vertx- the Vert.x instanceoptions- the static optionsconnectOptions- supplier of the dynamic options- Returns:
- the standalone client
-
createReplicationClient
public static Redis createReplicationClient(Vertx vertx, RedisOptions options, Supplier<Future<RedisReplicationConnectOptions>> connectOptions) Creates a new replication Redis client. Theoptionsare used to obtainRedisOptions,RedisOptions,RedisOptionsandRedisOptions. TheconnectOptionsare queried for every connection attempt.If
options.getType() != RedisClientType.REPLICATION, an exception is thrown.- Parameters:
vertx- the Vert.x instanceoptions- the static optionsconnectOptions- supplier of the dynamic options- Returns:
- the replication client
-
createSentinelClient
public static Redis createSentinelClient(Vertx vertx, RedisOptions options, Supplier<Future<RedisSentinelConnectOptions>> connectOptions) Creates a new sentinel Redis client. Theoptionsare used to obtainRedisOptions,RedisOptions,RedisOptionsandRedisOptions. TheconnectOptionsare queried for every connection attempt.If
options.getType() != RedisClientType.SENTINEL, an exception is thrown.- Parameters:
vertx- the Vert.x instanceoptions- the static optionsconnectOptions- supplier of the dynamic options- Returns:
- the sentinel client
-
createClusterClient
public static Redis createClusterClient(Vertx vertx, RedisOptions options, Supplier<Future<RedisClusterConnectOptions>> connectOptions) Creates a new cluster Redis client. Theoptionsare used to obtainRedisOptions,RedisOptions,RedisOptionsandRedisOptions. TheconnectOptionsare queried for every connection attempt.If
options.getType() != RedisClientType.CLUSTER, an exception is thrown.- Parameters:
vertx- the Vert.x instanceoptions- the static optionsconnectOptions- supplier of the dynamic options- Returns:
- the cluster client
-
connect
Connects to the Redis server.- Returns:
- a future with the result of the operation
-
rxConnect
Connects to the Redis server.- Returns:
- a future with the result of the operation
-
close
-
rxClose
-
send
-
rxSend
-
batch
-
rxBatch
-
newInstance
-