Interface ExecutionProfileResolver

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ExecutionProfileResolver
Resolver for a DriverExecutionProfile used with Statement.setExecutionProfileName(String) or Statement.setExecutionProfile(DriverExecutionProfile).
Since:
3.0
Author:
Mark Paluch
  • Method Details

    • apply

      com.datastax.oss.driver.api.core.cql.Statement<?> apply(com.datastax.oss.driver.api.core.cql.Statement<?> statement)
      Apply an execution profile based on the Statement.
      Parameters:
      statement - the statement to inspect and to apply the driver execution profile to.
      Returns:
      the statement with the profile applied.
    • none

      static ExecutionProfileResolver none()
      Create a no-op ExecutionProfileResolver that preserves the Statement settings.
      Returns:
      no-op ExecutionProfileResolver that preserves the Statement settings.
    • from

      static ExecutionProfileResolver from(com.datastax.oss.driver.api.core.config.DriverExecutionProfile driverExecutionProfile)
      Create a ExecutionProfileResolver from a DriverExecutionProfile to apply the profile object.
      Parameters:
      driverExecutionProfile - must not be null.
      Returns:
      a ExecutionProfileResolver that applies the given DriverExecutionProfile.
      See Also:
      • Statement.setExecutionProfile(DriverExecutionProfile)
    • from

      static ExecutionProfileResolver from(String profileName)
      Create a ExecutionProfileResolver from a profileName.
      Parameters:
      profileName - must not be null or empty.
      Returns:
      a ExecutionProfileResolver that applies the given profileName.
      See Also:
      • Statement.setExecutionProfileName(String)