Class ConnectionManager


  • public class ConnectionManager
    extends java.lang.Object
    ConnectionManager that wraps GlideNativeBridge to handle native client connections. Manages the lifecycle of native client instances and provides connection services.
    • Constructor Detail

      • ConnectionManager

        public ConnectionManager()
    • Method Detail

      • connectToValkey

        public java.util.concurrent.CompletableFuture<java.lang.Void> connectToValkey​(BaseClientConfiguration configuration)
        Connect to Valkey using the native bridge.
        Parameters:
        configuration - Connection Configuration
        Returns:
        CompletableFuture that completes when connection is established
      • closeConnection

        public java.util.concurrent.Future<java.lang.Void> closeConnection()
        Close the connection.
        Returns:
        Future that completes when connection is closed
      • closeConnectionSync

        public void closeConnectionSync()
        Close the connection immediately (synchronous version).
      • getNativeClientHandle

        public long getNativeClientHandle()
        Get the native client handle for use by CommandManager.
      • getMaxInflightRequests

        public int getMaxInflightRequests()
        Get max inflight requests setting.
      • getRequestTimeoutMs

        public int getRequestTimeoutMs()
        Get request timeout setting.
      • isClosed

        public boolean isClosed()
        Check if the connection is closed.
      • isConnected

        public boolean isConnected()
        Check if the client is connected and ready for commands.
      • getCredentials

        public ServerCredentials getCredentials()
        Returns the credentials configured for this connection, if any.
      • updateStoredPassword

        public void updateStoredPassword​(java.lang.String password)
        Update the cached password after a successful rotation (used by BaseClient).
      • getClientInfo

        public java.lang.String getClientInfo()
        Get client information from the native layer.