Package com.databricks.jdbc.common.safe
Class DatabricksDriverFeatureFlagsContextFactory
- java.lang.Object
-
- com.databricks.jdbc.common.safe.DatabricksDriverFeatureFlagsContextFactory
-
public class DatabricksDriverFeatureFlagsContextFactory extends Object
Factory class to manage DatabricksDriverFeatureFlagsContext instances
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DatabricksDriverFeatureFlagsContextgetInstance(IDatabricksConnectionContext context)Gets or creates a DatabricksDriverFeatureFlagsContext instance for the given compute.static voidremoveInstance(IDatabricksConnectionContext connectionContext)Removes the reference for the given connection context.static voidsetFeatureFlagsContext(IDatabricksConnectionContext connectionContext, Map<String,String> featureFlags)
-
-
-
Method Detail
-
getInstance
public static DatabricksDriverFeatureFlagsContext getInstance(IDatabricksConnectionContext context)
Gets or creates a DatabricksDriverFeatureFlagsContext instance for the given compute. Multiple calls with the same connection UUID are idempotent — only one reference is tracked per connection.- Parameters:
context- the connection context- Returns:
- the DatabricksDriverFeatureFlagsContext instance
-
removeInstance
public static void removeInstance(IDatabricksConnectionContext connectionContext)
Removes the reference for the given connection context. When the last connection for a host is removed, the context is shut down. If the removed connection was the one whose context was stored internally, the stored context is updated to another active connection to prevent HTTP client leaks.- Parameters:
connectionContext- the connection context
-
setFeatureFlagsContext
public static void setFeatureFlagsContext(IDatabricksConnectionContext connectionContext, Map<String,String> featureFlags)
-
-