Interface DriverContext
-
- All Superinterfaces:
AttachmentPoint
public interface DriverContext extends AttachmentPoint
Holds common components that are shared throughout a driver instance.
-
-
Field Summary
-
Fields inherited from interface com.datastax.oss.driver.api.core.detach.AttachmentPoint
NONE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description AddressTranslatorgetAddressTranslator()Returns the driver's address translator; nevernull.Optional<AuthProvider>getAuthProvider()Returns the authentication provider, if authentication was configured.DriverConfiggetConfig()Returns the driver's configuration; nevernull.DriverConfigLoadergetConfigLoader()Returns the driver's configuration loader; nevernull.Map<String,LoadBalancingPolicy>getLoadBalancingPolicies()Returns the driver's load balancing policies, keyed by profile name; the returned map is guaranteed to never benulland to always contain an entry for the "default" profile.default LoadBalancingPolicygetLoadBalancingPolicy(String profileName)Returns the driver's load balancing policy for the given profile; nevernull.NodeStateListenergetNodeStateListener()Returns the driver's node state listener; nevernull.ReconnectionPolicygetReconnectionPolicy()Returns the driver's reconnection policy; nevernull.Optional<RequestIdGenerator>getRequestIdGenerator()RequestThrottlergetRequestThrottler()Returns the driver's request throttler; nevernull.RequestTrackergetRequestTracker()Returns the driver's request tracker; nevernull.Map<String,RetryPolicy>getRetryPolicies()Returns the driver's retry policies, keyed by profile name; the returned map is guaranteed to never benulland to always contain an entry for the "default" profile.default RetryPolicygetRetryPolicy(String profileName)Returns the driver's retry policy for the given profile; nevernull.SchemaChangeListenergetSchemaChangeListener()Returns the driver's schema change listener; nevernull.StringgetSessionName()This is the same asSession.getName(), it's exposed here for components that only have a reference to the context.Map<String,SpeculativeExecutionPolicy>getSpeculativeExecutionPolicies()Returns the driver's speculative execution policies, keyed by profile name; the returned map is guaranteed to never benulland to always contain an entry for the "default" profile.default SpeculativeExecutionPolicygetSpeculativeExecutionPolicy(String profileName)Returns the driver's speculative execution policy for the given profile; nevernull.Optional<SslEngineFactory>getSslEngineFactory()Returns the SSL engine factory, if SSL was configured.TimestampGeneratorgetTimestampGenerator()Returns the driver's timestamp generator; nevernull.-
Methods inherited from interface com.datastax.oss.driver.api.core.detach.AttachmentPoint
getCodecRegistry, getProtocolVersion
-
-
-
-
Method Detail
-
getSessionName
@NonNull String getSessionName()
This is the same asSession.getName(), it's exposed here for components that only have a reference to the context.
-
getConfig
@NonNull DriverConfig getConfig()
Returns the driver's configuration; nevernull.
-
getConfigLoader
@NonNull DriverConfigLoader getConfigLoader()
Returns the driver's configuration loader; nevernull.
-
getLoadBalancingPolicies
@NonNull Map<String,LoadBalancingPolicy> getLoadBalancingPolicies()
Returns the driver's load balancing policies, keyed by profile name; the returned map is guaranteed to never benulland to always contain an entry for the "default" profile.
-
getLoadBalancingPolicy
@NonNull default LoadBalancingPolicy getLoadBalancingPolicy(@NonNull String profileName)
Returns the driver's load balancing policy for the given profile; nevernull.- Parameters:
profileName- the profile name; nevernull.
-
getRetryPolicies
@NonNull Map<String,RetryPolicy> getRetryPolicies()
Returns the driver's retry policies, keyed by profile name; the returned map is guaranteed to never benulland to always contain an entry for the "default" profile.
-
getRetryPolicy
@NonNull default RetryPolicy getRetryPolicy(@NonNull String profileName)
Returns the driver's retry policy for the given profile; nevernull.- Parameters:
profileName- the profile name; nevernull.
-
getSpeculativeExecutionPolicies
@NonNull Map<String,SpeculativeExecutionPolicy> getSpeculativeExecutionPolicies()
Returns the driver's speculative execution policies, keyed by profile name; the returned map is guaranteed to never benulland to always contain an entry for the "default" profile.
-
getSpeculativeExecutionPolicy
@NonNull default SpeculativeExecutionPolicy getSpeculativeExecutionPolicy(@NonNull String profileName)
Returns the driver's speculative execution policy for the given profile; nevernull.- Parameters:
profileName- the profile name; nevernull.
-
getTimestampGenerator
@NonNull TimestampGenerator getTimestampGenerator()
Returns the driver's timestamp generator; nevernull.
-
getReconnectionPolicy
@NonNull ReconnectionPolicy getReconnectionPolicy()
Returns the driver's reconnection policy; nevernull.
-
getAddressTranslator
@NonNull AddressTranslator getAddressTranslator()
Returns the driver's address translator; nevernull.
-
getAuthProvider
@NonNull Optional<AuthProvider> getAuthProvider()
Returns the authentication provider, if authentication was configured.
-
getSslEngineFactory
@NonNull Optional<SslEngineFactory> getSslEngineFactory()
Returns the SSL engine factory, if SSL was configured.
-
getRequestTracker
@NonNull RequestTracker getRequestTracker()
Returns the driver's request tracker; nevernull.
-
getRequestIdGenerator
@NonNull Optional<RequestIdGenerator> getRequestIdGenerator()
- Returns:
- The driver's request ID generator; never
null.
-
getRequestThrottler
@NonNull RequestThrottler getRequestThrottler()
Returns the driver's request throttler; nevernull.
-
getNodeStateListener
@NonNull NodeStateListener getNodeStateListener()
Returns the driver's node state listener; nevernull.
-
getSchemaChangeListener
@NonNull SchemaChangeListener getSchemaChangeListener()
Returns the driver's schema change listener; nevernull.
-
-