Cassandra Namespace |
Class | Description | |
---|---|---|
AggregateMetadata |
Describes a CQL aggregate.
| |
AlreadyExistsException |
Exception thrown when a query attemps to create a keyspace or table that
already exists.
| |
AuthenticationException |
Indicates an error during the authentication phase while connecting to a node.
| |
BatchStatement |
A statement that groups a number of BoundStatement and / or SimpleStatement so they get executed as a batch.
| |
BigIntegerTypeAdapter | ||
BoundStatement |
A prepared statement with values bound to the bind variables. Once a BoundStatement has values for all the variables of the PreparedStatement it has been created from, it can executed (through Execute(IStatement)). The values of a BoundStatement can be set by either index or name. When setting them by name, names follow the case insensitivity rules explained in ColumnDefinitions. Note-worthily, if multiple bind variables correspond to the same column (as would be the case if you prepare SELECT * FROM t WHERE x > ? AND x < ?), you will have to set values by indexes (or the PreparedStatement.Bind(object[]) method) as the methods to set by name only allows to set the first prepared occurrence of the column. | |
Builder |
Helper class to build Cluster instances.
| |
CassandraConnectionStringBuilder | ||
ClientOptions |
Additional options of the .net Cassandra driver.
| |
Cluster |
Implementation of ICluster | |
ColumnDesc |
Represents the information for a given data type
| |
Configuration |
The configuration of the cluster. This handle setting:
| |
ConstantReconnectionPolicy |
A reconnection policy that waits a constant time between each reconnection attempt.
| |
ConstantSpeculativeExecutionPolicy |
A ISpeculativeExecutionPolicy that schedules a given number of speculative
executions, separated by a fixed delay.
| |
CqlColumn | ||
CustomColumnInfo | ||
DataCollectionMetadata |
Describes a table or materialized view in Cassandra
| |
DCAwareRoundRobinPolicy |
A data-center aware Round-robin load balancing policy. This policy provides round-robin queries over the node of the local datacenter. It also includes in the query plans returned a configurable number of hosts in the remote datacenters, but those are always tried after the local nodes. In other words, this policy guarantees that no host in a remote datacenter will be queried unless no host in the local datacenter can be reached. If used with a single datacenter, this policy is equivalent to the RoundRobinPolicy policy, but its GetDatacenter awareness incurs a slight overhead so the RoundRobinPolicy policy could be preferred to this policy in that case. | |
DecimalTypeAdapter | ||
DefaultRetryPolicy |
The default retry policy. This policy retries queries in only two cases:
This retry policy is conservative in that it will never retry with a different consistency level than the one of the initial operation. In some cases, it may be convenient to use a more aggressive retry policy like DowngradingConsistencyRetryPolicy. | |
Diagnostics |
Provides a set of methods and properties related to logging in the driver.
| |
DowngradingConsistencyRetryPolicy |
A retry policy that sometimes retry with a lower consistency level than the
one initially requested. BEWARE: This policy may retry queries using a lower consistency level than the one initially requested. By doing so, it may break consistency guarantees. In other words, if you use this retry policy, there is cases (documented below) where a read at Quorum may not see a preceding write at Quorum. Do not use this policy unless you have understood the cases where this can happen and are OK with that. It is also highly recommended to always wrap this policy into LoggingRetryPolicy to log the occurrences of such consistency break. This policy : the same retries than the DefaultRetryPolicy policy. But on top of that, it also retries in the following cases:
The reasoning behind this retry policy is the following one. If, based on the information the Cassandra coordinator node returns, retrying the operation with the initially requested consistency has a change to succeed, do it. Otherwise, if based on these informations we know the initially requested consistency level cannot be achieve currently, then:
| |
DriverException |
Top level class for exceptions thrown by the driver.
| |
DriverInternalError |
An unexpected error happened internally. This should never be raise and
indicates an unexpected behavior (either in the driver or in Cassandra).
| |
DseAuthProvider |
AuthProvider which supplies authenticator instances for clients to connect to
DSE clusters secured with Kerberos. See KerberosAuthenticator
for how to configure client side Kerberos options. To connect to clusters
using internal authentication, use the standard method for setting
credentials. eg: Cluster cluster = Cluster.builder() .addContactPoint(hostname) .withCredentials("username", "password") .build(); | |
DynamicCompositeTypeAdapter | ||
ExecutionException | ||
ExecutionInfo |
Basic information on the execution of a query. This provides the following information on the execution of a (successful) query:
| |
ExponentialReconnectionPolicy |
A reconnection policy that waits exponentially longer between each
reconnection attempt (but keeps a constant delay once a maximum delay is
reached).
| |
FallthroughRetryPolicy |
A retry policy that never retry (nor ignore). All of the methods of this retry policy unconditionally return RetryPolicy.RetryDecision#rethrow. If this policy is used, retry will have to be implemented in business code. | |
FixedReconnectionPolicy |
Represents a reconnection policy that is possible to specify custom reconnection delays for each attempt.
| |
FunctionFailureException |
Specifies a User defined function execution failure.
| |
FunctionMetadata |
Describes a CQL function.
| |
Host |
Represents a Cassandra node.
| |
HostsEventArgs | ||
IdempotenceAwareRetryPolicy |
A retry policy that avoids retrying non-idempotent statements.
In case of write timeouts this policy will always return Rethrow if the statement is considered non-idempotent (see IsIdempotent). For all other cases, this policy delegates the decision to the child policy. | |
IndexMetadata |
A representation of a secondary index in Cassandra
| |
InvalidConfigurationInQueryException |
A specific invalid query exception that indicates that the query is invalid
because of some configuration problem. This is generally throw by query that manipulate the schema (CREATE and ALTER) when the required configuration options are invalid. | |
InvalidQueryException |
Indicates a syntactically correct but invalid query.
| |
InvalidTypeException |
Exception that is thrown when the driver expected a type and other was provided
| |
IsBootstrappingException | ||
KerberosAuthenticator |
Responsible for authenticating with secured DSE services using Kerberos over
SSPI
| |
KeyspaceMetadata | ||
ListColumnInfo | ||
LocalDate |
A date without a time-zone in the ISO-8601 calendar system.
LocalDate is an immutable date-time object that represents a date, often viewed as year-month-day.
This class is implemented to match the Date representation CQL string literals.
| |
LocalTime |
A time without a time-zone in the ISO-8601 calendar system, such as 10:30:05.
LocalTime is an immutable date-time object that represents a time, often viewed as hour-minute-second.
Time is represented to nanosecond precision. For example, the value "13:45.30.123456789" can be stored in a LocalTime.
| |
Logger |
Represents a driver Logger
| |
LoggingRetryPolicy |
A retry policy that wraps another policy, logging the decision made by its
sub-policy. Note that this policy only log the Ignore and Retry decisions (since Rethrow decisions just amount to propate the cassandra exception). The logging is done at the Info level. | |
MapColumnInfo | ||
MaterializedViewMetadata |
Describes a materialized view in Cassandra.
| |
Metadata |
Keeps metadata on the connected cluster, including known nodes and schema
definitions.
| |
NoHostAvailableException |
Exception thrown when a query cannot be performed because no host are
available. This exception is thrown if
| |
NoneAuthProvider |
A provider that provides no authentication capability. This is only useful as a placeholder when no authentication is to be used. | |
NoSpeculativeExecutionPolicy |
A ISpeculativeExecutionPolicy that never schedules speculative executions.
| |
NullTypeAdapter | ||
OperationTimedOutException |
Exception that thrown on a client-side timeout, when the client didn't hear back from the server within ReadTimeoutMillis.
| |
OverloadedException | ||
PlainTextAuthProvider |
A simple IAuthProvider implementation.
This provider allows to programmatically define authentication information that will then apply to all hosts. The PlainTextAuthenticator instances it returns support SASL authentication using the PLAIN mechanism for version 2 or above of the CQL native protocol. | |
Policies |
Policies configured for a Cluster
instance.
| |
PoolingOptions | Represents the options related to connection pooling. For each host selected by the load balancing policy, the driver keeps a core amount of connections open at all times (GetCoreConnectionsPerHost(HostDistance)). If the use of those connections reaches a configurable threshold (GetMaxSimultaneousRequestsPerConnectionTreshold(HostDistance)), more connections are created up to the configurable maximum number of connections (GetMaxConnectionPerHost(HostDistance)). The driver uses connections in an asynchronous manner and multiple requests can be submitted on the same connection at the same time without waiting for a response. This means that the driver only needs to maintain a relatively small number of connections to each Cassandra host. The PoolingOptions allows you to to control how many connections are kept per host. Each of these parameters can be separately set for Local and Remote hosts. For Ignored hosts, the default for all those settings is 0 and cannot be changed. The default amount of connections depend on the Cassandra version of the Cluster, as newer versions of Cassandra (2.1 and above) support a higher number of in-flight requests. For Cassandra 2.1 and above, the default amount of connections per host are:
For older Cassandra versions (1.2 and 2.0), the default amount of connections per host are:
| |
PreparedQueryNotFoundException | ||
PreparedStatement |
Represents a prepared statement, a query with bound variables that has been
prepared (pre-parsed) by the database. A prepared statement can be executed once concrete values has been provided for the bound variables. The pair of a prepared statement and values for its bound variables is a BoundStatement and can be executed (by Session#Execute). | |
ProtocolErrorException | ||
ProtocolOptions |
Options of the Cassandra __native__ binary protocol.
| |
QueryExecutionException |
Exception related to the execution of a query. This correspond to the
exception that Cassandra throw when a (valid) query cannot be executed
(TimeoutException, UnavailableException, ...).
| |
QueryOptions |
Options related to defaults for individual queries.
| |
QueryProtocolOptions | ||
QueryTimeoutException |
A Cassandra timeout during a query. Such an exception is returned when the
query has been tried by Cassandra but cannot be achieved with the requested
consistency level within the rpc timeout set for Cassandra.
| |
QueryTrace |
The Cassandra trace for a query.
The trace is generated by Cassandra when query tracing is enabled for the query. The trace itself is stored in Cassandra in the sessions and events table in the system_traces keyspace and can be retrieve manually using the trace identifier (the one returned by TraceId). | |
QueryTraceEvent |
A trace event.
A query trace is composed of a list of trace events. | |
QueryValidationException |
An exception indicating that a query cannot be executed because it is
incorrect syntactically, invalid, unauthorized or any other reason.
| |
ReadFailureException |
A Cassandra failure (non-timeout) during a read query.
| |
ReadTimeoutException |
A Cassandra timeout during a read query.
| |
RegularStatement |
A non-prepared CQL statement.
This class represents a query string along with query options. This class can be extended but
SimpleStatement is provided to build a IStatement
directly from its query string.
| |
ReplicationStrategies |
Provides utility methods to build replication strategies when creating a keyspace
| |
RequestInvalidException |
Exception that indicates that the request is not valid.
| |
RetryDecision |
A retry decision to adopt on a Cassandra exception (read/write timeout or
unavailable exception). There is three possible decision:
| |
RetryLoadBalancingPolicy | ||
RetryLoadBalancingPolicyEventArgs | ||
RoundRobinPolicy |
A Round-robin load balancing policy.
This policy queries nodes in a round-robin fashion. For a given query, if an host fail, the next one (following the round-robin order) is tried, until all hosts have been tried. This policy is not datacenter aware and will include every known Cassandra host in its round robin algorithm. If you use multiple datacenter this will be inefficient and you will want to use the DCAwareRoundRobinPolicy load balancing policy instead. | |
RoutingKey |
Routing key using to determine the node for each partition
| |
Row |
Represents an CQL row
| |
RowSet |
Represents a result of a query returned by Cassandra.
The retrieval of the rows of a RowSet is generally paged (a first page of result is fetched and the next one is only fetched once all the results of the first one has been consumed). The size of the pages can be configured either globally through SetPageSize(Int32) or per-statement with SetPageSize(Int32). Though new pages are automatically (and transparently) fetched when needed, it is possible to force the retrieval of the next page early through FetchMoreResults. The RowSet dequeues Row items while iterated. Parallel enumerations is supported and thread-safe. After a full enumeration of this instance, following enumerations will be empty, as all rows have been dequeued. | |
RowSetMetadata |
Represents the information of columns and other state values associated with a RowSet
| |
SchemaChangedEventArgs | ||
ServerErrorException | ||
Session |
Implementation of ISession.
| |
SetColumnInfo | ||
SimpleDseCredentialsResolver | ||
SimpleStatement |
A simple IStatement implementation built directly from a query string.
| |
SocketOptions |
Options to configure low-level socket options for the connections kept to the
Cassandra hosts.
| |
SSLOptions |
Defines the SSL/TLS options to connect to a ssl enabled Cassandra host
| |
Statement |
Base class for statements that contains the options.
| |
SyntaxError |
Indicates a syntax error in a query.
| |
TableColumn |
Represents a table column information
| |
TableMetadata |
Describes a Cassandra table
| |
TableOptions | ||
TokenAwarePolicy |
A wrapper load balancing policy that add token awareness to a child policy.
This policy encapsulates another policy. The resulting policy works in the following way:
Do note that only replica for which the child policy distance method returns HostDistance.Local will be considered having priority. For example, if you wrap DCAwareRoundRobinPolicy with this token aware policy, replicas from remote data centers may only be returned after all the host of the local data center. | |
ToManyConnectionsPerHost | ||
TraceRetrievalException |
Exception thrown if a query trace cannot be retrieved.
| |
TruncateException |
Error during a truncation operation.
| |
TupleColumnInfo |
Represents the information associated with a tuple column.
| |
TypeAdapters |
TypeAdapters are deprecated and will be removed in future versions. Use TypeSerializerT instead.
Backwards compatibility only. | |
UdtColumnInfo |
Represents the type information associated with a User Defined Type
| |
UdtMap |
Represents a map between a user defined type in Cassandra and a .NET Type, with data on how
to map field names in the UDT to .NET property names.
| |
UdtMapT |
Represents a map between a UDT in Cassandra and a .NET Type, including data on how to map from UDT field names
to Properties on the .NET Type.
| |
UdtMappingDefinitions |
Allows configuration of user defined types.
| |
UnauthorizedException |
Indicates that a query cannot be performed due to the authorisation restrictions of the logged user.
| |
UnavailableException |
Exception thrown when the coordinator knows there is not enough replica alive
to perform a query with the requested consistency level.
| |
Unset |
The Unset class represents a unspecified value.
In Cassandra 2.2 and above, when executing a UPDATE or INSERT query, a parameter can be unset. Designed to avoid tombstones, setting a parameter value to Unset will make Cassandra to ignore it. Remarks
In some cases, we might be inserting rows using null for values that are not specified, and even though our intention is to leave the value empty, Cassandra will represent it as a tombstone causing an unnecessary overhead.
To avoid tombstones, in previous versions of Cassandra, you can use different query combinations only containing the fields that have a value.
The Unset type is a singleton class, which means only one Unset object exists. The Unset.Value member represents the sole Unset object. | |
WriteFailureException |
A Cassandra failure (non-timeout) during a write query.
| |
WriteTimeoutException |
A Cassandra timeout during a write query.
|
Structure | Description | |
---|---|---|
TimeUuid |
Represents a v1 uuid
|
Interface | Description | |
---|---|---|
IAddressTranslator |
Translates IP addresses received from Cassandra nodes into locally queriable addresses.
| |
IAuthenticator |
Handles SASL authentication with Cassandra servers. A server which requires
authentication responds to a startup message with an challenge in the form of
an AuthenticateMessage. Authenticator implementations should be
able to respond to that challenge and perform whatever authentication
negotiation is required by the server. The exact nature of that negotiation
is specific to the configuration of the server.
| |
IAuthProvider |
Provides IAuthenticator instances for use when connecting to Cassandra nodes. See
PlainTextAuthProvider for an implementation which uses SASL PLAIN mechanism to authenticate using
username/password strings.
| |
ICluster |
Informations and known state of a Cassandra cluster. This is the main entry point of the driver. A simple example of access to a Cassandra cluster would be: Cluster cluster = Cluster.Builder.AddContactPoint("192.168.0.1").Build(); Session session = Cluster.Connect("db1"); foreach (var row in session.execute("SELECT * FROM table1")) //do something ... A cluster object maintains a permanent connection to one of the cluster node that it uses solely to maintain informations on the state and current topology of the cluster. Using the connection, the driver will discover all the nodes composing the cluster as well as new nodes joining the cluster. | |
IColumnInfo |
Specifies the type information associated with collections, maps, udts and other Cassandra types
| |
IDseCredentialsResolver | ||
IFrameCompressor |
Defines the methods for frame compression and decompression
| |
IInitializer |
Initializer for Cluster instances. If you want to create a new Cluster instance programmatically, then it is advised to use Cluster.Builder (obtained through the Cluster#builder method). But it is also possible to implement a custom Initializer that retrieve initialization from a web-service or from a configuration file for instance. | |
ILoadBalancingPolicy |
The policy that decides which Cassandra hosts to contact for each new query.
For efficiency purposes, the policy is expected to exclude down hosts from query plans.
| |
IReconnectionPolicy |
Policy that decides how often the reconnection to a dead node is attempted.
Each time a node is detected dead (because a connection error occurs), a new
IReconnectionSchedule instance is created (through the
NewSchedule()). Then each call to the
IReconnectionSchedule#NextDelayMs method of this instance will
decide when the next reconnection attempt to this node will be tried. Note
that if the driver receives a push notification from the Cassandra cluster
that a node is UP, any existing IReconnectionSchedule on that
node will be cancelled and a new one will be created (in effect, the driver
reset the scheduler). The default ExponentialReconnectionPolicy
policy is usually adequate.
| |
IReconnectionSchedule |
Schedules reconnection attempts to a node.
| |
IRetryPolicy |
A policy that defines a default behavior to adopt when a request returns a
TimeoutException or an UnavailableException. Such policy allows to centralize
the handling of query retries, allowing to minimize the need for exception
catching/handling in business code.
| |
ISession |
A session holds connections to a Cassandra cluster, allowing it to be queried.
Each session maintains multiple connections to the cluster nodes, provides policies to choose which node to use for each query (round-robin on all nodes of the cluster by default), and handles retries for failed query (when it makes sense), etc... Session instances are thread-safe and usually a single instance is enough per application. However, a given session can only be set to one keyspace at a time, so one instance per keyspace is necessary. | |
ISpeculativeExecutionPlan |
Represents a plan that governs speculative executions for a given query.
| |
ISpeculativeExecutionPolicy |
The policy that decides if the driver will send speculative queries to the next hosts when the current host takes too long to respond.
only idempotent statements will be speculatively retried, see IsIdempotent for more information.
| |
IStatement |
An executable query.
This represents either a SimpleStatement, a BoundStatement or a
BoundStatement along with the query options (consistency level,
whether to trace the query, ...).
| |
ITypeAdapter |
DEPRECATED, use TypeSerializerT instead.
Represents a adapter to convert a Cassandra type to a CLR type.
|
Delegate | Description | |
---|---|---|
HostsEventHandler | ||
SchemaChangedEventHandler |
Enumeration | Description | |
---|---|---|
BatchType |
The type of batch to use
| |
ColumnTypeCode |
Specifies a Cassandra data type of a field
| |
CompressionType |
Compression supported by the Cassandra binary protocol.
| |
ConsistencyLevel |
Consistency refers to how up-to-date and synchronized a row of Cassandra data is on all of its replicas.
When selecting, the consistency level specifies how many replicas must respond to a read request before returning data to the client application.
When updating, inserting or deleting the consistency level specifies the number of replicas on which the write must succeed before returning an acknowledgment to the client application.
| |
DataCollectionMetadataSortOrder |
Specifies sort order of the clustering keys
| |
HostDistance |
The distance to a Cassandra node as assigned by a ILoadBalancingPolicy relative to the
ICluster instance.
The distance assigned to a host influences how many connections the driver maintains towards this host. | |
HostsEventArgsKind | ||
IndexMetadataIndexKind |
Describes the possible kinds of indexes
| |
KeyType |
Describes the type of key.
This enum is going to be deprecated in future releases, use PartitionKeys, ClusteringKeys and Indexes for a more accurate representation of a table or view keys and indexes. | |
QueryProtocolOptionsQueryFlags | ||
RetryDecisionRetryDecisionType |
The type of retry decisions.
| |
SchemaChangedEventArgsKind |