Package glide.managers
Class ConnectionManager
- java.lang.Object
-
- glide.managers.ConnectionManager
-
public class ConnectionManager extends java.lang.ObjectConnectionManager that wraps GlideNativeBridge to handle native client connections. Manages the lifecycle of native client instances and provides connection services.
-
-
Constructor Summary
Constructors Constructor Description ConnectionManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.Future<java.lang.Void>closeConnection()Close the connection.voidcloseConnectionSync()Close the connection immediately (synchronous version).java.util.concurrent.CompletableFuture<java.lang.Void>connectToValkey(BaseClientConfiguration configuration)Connect to Valkey using the native bridge.java.lang.StringgetClientInfo()Get client information from the native layer.ServerCredentialsgetCredentials()Returns the credentials configured for this connection, if any.intgetMaxInflightRequests()Get max inflight requests setting.longgetNativeClientHandle()Get the native client handle for use by CommandManager.intgetRequestTimeoutMs()Get request timeout setting.booleanisClosed()Check if the connection is closed.booleanisConnected()Check if the client is connected and ready for commands.voidupdateStoredPassword(java.lang.String password)Update the cached password after a successful rotation (used by BaseClient).
-
-
-
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.
-
-