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 ExecutionProfileResolver
from
(com.datastax.oss.driver.api.core.config.DriverExecutionProfile driverExecutionProfile) Create aExecutionProfileResolver
from aDriverExecutionProfile
to apply the profile object.static ExecutionProfileResolver
Create aExecutionProfileResolver
from aprofileName
.static ExecutionProfileResolver
none()
Create a no-opExecutionProfileResolver
that preserves theStatement
settings.
-
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 profile
to.- Returns:
- the statement with the profile applied.
-
none
Create a no-opExecutionProfileResolver
that preserves theStatement
settings.- Returns:
- no-op
ExecutionProfileResolver
that preserves theStatement
settings.
-
from
static ExecutionProfileResolver from(com.datastax.oss.driver.api.core.config.DriverExecutionProfile driverExecutionProfile) Create aExecutionProfileResolver
from aDriverExecutionProfile
to apply the profile object.- Parameters:
driverExecutionProfile
- must not be null.- Returns:
- a
ExecutionProfileResolver
that applies the givenDriverExecutionProfile
. - See Also:
-
Statement.setExecutionProfile(DriverExecutionProfile)
-
from
Create aExecutionProfileResolver
from aprofileName
.- Parameters:
profileName
- must not be null or empty.- Returns:
- a
ExecutionProfileResolver
that applies the givenprofileName
. - See Also:
-
Statement.setExecutionProfileName(String)
-