Class RedisStorageExtension.Builder

java.lang.Object
com.github.mizosoft.methanol.store.redis.RedisStorageExtension.Builder
Enclosing interface:
RedisStorageExtension

public static final class RedisStorageExtension.Builder extends Object
A builder of RedisStorageExtension.
  • Method Details

    • standalone

      public RedisStorageExtension.Builder standalone(io.lettuce.core.RedisURI redisUri)
      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

      public RedisStorageExtension.Builder cluster(Iterable<io.lettuce.core.RedisURI> redisUris)
      Specifies one or more URIs for discovering the topology of the Redis Cluster instance.
    • cluster

      public RedisStorageExtension.Builder cluster(io.lettuce.core.cluster.RedisClusterClient client)
      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

      public RedisStorageExtension.Builder editorLockTtlSeconds(int 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

      public RedisStorageExtension.Builder 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). This gives said readers a chance to finish reading the older entry.
      Throws:
      IllegalArgumentException - if the given number of seconds is negative
    • build

      public RedisStorageExtension build()
      Creates a new RedisStorageExtension.