Cassandra v1.0.2 Cassandra.Cluster View Source
Represents a cassandra cluster. It serves as a Session factory and a collection of metadata.
It always keeps a control connection open to one of cluster hosts to get notified about topological and status changes in the cluster, and keeps its metadata is sync.
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor
Returns replications containing partition_key of keyspace
Returns list of cluster hosts matching given list if ips
Returns list of clusters Cassandra.Hosts
Starts a Cluster process without links (outside of a supervision tree)
Starts a Cluster process linked to the current process
Returns list of clusters up Cassandra.Hosts
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Returns replications containing partition_key of keyspace
Returns list of cluster hosts matching given list if ips
Returns list of clusters Cassandra.Hosts
Starts a Cluster process without links (outside of a supervision tree).
See start_link/1 for more information.
Starts a Cluster process linked to the current process.
options is the keyword list of options:
:contact_points- The initial list host of addresses. Note that the entire list of cluster members will be discovered automatically once a connection to any hosts from the original list is successful. (default:["127.0.0.1"]):port- Cassandra native protocol port (default:9042):connection_timeout- connection timeout in milliseconds (defult:5000):timeout- request execution timeout in milliseconds (default::infinity)
Return values
It returns {:ok, pid} when connection to one of contact_points established and metadata fetched,
on any error it returns {:error, reason}.
Returns list of clusters up Cassandra.Hosts