Class RVRedisOptions

java.lang.Object
io.revealbi.core.RVRedisOptions

public class RVRedisOptions extends Object
Represents configuration options for connecting to a Redis cache. Values that are not explicitly specified will use the defaults set by StackExchange.Redis.
  • Constructor Details

    • RVRedisOptions

      public RVRedisOptions()
  • Method Details

    • getConnectionString

      public String getConnectionString()
      Gets the Redis server connection string (e.g., "localhost:6379").
    • setConnectionString

      public void setConnectionString(String connectionString)
      Sets the Redis server connection string (e.g., "localhost:6379").
    • getEndPoints

      public List<String> getEndPoints()
      Gets the list of endpoint URLs for connecting to Redis.
    • setEndPoints

      public void setEndPoints(List<String> endPoints)
      Sets the list of endpoint URLs for connecting to Redis. If provided, these override the connectionString endpoints.
    • getUser

      public String getUser()
      Gets the username for Redis authentication.
    • setUser

      public void setUser(String user)
      Sets the username for Redis authentication.
    • getPassword

      public String getPassword()
      Gets the password for Redis authentication.
    • setPassword

      public void setPassword(String password)
      Sets the password for Redis authentication.
    • isUseSsl

      public Boolean isUseSsl()
      Returns whether SSL/TLS encryption is enabled. Defaults to null.
    • setUseSsl

      public void setUseSsl(Boolean useSsl)
      Sets whether SSL/TLS encryption should be used. Defaults to null.
    • getDefaultDatabase

      public Integer getDefaultDatabase()
      Gets the default Redis database number to use. Defaults to null.
    • setDefaultDatabase

      public void setDefaultDatabase(Integer defaultDatabase)
      Sets the default Redis database number to use. Defaults to null.
    • getClientName

      public String getClientName()
      Gets the client name used to identify this connection in Redis.
    • setClientName

      public void setClientName(String clientName)
      Sets the client name used to identify this connection in Redis.
    • getConnectTimeoutMs

      public Integer getConnectTimeoutMs()
      Gets the connection timeout in milliseconds. Defaults to null.
    • setConnectTimeoutMs

      public void setConnectTimeoutMs(Integer connectTimeoutMs)
      Sets the connection timeout in milliseconds. Defaults to null.
    • getSyncTimeoutMs

      public Integer getSyncTimeoutMs()
      Gets the synchronous operation timeout in milliseconds. Defaults to null.
    • setSyncTimeoutMs

      public void setSyncTimeoutMs(Integer syncTimeoutMs)
      Sets the synchronous operation timeout in milliseconds. Defaults to null.
    • getAsyncTimeoutMs

      public Integer getAsyncTimeoutMs()
      Gets the asynchronous operation timeout in milliseconds. Defaults to null.
    • setAsyncTimeoutMs

      public void setAsyncTimeoutMs(Integer asyncTimeoutMs)
      Sets the asynchronous operation timeout in milliseconds. Defaults to null.
    • getConnectRetry

      public Integer getConnectRetry()
      Gets the number of connection retry attempts. Defaults to null.
    • setConnectRetry

      public void setConnectRetry(Integer connectRetry)
      Sets the number of connection retry attempts. Defaults to null.
    • getKeepAliveSeconds

      public Integer getKeepAliveSeconds()
      Gets the keep-alive interval in seconds. Defaults to null.
    • setKeepAliveSeconds

      public void setKeepAliveSeconds(Integer keepAliveSeconds)
      Sets the keep-alive interval in seconds. Defaults to null.
    • isAbortOnConnectFail

      public Boolean isAbortOnConnectFail()
      Returns whether the connection should abort immediately on a connection failure. Defaults to null.
    • setAbortOnConnectFail

      public void setAbortOnConnectFail(Boolean abortOnConnectFail)
      Sets whether the connection should abort immediately on a connection failure. Defaults to null.
    • isAllowAdmin

      public Boolean isAllowAdmin()
      Returns whether admin commands (e.g., FLUSHDB, CONFIG) are allowed. Defaults to null.
    • setAllowAdmin

      public void setAllowAdmin(Boolean allowAdmin)
      Sets whether admin commands (e.g., FLUSHDB, CONFIG) are allowed. Defaults to null.
    • getReconnectRetryPolicy

      public String getReconnectRetryPolicy()
      Gets the reconnection retry policy: "Linear" or "Exponential". Defaults to null.
    • setReconnectRetryPolicy

      public void setReconnectRetryPolicy(String reconnectRetryPolicy)
      Sets the reconnection retry policy. Accepted values: "Linear" or "Exponential". Defaults to null.
    • getRetryDelayMs

      public Integer getRetryDelayMs()
      Gets the base delay in milliseconds used by the retry policy. Defaults to null.
    • setRetryDelayMs

      public void setRetryDelayMs(Integer retryDelayMs)
      Sets the base delay in milliseconds used by the retry policy. Defaults to null.
    • validate

      public void validate()
      Validates this options instance, throwing IllegalArgumentException if neither a non-blank connectionString nor a non-empty endPoints list has been set.
      Throws:
      IllegalArgumentException - if neither connectionString nor endPoints is configured.