Class ServiceConfig.Redis

java.lang.Object
org.apache.opendal.ServiceConfig.Redis
All Implemented Interfaces:
ServiceConfig
Enclosing interface:
ServiceConfig

public static class ServiceConfig.Redis extends Object implements ServiceConfig
Configuration for service redis.
  • Field Details

    • clusterEndpoints

      public final String clusterEndpoints

      network address of the Redis cluster service. Can be "tcp://127.0.0.1:6379,tcp://127.0.0.1:6380,tcp://127.0.0.1:6381", e.g.

      default is None

    • connectionPoolMaxSize

      public final Long connectionPoolMaxSize

      The maximum number of connections allowed.

      default is 10

    • db

      public final long db

      the number of DBs redis can take is unlimited

      default is db 0

    • defaultTtl

      public final Duration defaultTtl

      The default ttl for put operations.

    • endpoint

      public final String endpoint

      network address of the Redis service. Can be "tcp://127.0.0.1:6379", e.g.

      default is "tcp://127.0.0.1:6379"

    • password

      public final String password

      the password for authentication

      default is None

    • readFromReplicas

      public final Boolean readFromReplicas

      Route read-only commands for read and stat to Redis Cluster replicas when available.

      Defaults to false. Enabling this option requires cluster_endpoints. Replication lag can cause stale results. For example, read or stat can briefly return ErrorKind::NotFound for a just-written key. OpenDAL returns a replica miss without retrying on the primary.

    • root

      public final String root

      the working directory of the Redis service. Can be "/path/to/dir"

      default is "/"

    • username

      public final String username

      the username to connect redis service.

      default is None

  • Constructor Details

    • Redis

      public Redis()
  • Method Details

    • scheme

      public String scheme()
      Description copied from interface: ServiceConfig
      The scheme of the service.
      Specified by:
      scheme in interface ServiceConfig
      Returns:
      the scheme
    • configMap

      public Map<String,String> configMap()
      Description copied from interface: ServiceConfig
      Convert the structured config to a type erased config map.

      A map-valued field becomes one entry, under the field's option name, whose value is a JSON object string, such as assume_role_session_tags = {"Team":"data"}. The map's entries are not flattened into top-level entries. Its keys are sorted, an empty map becomes {}, and an unset field has no entry.

      Specified by:
      configMap in interface ServiceConfig
      Returns:
      the config map