Click or drag to resize

DseCluster Class

Information and known state of a DSE cluster.

This is the main entry point of the DSE driver. It extends the CQL driver's ICluster instance with DSE-specific features.

Inheritance Hierarchy
SystemObject
  DseDseCluster

Namespace:  Dse
Assembly:  Dse (in Dse.dll) Version: 2.9.0
Syntax
C#
public class DseCluster : IDseCluster, ICluster, 
	IDisposable

The DseCluster type exposes the following members.

Properties
  NameDescription
Public propertyConfiguration
Gets the DSE cluster client configuration.
Public propertyMetadata
Gets read-only metadata on the connected cluster.

This includes the know nodes (with their status as seen by the driver) as well as the schema definitions.

This method may trigger the creation of a connection if none has been established yet.

Top
Methods
  NameDescription
Public methodAllHosts
Returns all known hosts of this cluster.
Public methodAnyOpenConnections
Public methodStatic memberBuilder
Creates a new DseClusterBuilder instance.
Public methodConnect
Creates a new IDseSession for this cluster.
Public methodConnect(String)
Creates a new IDseSession for this cluster to a specific keyspaces.
Public methodConnectAsync
Asynchronously creates a new session on this cluster.
Public methodConnectAsync(String)
Asynchronously creates a new session on this cluster and using a keyspace an existing keyspace.
Public methodDispose
Calls Shutdown(Int32) with an infinite timeout.
Public methodGetHost
Get a host instance for a given endpoint.
Public methodGetReplicas
Gets a collection of replicas for a given partitionKey on a given keyspace.
Public methodGetResolvedEndpoints
Public methodOnInitializeAsync
Public methodOnShutdownAsync
Public methodRefreshSchema
Updates keyspace metadata (including token metadata for token aware routing) for a given keyspace or a specific keyspace table. If no keyspace is provided then this method will update the metadata and token map for all the keyspaces of the cluster.
Public methodRefreshSchemaAsync
Updates keyspace metadata (including token metadata for token aware routing) for a given keyspace or a specific keyspace table. If no keyspace is provided then this method will update the metadata and token map for all the keyspaces of the cluster.
Public methodShutdown
Shutdown this cluster instance. This closes all connections from all the sessions of this * Cluster instance and reclaim all resources used by it.

This method has no effect if the cluster was already shutdown.

Public methodShutdownAsync
Shutdown this cluster instance asynchronously. This closes all connections from all the sessions of this * Cluster instance and reclaim all resources used by it.

This method has no effect if the cluster was already shutdown.

Top
Events
  NameDescription
Public eventHostAdded
Represents an event that is triggered when a new host is added to the cluster.
Public eventHostRemoved
Represents an event that is triggered when a new host is decommissioned from the cluster.
Top
Examples
IDseCluster cluster = DseCluster.Builder().AddContactPoint("192.168.0.1").Build();
IDseSession session = cluster.Connect("ks1");
foreach (Row row in session.Execute(query))
{
    //do something...
}
See Also

Reference