Package | Description |
---|---|
com.datastax.driver.core |
The main package for the DataStax Java driver for Cassandra.
|
com.datastax.driver.core.policies |
Policies that allow to control some of the behavior of the DataStax Java driver for Cassandra.
|
com.datastax.driver.core.querybuilder |
A CQL3 query builder.
|
Modifier and Type | Class and Description |
---|---|
class |
BatchStatement
A statement that group a number of
Statement so they get executed as
a batch. |
class |
BoundStatement
A prepared statement with values bound to the bind variables.
|
class |
RegularStatement
A regular (non-prepared and non batched) CQL statement.
|
class |
SimpleStatement
A simple
RegularStatement implementation built directly from a query
string. |
class |
StatementWrapper
Base class for custom
Statement implementations that wrap another statement. |
Modifier and Type | Method and Description |
---|---|
Statement |
StatementWrapper.disableTracing() |
Statement |
Statement.disableTracing()
Disables tracing for this query.
|
Statement |
StatementWrapper.enableTracing() |
Statement |
Statement.enableTracing()
Enables tracing for this query.
|
Statement |
StatementWrapper.setConsistencyLevel(ConsistencyLevel consistency) |
Statement |
Statement.setConsistencyLevel(ConsistencyLevel consistency)
Sets the consistency level for the query.
|
Statement |
StatementWrapper.setFetchSize(int fetchSize) |
Statement |
Statement.setFetchSize(int fetchSize)
Sets the query fetch size.
|
Statement |
Statement.setIdempotent(boolean idempotent)
Sets whether this statement is idempotent.
|
Statement |
StatementWrapper.setPagingState(PagingState pagingState) |
Statement |
Statement.setPagingState(PagingState pagingState)
Sets the paging state.
|
Statement |
Statement.setPagingStateUnsafe(byte[] pagingState)
Sets the paging state.
|
Statement |
StatementWrapper.setRetryPolicy(RetryPolicy policy) |
Statement |
Statement.setRetryPolicy(RetryPolicy policy)
Sets the retry policy to use for this query.
|
Statement |
StatementWrapper.setSerialConsistencyLevel(ConsistencyLevel serialConsistency) |
Statement |
Statement.setSerialConsistencyLevel(ConsistencyLevel serialConsistency)
Sets the serial consistency level for the query.
|
Statement |
BatchStatement.setSerialConsistencyLevel(ConsistencyLevel serialConsistency)
Throws an
UnsupportedOperationException as setting the serial consistency is
currently not supported for protocol batches by Cassandra. |
Modifier and Type | Method and Description |
---|---|
Collection<Statement> |
BatchStatement.getStatements()
The statements that have been added to this batch so far.
|
Modifier and Type | Method and Description |
---|---|
BatchStatement |
BatchStatement.add(Statement statement)
Adds a new statement to this batch.
|
protected int |
QueryLogger.append(Statement statement,
StringBuilder buffer,
int remaining) |
ResultSet |
Session.execute(Statement statement)
Executes the provided query.
|
ResultSet |
AbstractSession.execute(Statement statement)
Executes the provided query.
|
ResultSetFuture |
Session.executeAsync(Statement statement)
Executes the provided query asynchronously.
|
protected void |
QueryLogger.logQuery(Statement statement,
Exception exception,
org.slf4j.Logger logger,
String message) |
protected void |
QueryLogger.maybeLogErrorQuery(Host host,
Statement statement,
Exception exception,
long latencyMs) |
protected abstract void |
QueryLogger.maybeLogNormalOrSlowQuery(Host host,
Statement statement,
long latencyMs) |
protected void |
QueryLogger.ConstantThresholdQueryLogger.maybeLogNormalOrSlowQuery(Host host,
Statement statement,
long latencyMs) |
protected void |
QueryLogger.DynamicThresholdQueryLogger.maybeLogNormalOrSlowQuery(Host host,
Statement statement,
long latencyMs) |
protected void |
QueryLogger.maybeLogNormalQuery(Host host,
Statement statement,
long latencyMs) |
protected void |
QueryLogger.ConstantThresholdQueryLogger.maybeLogSlowQuery(Host host,
Statement statement,
long latencyMs) |
protected void |
QueryLogger.DynamicThresholdQueryLogger.maybeLogSlowQuery(Host host,
Statement statement,
long latencyMs,
long threshold) |
protected String |
QueryLogger.statementAsString(Statement statement) |
void |
QueryLogger.update(Host host,
Statement statement,
Exception exception,
long newLatencyNanos)
A method that is called after each request to a Cassandra node with
the duration of that operation.
|
void |
PerHostPercentileTracker.update(Host host,
Statement statement,
Exception exception,
long newLatencyNanos) |
void |
LatencyTracker.update(Host host,
Statement statement,
Exception exception,
long newLatencyNanos)
A method that is called after each request to a Cassandra node with
the duration of that operation.
|
Modifier and Type | Method and Description |
---|---|
BatchStatement |
BatchStatement.addAll(Iterable<? extends Statement> statements)
Adds multiple statements to this batch.
|
Constructor and Description |
---|
StatementWrapper(Statement wrapped)
Builds a new instance.
|
Modifier and Type | Method and Description |
---|---|
SpeculativeExecutionPolicy.SpeculativeExecutionPlan |
SpeculativeExecutionPolicy.newPlan(String loggedKeyspace,
Statement statement)
Returns the plan to use for a new query.
|
SpeculativeExecutionPolicy.SpeculativeExecutionPlan |
PercentileSpeculativeExecutionPolicy.newPlan(String loggedKeyspace,
Statement statement) |
SpeculativeExecutionPolicy.SpeculativeExecutionPlan |
NoSpeculativeExecutionPolicy.newPlan(String loggedKeyspace,
Statement statement) |
SpeculativeExecutionPolicy.SpeculativeExecutionPlan |
ConstantSpeculativeExecutionPolicy.newPlan(String loggedKeyspace,
Statement statement) |
Iterator<Host> |
TokenAwarePolicy.newQueryPlan(String loggedKeyspace,
Statement statement)
Returns the hosts to use for a new query.
|
Iterator<Host> |
RoundRobinPolicy.newQueryPlan(String loggedKeyspace,
Statement statement)
Returns the hosts to use for a new query.
|
Iterator<Host> |
LoadBalancingPolicy.newQueryPlan(String loggedKeyspace,
Statement statement)
Returns the hosts to use for a new query.
|
Iterator<Host> |
LatencyAwarePolicy.newQueryPlan(String loggedKeyspace,
Statement statement)
Returns the hosts to use for a new query.
|
Iterator<Host> |
HostFilterPolicy.newQueryPlan(String loggedKeyspace,
Statement statement)
Returns the hosts to use for a new query.
|
Iterator<Host> |
DCAwareRoundRobinPolicy.newQueryPlan(String loggedKeyspace,
Statement statement)
Returns the hosts to use for a new query.
|
RetryPolicy.RetryDecision |
RetryPolicy.onReadTimeout(Statement statement,
ConsistencyLevel cl,
int requiredResponses,
int receivedResponses,
boolean dataRetrieved,
int nbRetry)
Defines whether to retry and at which consistency level on a read timeout.
|
RetryPolicy.RetryDecision |
LoggingRetryPolicy.onReadTimeout(Statement statement,
ConsistencyLevel cl,
int requiredResponses,
int receivedResponses,
boolean dataRetrieved,
int nbRetry) |
RetryPolicy.RetryDecision |
FallthroughRetryPolicy.onReadTimeout(Statement statement,
ConsistencyLevel cl,
int requiredResponses,
int receivedResponses,
boolean dataRetrieved,
int nbRetry)
Defines whether to retry and at which consistency level on a read timeout.
|
RetryPolicy.RetryDecision |
DowngradingConsistencyRetryPolicy.onReadTimeout(Statement statement,
ConsistencyLevel cl,
int requiredResponses,
int receivedResponses,
boolean dataRetrieved,
int nbRetry)
Defines whether to retry and at which consistency level on a read timeout.
|
RetryPolicy.RetryDecision |
DefaultRetryPolicy.onReadTimeout(Statement statement,
ConsistencyLevel cl,
int requiredResponses,
int receivedResponses,
boolean dataRetrieved,
int nbRetry)
Defines whether to retry and at which consistency level on a read timeout.
|
RetryPolicy.RetryDecision |
RetryPolicy.onUnavailable(Statement statement,
ConsistencyLevel cl,
int requiredReplica,
int aliveReplica,
int nbRetry)
Defines whether to retry and at which consistency level on an
unavailable exception.
|
RetryPolicy.RetryDecision |
LoggingRetryPolicy.onUnavailable(Statement statement,
ConsistencyLevel cl,
int requiredReplica,
int aliveReplica,
int nbRetry) |
RetryPolicy.RetryDecision |
FallthroughRetryPolicy.onUnavailable(Statement statement,
ConsistencyLevel cl,
int requiredReplica,
int aliveReplica,
int nbRetry)
Defines whether to retry and at which consistency level on an
unavailable exception.
|
RetryPolicy.RetryDecision |
DowngradingConsistencyRetryPolicy.onUnavailable(Statement statement,
ConsistencyLevel cl,
int requiredReplica,
int aliveReplica,
int nbRetry)
Defines whether to retry and at which consistency level on an
unavailable exception.
|
RetryPolicy.RetryDecision |
DefaultRetryPolicy.onUnavailable(Statement statement,
ConsistencyLevel cl,
int requiredReplica,
int aliveReplica,
int nbRetry)
Defines whether to retry and at which consistency level on an
unavailable exception.
|
RetryPolicy.RetryDecision |
RetryPolicy.onWriteTimeout(Statement statement,
ConsistencyLevel cl,
WriteType writeType,
int requiredAcks,
int receivedAcks,
int nbRetry)
Defines whether to retry and at which consistency level on a write timeout.
|
RetryPolicy.RetryDecision |
LoggingRetryPolicy.onWriteTimeout(Statement statement,
ConsistencyLevel cl,
WriteType writeType,
int requiredAcks,
int receivedAcks,
int nbRetry) |
RetryPolicy.RetryDecision |
FallthroughRetryPolicy.onWriteTimeout(Statement statement,
ConsistencyLevel cl,
WriteType writeType,
int requiredAcks,
int receivedAcks,
int nbRetry)
Defines whether to retry and at which consistency level on a write timeout.
|
RetryPolicy.RetryDecision |
DowngradingConsistencyRetryPolicy.onWriteTimeout(Statement statement,
ConsistencyLevel cl,
WriteType writeType,
int requiredAcks,
int receivedAcks,
int nbRetry)
Defines whether to retry and at which consistency level on a write timeout.
|
RetryPolicy.RetryDecision |
DefaultRetryPolicy.onWriteTimeout(Statement statement,
ConsistencyLevel cl,
WriteType writeType,
int requiredAcks,
int receivedAcks,
int nbRetry)
Defines whether to retry and at which consistency level on a write timeout.
|
Modifier and Type | Class and Description |
---|---|
class |
Batch
A built BATCH statement.
|
static class |
Batch.Options
The options of a BATCH statement.
|
class |
BuiltStatement
Common ancestor to the query builder built statements.
|
class |
Delete
A built DELETE statement.
|
static class |
Delete.Conditions
Conditions for a DELETE statement.
|
static class |
Delete.Options
The options of a DELETE statement.
|
static class |
Delete.Where
The WHERE clause of a DELETE statement.
|
class |
Insert
A built INSERT statement.
|
static class |
Insert.Options
The options of an INSERT statement.
|
class |
Select
A built SELECT statement.
|
static class |
Select.Where
The WHERE clause of a SELECT statement.
|
class |
Truncate
A built TRUNCATE statement.
|
class |
Update
A built UPDATE statement.
|
static class |
Update.Assignments
The assignments of an UPDATE statement.
|
static class |
Update.Conditions
Conditions for an UPDATE statement.
|
static class |
Update.IfExists |
static class |
Update.Options
The options of a UPDATE statement.
|
static class |
Update.Where
The WHERE clause of an UPDATE statement.
|
Copyright © 2012–2015. All rights reserved.