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.
Resolver for a
DriverExecutionProfile used with
Statement.setExecutionProfileName(String) or
Statement.setExecutionProfile(DriverExecutionProfile).- Since:
- 3.0
- Author:
- Mark Paluch
-
Method Summary
Modifier and TypeMethodDescriptioncom.datastax.oss.driver.api.core.cql.Statement<?>apply(com.datastax.oss.driver.api.core.cql.Statement<?> statement) Apply an execution profile based on theStatement.static ExecutionProfileResolverfrom(com.datastax.oss.driver.api.core.config.DriverExecutionProfile driverExecutionProfile) Create aExecutionProfileResolverfrom aDriverExecutionProfileto apply the profile object.static ExecutionProfileResolverCreate aExecutionProfileResolverfrom aprofileName.static ExecutionProfileResolvernone()Create a no-opExecutionProfileResolverthat preserves theStatementsettings.
-
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 theStatement.- Parameters:
statement- the statement to inspect and to apply thedriver execution profileto.- Returns:
- the statement with the profile applied.
-
none
Create a no-opExecutionProfileResolverthat preserves theStatementsettings.- Returns:
- no-op
ExecutionProfileResolverthat preserves theStatementsettings.
-
from
static ExecutionProfileResolver from(com.datastax.oss.driver.api.core.config.DriverExecutionProfile driverExecutionProfile) Create aExecutionProfileResolverfrom aDriverExecutionProfileto apply the profile object.- Parameters:
driverExecutionProfile- must not be null.- Returns:
- a
ExecutionProfileResolverthat applies the givenDriverExecutionProfile. - See Also:
-
Statement.setExecutionProfile(DriverExecutionProfile)
-
from
Create aExecutionProfileResolverfrom aprofileName.- Parameters:
profileName- must not be null or empty.- Returns:
- a
ExecutionProfileResolverthat applies the givenprofileName. - See Also:
-
Statement.setExecutionProfileName(String)
-