Cluster Methods |
The Cluster type exposes the following members.
Name | Description | |
---|---|---|
AllHosts |
Returns all known hosts of this cluster.
| |
Builder |
Creates a new Cluster.NewBuilder instance. This is a shortcut for new Cluster.NewBuilder() . | |
BuildFrom |
Build a new cluster based on the provided initializer. Note that for building a cluster programmatically, Cluster.NewBuilder provides a slightly less verbose shortcut with NewBuilder#Build. Also note that that all the contact points provided by initializer must share the same port. | |
Connect |
Creates a new session on this cluster.
| |
Connect(String) |
Creates a new session on this cluster and using a keyspace an existing keyspace.
| |
ConnectAndCreateDefaultKeyspaceIfNotExists |
Creates new session on this cluster, and sets it to default keyspace.
If default keyspace does not exist then it will be created and session will be set to it.
Name of default keyspace can be specified during creation of cluster object with Cluster.Builder().WithDefaultKeyspace("keyspace_name") method.
| |
ConnectAsync |
Creates a new session on this cluster.
| |
ConnectAsync(String) |
Creates a new session on this cluster and using a keyspace an existing keyspace.
| |
Dispose | ||
GetHost |
Get the host instance for a given Ip address.
| |
GetReplicas(Byte) |
Gets a collection of replicas for a given partitionKey. Backward-compatibility only, use GetReplicas(keyspace, partitionKey) instead.
| |
GetReplicas(String, Byte) |
Gets a collection of replicas for a given partitionKey on a given keyspace
| |
RefreshSchema |
Updates cluster metadata for a given keyspace or keyspace table
| |
Shutdown |
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. | |
ShutdownAsync |