Interface RedisConnection
- All Known Implementing Classes:
RedisConnectionImpl
public interface RedisConnection
Represents a managed Redis connection backed by Redisson.
Connections are configured via YAML files (.yml or .yaml) referenced
by the CONNECTOR_REDIS_<ID>_CONFIG environment variable. The YAML format
follows the Redisson configuration specification.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the underlying Redisson client.voidinit()Initializes the Redis connection by loading configuration and creating the Redisson client.booleanReturns whether this connection is configured to cause server shutdown on initialization failure.voidshutdown()Shuts down the Redisson client and releases all associated resources.
-
Method Details
-
getClient
Returns the underlying Redisson client.- Returns:
- the
RedissonClientinstance - Throws:
NullPointerException- if called beforeinit()
-
init
Initializes the Redis connection by loading configuration and creating the Redisson client.- Throws:
ConnectionInitException- if the configuration file is invalid or the connection fails
-
shutdown
void shutdown()Shuts down the Redisson client and releases all associated resources. -
isExitOnFailure
boolean isExitOnFailure()Returns whether this connection is configured to cause server shutdown on initialization failure.- Returns:
trueif the server should exit when this connection fails to initialize
-