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.
|
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 |
StatementWrapper.setDefaultTimestamp(long defaultTimestamp) |
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 |
StatementWrapper.setHost(Host host) |
Statement |
Statement.setHost(Host host)
Sets the
Host that should handle this query. |
Statement |
StatementWrapper.setIdempotent(boolean idempotent) |
Statement |
Statement.setIdempotent(boolean idempotent)
Sets whether this statement is idempotent.
|
Statement |
StatementWrapper.setOutgoingPayload(Map<String,ByteBuffer> payload) |
Statement |
Statement.setOutgoingPayload(Map<String,ByteBuffer> payload)
Set the given outgoing payload on this statement.
|
Statement |
StatementWrapper.setPagingState(PagingState pagingState) |
Statement |
Statement.setPagingState(PagingState pagingState)
Sets the paging state.
|
Statement |
StatementWrapper.setPagingState(PagingState pagingState,
CodecRegistry codecRegistry) |
Statement |
Statement.setPagingState(PagingState pagingState,
CodecRegistry codecRegistry)
Sets the paging state.
|
Statement |
StatementWrapper.setPagingStateUnsafe(byte[] pagingState) |
Statement |
Statement.setPagingStateUnsafe(byte[] pagingState)
Sets the paging state.
|
Statement |
StatementWrapper.setReadTimeoutMillis(int readTimeoutMillis) |
Statement |
Statement.setReadTimeoutMillis(int readTimeoutMillis)
Overrides the default per-host read timeout (
SocketOptions.getReadTimeoutMillis() ) for
this statement. |
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 Cluster |
ClusterWidePercentileTracker.computeKey(Host host,
Statement statement,
Exception exception) |
protected Host |
PerHostPercentileTracker.computeKey(Host host,
Statement statement,
Exception exception) |
protected abstract Object |
PercentileTracker.computeKey(Host host,
Statement statement,
Exception exception)
Computes a key used to categorize measurements.
|
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 |
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.
|
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) |
Modifier and Type | Method and Description |
---|---|
BatchStatement |
BatchStatement.addAll(Iterable<? extends Statement> statements)
Adds multiple statements to this batch.
|
protected static Boolean |
Statement.isBatchIdempotent(Collection<? extends Statement> statements) |
Constructor and Description |
---|
StatementWrapper(Statement wrapped)
Builds a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
IdempotenceAwareRetryPolicy.isIdempotent(Statement statement)
Deprecated.
Determines whether the given statement is idempotent or not.
|
SpeculativeExecutionPolicy.SpeculativeExecutionPlan |
PercentileSpeculativeExecutionPolicy.newPlan(String loggedKeyspace,
Statement statement) |
SpeculativeExecutionPolicy.SpeculativeExecutionPlan |
SpeculativeExecutionPolicy.newPlan(String loggedKeyspace,
Statement statement)
Returns the plan to use for a new query.
|
SpeculativeExecutionPolicy.SpeculativeExecutionPlan |
NoSpeculativeExecutionPolicy.newPlan(String loggedKeyspace,
Statement statement) |
SpeculativeExecutionPolicy.SpeculativeExecutionPlan |
ConstantSpeculativeExecutionPolicy.newPlan(String loggedKeyspace,
Statement statement) |
Iterator<Host> |
LoadBalancingPolicy.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> |
LatencyAwarePolicy.newQueryPlan(String loggedKeyspace,
Statement statement)
Returns the hosts to use for a new query.
|
Iterator<Host> |
ErrorAwarePolicy.newQueryPlan(String loggedKeyspace,
Statement statement) |
Iterator<Host> |
DCAwareRoundRobinPolicy.newQueryPlan(String loggedKeyspace,
Statement statement)
Returns the hosts to use for a new query.
|
Iterator<Host> |
TokenAwarePolicy.newQueryPlan(String loggedKeyspace,
Statement statement)
Returns the hosts to use for a new query.
|
Iterator<Host> |
PagingOptimizingLoadBalancingPolicy.newQueryPlan(String loggedKeyspace,
Statement statement) |
Iterator<Host> |
HostFilterPolicy.newQueryPlan(String loggedKeyspace,
Statement statement)
Returns the hosts to use for a new query.
|
RetryPolicy.RetryDecision |
IdempotenceAwareRetryPolicy.onReadTimeout(Statement statement,
ConsistencyLevel cl,
int requiredResponses,
int receivedResponses,
boolean dataRetrieved,
int nbRetry)
Deprecated.
|
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 |
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 |
DowngradingConsistencyRetryPolicy.onReadTimeout(Statement statement,
ConsistencyLevel cl,
int requiredResponses,
int receivedResponses,
boolean dataRetrieved,
int nbRetry)
Deprecated.
Defines whether to retry and at which consistency level on a read timeout.
|
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 |
IdempotenceAwareRetryPolicy.onRequestError(Statement statement,
ConsistencyLevel cl,
DriverException e,
int nbRetry)
Deprecated.
|
RetryPolicy.RetryDecision |
RetryPolicy.onRequestError(Statement statement,
ConsistencyLevel cl,
DriverException e,
int nbRetry)
Defines whether to retry and at which consistency level on an unexpected error.
|
RetryPolicy.RetryDecision |
LoggingRetryPolicy.onRequestError(Statement statement,
ConsistencyLevel cl,
DriverException e,
int nbRetry) |
RetryPolicy.RetryDecision |
DefaultRetryPolicy.onRequestError(Statement statement,
ConsistencyLevel cl,
DriverException e,
int nbRetry)
Defines whether to retry and at which consistency level on an unexpected error.
|
RetryPolicy.RetryDecision |
DowngradingConsistencyRetryPolicy.onRequestError(Statement statement,
ConsistencyLevel cl,
DriverException e,
int nbRetry)
Deprecated.
Defines whether to retry and at which consistency level on an unexpected error.
|
RetryPolicy.RetryDecision |
FallthroughRetryPolicy.onRequestError(Statement statement,
ConsistencyLevel cl,
DriverException e,
int nbRetry)
Defines whether to retry and at which consistency level on an unexpected error.
|
RetryPolicy.RetryDecision |
IdempotenceAwareRetryPolicy.onUnavailable(Statement statement,
ConsistencyLevel cl,
int requiredReplica,
int aliveReplica,
int nbRetry)
Deprecated.
|
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 |
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 |
DowngradingConsistencyRetryPolicy.onUnavailable(Statement statement,
ConsistencyLevel cl,
int requiredReplica,
int aliveReplica,
int nbRetry)
Deprecated.
Defines whether to retry and at which consistency level on an unavailable exception.
|
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 |
IdempotenceAwareRetryPolicy.onWriteTimeout(Statement statement,
ConsistencyLevel cl,
WriteType writeType,
int requiredAcks,
int receivedAcks,
int nbRetry)
Deprecated.
|
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 |
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.
|
RetryPolicy.RetryDecision |
DowngradingConsistencyRetryPolicy.onWriteTimeout(Statement statement,
ConsistencyLevel cl,
WriteType writeType,
int requiredAcks,
int receivedAcks,
int nbRetry)
Deprecated.
Defines whether to retry and at which consistency level on a write timeout.
|
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.
|
boolean |
ErrorAwarePolicy.ErrorFilter.shouldConsiderError(Exception e,
Host host,
Statement statement)
Whether an error should be counted in the host's error rate.
|
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 statements generated with the
QueryBuilder . |
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.
|
Copyright © 2012–2024. All rights reserved.