public class NoSpeculativeExecutionPolicy extends Object implements SpeculativeExecutionPolicy
SpeculativeExecutionPolicy
that never schedules speculative executions.SpeculativeExecutionPolicy.SpeculativeExecutionPlan
Modifier and Type | Field and Description |
---|---|
static NoSpeculativeExecutionPolicy |
INSTANCE
The single instance (this class is stateless).
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Gets invoked at cluster shutdown.
|
void |
init(Cluster cluster)
Gets invoked at cluster startup.
|
SpeculativeExecutionPolicy.SpeculativeExecutionPlan |
newPlan(String loggedKeyspace,
Statement statement)
Returns the plan to use for a new query.
|
public static final NoSpeculativeExecutionPolicy INSTANCE
public SpeculativeExecutionPolicy.SpeculativeExecutionPlan newPlan(String loggedKeyspace, Statement statement)
SpeculativeExecutionPolicy
newPlan
in interface SpeculativeExecutionPolicy
loggedKeyspace
- the currently logged keyspace (the one set through either
Cluster.connect(String)
or by manually doing a USE
query) for
the session on which this plan need to be built. This can be null
if
the corresponding session has no keyspace logged in.statement
- the query for which to build a plan.public void init(Cluster cluster)
SpeculativeExecutionPolicy
init
in interface SpeculativeExecutionPolicy
cluster
- the cluster that this policy is associated with.public void close()
SpeculativeExecutionPolicy
close
in interface SpeculativeExecutionPolicy
Copyright © 2012–2018. All rights reserved.