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.
|
com.datastax.driver.core.schemabuilder |
A CQL3 schema builder.
|
com.datastax.driver.mapping |
Modifier and Type | Class and Description |
---|---|
class |
BatchStatement
A statement that groups 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 |
ExecutionInfo.getStatement()
Get the statement that has been executed.
|
Statement |
StatementWrapper.setConsistencyLevel(ConsistencyLevel consistency) |
Statement |
Statement.setConsistencyLevel(ConsistencyLevel consistency)
Sets the consistency level for the query.
|
Statement |
Statement.setDefaultTimestamp(long defaultTimestamp)
Sets the default timestamp for this query (in microseconds since the epoch).
|
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.
|
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) |
protected abstract Object |
PercentileTracker.computeKey(Host host,
Statement statement,
Exception exception)
Computes a key used to categorize measurements.
|
protected Host |
PerHostPercentileTracker.computeKey(Host host,
Statement statement,
Exception exception) |
protected Cluster |
ClusterWidePercentileTracker.computeKey(Host host,
Statement statement,
Exception exception) |
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.
|
long |
PercentileTracker.getLatencyAtPercentile(Host host,
Statement statement,
Exception exception,
double percentile)
Returns the request latency at a given percentile.
|
protected boolean |
PercentileTracker.include(Host host,
Statement statement,
Exception exception)
Determines whether a particular measurement should be included.
|
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 |
PercentileTracker.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 |
---|---|
protected boolean |
IdempotenceAwareRetryPolicy.isIdempotent(Statement statement)
Determines whether the given statement is idempotent or not.
|
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 |
IdempotenceAwareRetryPolicy.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 |
LoggingRetryPolicy.onRequestError(Statement statement,
ConsistencyLevel cl,
Exception e,
int nbRetry) |
RetryPolicy.RetryDecision |
IdempotenceAwareRetryPolicy.onRequestError(Statement statement,
ConsistencyLevel cl,
Exception e,
int nbRetry) |
RetryPolicy.RetryDecision |
FallthroughRetryPolicy.onRequestError(Statement statement,
ConsistencyLevel cl,
Exception e,
int nbRetry)
Defines whether to retry and at which consistency level on an
unexpected error.
|
RetryPolicy.RetryDecision |
ExtendedRetryPolicy.onRequestError(Statement statement,
ConsistencyLevel cl,
Exception e,
int nbRetry)
Defines whether to retry and at which consistency level on an
unexpected error.
|
RetryPolicy.RetryDecision |
DowngradingConsistencyRetryPolicy.onRequestError(Statement statement,
ConsistencyLevel cl,
Exception e,
int nbRetry)
Defines whether to retry and at which consistency level on an
unexpected error.
|
RetryPolicy.RetryDecision |
DefaultRetryPolicy.onRequestError(Statement statement,
ConsistencyLevel cl,
Exception e,
int nbRetry)
Defines whether to retry and at which consistency level on an
unexpected error.
|
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 |
IdempotenceAwareRetryPolicy.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 |
IdempotenceAwareRetryPolicy.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.
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractCreateStatement<T extends AbstractCreateStatement<T>> |
static class |
Alter.Options
The table options of an ALTER TABLE statement.
|
class |
Create
A built CREATE TABLE statement.
|
static class |
Create.Options
The table options of a CREATE TABLE statement.
|
class |
CreateType
A built CREATE TYPE statement.
|
class |
Drop
A built DROP statement.
|
class |
DropKeyspace
A built DROP KEYSPACE statement.
|
class |
KeyspaceOptions
The keyspace options used in CREATE KEYSPACE or ALTER KEYSPACE statements.
|
class |
SchemaStatement
A DDL statement generated by
SchemaBuilder . |
class |
TableOptions<T extends TableOptions>
The table options used in a CREATE TABLE or ALTER TABLE statement.
|
Modifier and Type | Method and Description |
---|---|
Statement |
Mapper.deleteQuery(Object... objects)
Creates a query that can be used to delete an entity given its PRIMARY KEY.
|
Statement |
Mapper.deleteQuery(T entity)
Creates a query that can be used to delete the provided entity.
|
Statement |
Mapper.deleteQuery(T entity,
Mapper.Option... options)
Creates a query that can be used to delete the provided entity.
|
Statement |
Mapper.getQuery(Object... objects)
Creates a query to fetch entity given its PRIMARY KEY.
|
Statement |
Mapper.saveQuery(T entity)
Creates a query that can be used to save the provided entity.
|
Statement |
Mapper.saveQuery(T entity,
Mapper.Option... options)
Creates a query that can be used to save the provided entity.
|