Module methanol.redis
Class RedisStorageExtension.Builder
java.lang.Object
com.github.mizosoft.methanol.store.redis.RedisStorageExtension.Builder
- Enclosing interface:
RedisStorageExtension
A builder of
RedisStorageExtension
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Creates a newRedisStorageExtension
.cluster
(RedisConnectionProvider<io.lettuce.core.cluster.api.StatefulRedisClusterConnection<String, ByteBuffer>> connectionProvider) Specifies the connection provider used to connect to the Redis Cluster instance.cluster
(io.lettuce.core.cluster.RedisClusterClient client) Specifies the client used to connect to the Redis Cluster instance.Specifies one or more URIs for discovering the topology of the Redis Cluster instance.editorLockTtlSeconds
(int editorLockTtlSeconds) Specifies the number of seconds an active entry editor (writer) remains valid.staleEntryTtlSeconds
(int staleEntryTtlSeconds) Specifies the number of seconds a stale entry remains valid for already active readers after being deleted or replaced with a new entry by an editor (writer).standalone
(RedisConnectionProvider<io.lettuce.core.api.StatefulRedisConnection<String, ByteBuffer>> connectionProvider) Specifies the connection provider used to connect to the Redis Standalone instancestandalone
(io.lettuce.core.RedisURI redisUri) Specifies the URI of the Redis Standalone instance.standalone
(io.lettuce.core.RedisURI redisUri, io.lettuce.core.RedisClient client) Specifies the URI of the Redis Standalone instance and the client used to connect to it.
-
Method Details
-
standalone
Specifies the URI of the Redis Standalone instance. -
standalone
public RedisStorageExtension.Builder standalone(io.lettuce.core.RedisURI redisUri, io.lettuce.core.RedisClient client) Specifies the URI of the Redis Standalone instance and the client used to connect to it. -
standalone
public RedisStorageExtension.Builder standalone(RedisConnectionProvider<io.lettuce.core.api.StatefulRedisConnection<String, ByteBuffer>> connectionProvider) Specifies the connection provider used to connect to the Redis Standalone instance -
cluster
Specifies one or more URIs for discovering the topology of the Redis Cluster instance. -
cluster
Specifies the client used to connect to the Redis Cluster instance. -
cluster
public RedisStorageExtension.Builder cluster(RedisConnectionProvider<io.lettuce.core.cluster.api.StatefulRedisClusterConnection<String, ByteBuffer>> connectionProvider) Specifies the connection provider used to connect to the Redis Cluster instance. -
editorLockTtlSeconds
Specifies the number of seconds an active entry editor (writer) remains valid. If the given number of seconds passes with no signals from the editor (either because of a crash, or it was suspended for some reason), any data written by the editor is discarded and the older entry (if any) is retained.- Throws:
IllegalArgumentException
- if the given number of seconds is negative
-
staleEntryTtlSeconds
Specifies the number of seconds a stale entry remains valid for already active readers after being deleted or replaced with a new entry by an editor (writer). This gives said readers a chance to finish reading the older entry.- Throws:
IllegalArgumentException
- if the given number of seconds is negative
-
build
Creates a newRedisStorageExtension
.
-