class Cassandra::Cluster
Cluster represents a cassandra cluster. It serves as a session factory
factory and a collection of metadata.
Inherits
Object
Extends
Forwardable
Methods
Return cluster’s name
Return replicas for a given statement and keyspace
- Note
- an empty list is returned when statement/keyspace information is not enough to determine replica list.
Register a cluster state listener. State listener will start receiving notifications about topology and schema changes
Unregister a cluster state listener. State listener will stop receiving notifications about topology and schema changes
Yield or enumerate each member of this cluster
Find a host by its address
Determine if a host by a given address exists
Yield or enumerate each keyspace defined in this cluster
Find a keyspace by name
Determine if a keyspace by a given name exists
Trigger an asynchronous schema metadata refresh
Synchronously refresh schema metadata
Asynchronously create a new session, optionally scoped to a keyspace
Synchronously create a new session, optionally scoped to a keyspace
Asynchronously closes all sessions managed by this cluster
Synchronously closes all sessions managed by this cluster
Returns a CLI-friendly cluster representation