Package io.revealbi.core
Class RVRedisOptions
java.lang.Object
io.revealbi.core.RVRedisOptions
Represents configuration options for connecting to a Redis cache.
Values that are not explicitly specified will use the defaults set by StackExchange.Redis.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the asynchronous operation timeout in milliseconds.Gets the client name used to identify this connection in Redis.Gets the Redis server connection string (e.g., "localhost:6379").Gets the number of connection retry attempts.Gets the connection timeout in milliseconds.Gets the default Redis database number to use.Gets the list of endpoint URLs for connecting to Redis.Gets the keep-alive interval in seconds.Gets the password for Redis authentication.Gets the reconnection retry policy: "Linear" or "Exponential".Gets the base delay in milliseconds used by the retry policy.Gets the synchronous operation timeout in milliseconds.getUser()Gets the username for Redis authentication.Returns whether the connection should abort immediately on a connection failure.Returns whether admin commands (e.g., FLUSHDB, CONFIG) are allowed.isUseSsl()Returns whether SSL/TLS encryption is enabled.voidsetAbortOnConnectFail(Boolean abortOnConnectFail) Sets whether the connection should abort immediately on a connection failure.voidsetAllowAdmin(Boolean allowAdmin) Sets whether admin commands (e.g., FLUSHDB, CONFIG) are allowed.voidsetAsyncTimeoutMs(Integer asyncTimeoutMs) Sets the asynchronous operation timeout in milliseconds.voidsetClientName(String clientName) Sets the client name used to identify this connection in Redis.voidsetConnectionString(String connectionString) Sets the Redis server connection string (e.g., "localhost:6379").voidsetConnectRetry(Integer connectRetry) Sets the number of connection retry attempts.voidsetConnectTimeoutMs(Integer connectTimeoutMs) Sets the connection timeout in milliseconds.voidsetDefaultDatabase(Integer defaultDatabase) Sets the default Redis database number to use.voidsetEndPoints(List<String> endPoints) Sets the list of endpoint URLs for connecting to Redis.voidsetKeepAliveSeconds(Integer keepAliveSeconds) Sets the keep-alive interval in seconds.voidsetPassword(String password) Sets the password for Redis authentication.voidsetReconnectRetryPolicy(String reconnectRetryPolicy) Sets the reconnection retry policy.voidsetRetryDelayMs(Integer retryDelayMs) Sets the base delay in milliseconds used by the retry policy.voidsetSyncTimeoutMs(Integer syncTimeoutMs) Sets the synchronous operation timeout in milliseconds.voidSets the username for Redis authentication.voidSets whether SSL/TLS encryption should be used.voidvalidate()Validates this options instance, throwingIllegalArgumentExceptionif neither a non-blankconnectionStringnor a non-emptyendPointslist has been set.
-
Constructor Details
-
RVRedisOptions
public RVRedisOptions()
-
-
Method Details
-
getConnectionString
Gets the Redis server connection string (e.g., "localhost:6379"). -
setConnectionString
Sets the Redis server connection string (e.g., "localhost:6379"). -
getEndPoints
Gets the list of endpoint URLs for connecting to Redis. -
setEndPoints
Sets the list of endpoint URLs for connecting to Redis. If provided, these override theconnectionStringendpoints. -
getUser
Gets the username for Redis authentication. -
setUser
Sets the username for Redis authentication. -
getPassword
Gets the password for Redis authentication. -
setPassword
Sets the password for Redis authentication. -
isUseSsl
Returns whether SSL/TLS encryption is enabled. Defaults to null. -
setUseSsl
Sets whether SSL/TLS encryption should be used. Defaults to null. -
getDefaultDatabase
Gets the default Redis database number to use. Defaults to null. -
setDefaultDatabase
Sets the default Redis database number to use. Defaults to null. -
getClientName
Gets the client name used to identify this connection in Redis. -
setClientName
Sets the client name used to identify this connection in Redis. -
getConnectTimeoutMs
Gets the connection timeout in milliseconds. Defaults to null. -
setConnectTimeoutMs
Sets the connection timeout in milliseconds. Defaults to null. -
getSyncTimeoutMs
Gets the synchronous operation timeout in milliseconds. Defaults to null. -
setSyncTimeoutMs
Sets the synchronous operation timeout in milliseconds. Defaults to null. -
getAsyncTimeoutMs
Gets the asynchronous operation timeout in milliseconds. Defaults to null. -
setAsyncTimeoutMs
Sets the asynchronous operation timeout in milliseconds. Defaults to null. -
getConnectRetry
Gets the number of connection retry attempts. Defaults to null. -
setConnectRetry
Sets the number of connection retry attempts. Defaults to null. -
getKeepAliveSeconds
Gets the keep-alive interval in seconds. Defaults to null. -
setKeepAliveSeconds
Sets the keep-alive interval in seconds. Defaults to null. -
isAbortOnConnectFail
Returns whether the connection should abort immediately on a connection failure. Defaults to null. -
setAbortOnConnectFail
Sets whether the connection should abort immediately on a connection failure. Defaults to null. -
isAllowAdmin
Returns whether admin commands (e.g., FLUSHDB, CONFIG) are allowed. Defaults to null. -
setAllowAdmin
Sets whether admin commands (e.g., FLUSHDB, CONFIG) are allowed. Defaults to null. -
getReconnectRetryPolicy
Gets the reconnection retry policy: "Linear" or "Exponential". Defaults to null. -
setReconnectRetryPolicy
Sets the reconnection retry policy. Accepted values: "Linear" or "Exponential". Defaults to null. -
getRetryDelayMs
Gets the base delay in milliseconds used by the retry policy. Defaults to null. -
setRetryDelayMs
Sets the base delay in milliseconds used by the retry policy. Defaults to null. -
validate
public void validate()Validates this options instance, throwingIllegalArgumentExceptionif neither a non-blankconnectionStringnor a non-emptyendPointslist has been set.- Throws:
IllegalArgumentException- if neitherconnectionStringnorendPointsis configured.
-