Interface DriverContext

  • All Superinterfaces:
    AttachmentPoint

    public interface DriverContext
    extends AttachmentPoint
    Holds common components that are shared throughout a driver instance.
    • Method Detail

      • getSessionName

        @NonNull
        String getSessionName()
        This is the same as Session.getName(), it's exposed here for components that only have a reference to the context.
      • getConfig

        @NonNull
        DriverConfig getConfig()
        Returns the driver's configuration; never null.
      • getConfigLoader

        @NonNull
        DriverConfigLoader getConfigLoader()
        Returns the driver's configuration loader; never null.
      • getLoadBalancingPolicies

        @NonNull
        Map<String,​LoadBalancingPolicy> getLoadBalancingPolicies()
        Returns the driver's load balancing policies, keyed by profile name; the returned map is guaranteed to never be null and 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; never null.
        Parameters:
        profileName - the profile name; never null.
      • getRetryPolicies

        @NonNull
        Map<String,​RetryPolicy> getRetryPolicies()
        Returns the driver's retry policies, keyed by profile name; the returned map is guaranteed to never be null and 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; never null.
        Parameters:
        profileName - the profile name; never null.
      • getSpeculativeExecutionPolicies

        @NonNull
        Map<String,​SpeculativeExecutionPolicy> getSpeculativeExecutionPolicies()
        Returns the driver's speculative execution policies, keyed by profile name; the returned map is guaranteed to never be null and 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; never null.
        Parameters:
        profileName - the profile name; never null.
      • getTimestampGenerator

        @NonNull
        TimestampGenerator getTimestampGenerator()
        Returns the driver's timestamp generator; never null.
      • getReconnectionPolicy

        @NonNull
        ReconnectionPolicy getReconnectionPolicy()
        Returns the driver's reconnection policy; never null.
      • getAddressTranslator

        @NonNull
        AddressTranslator getAddressTranslator()
        Returns the driver's address translator; never null.
      • 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; never null.
      • getRequestIdGenerator

        @NonNull
        Optional<RequestIdGenerator> getRequestIdGenerator()
        Returns:
        The driver's request ID generator; never null.
      • getRequestThrottler

        @NonNull
        RequestThrottler getRequestThrottler()
        Returns the driver's request throttler; never null.
      • getNodeStateListener

        @NonNull
        NodeStateListener getNodeStateListener()
        Returns the driver's node state listener; never null.
      • getSchemaChangeListener

        @NonNull
        SchemaChangeListener getSchemaChangeListener()
        Returns the driver's schema change listener; never null.