class Cassandra::Listener

Cassandra state listener.

@abstract Actual state listener implementations don't need to inherit from

this class as long as they conform to its interface. This class exists
solely for documentation purposes

@see Cassandra::Cluster#register

Public Instance Methods

host_down(host) click to toggle source

This method is called whenever a host is considered to be down, whether

by Cassandra's gossip exchange or when the driver failed to establish
any connections to it.

@param host [Cassandra::Host] a host instance @return [void]

   # File lib/cassandra/listener.rb
43 def host_down(host)
44 end
host_found(host) click to toggle source

This method is called whenever a host is discovered by the driver,

whether because it is a completely new node or if its
{Cassandra::Host#datacenter} or {Cassandra::Host#rack} have changed.

@param host [Cassandra::Host] a host instance @return [void]

   # File lib/cassandra/listener.rb
52 def host_found(host)
53 end
host_lost(host) click to toggle source

This method is called whenever a host leaves the cluster, whether

because it is completely gone or if its {Cassandra::Host#datacenter} or
{Cassandra::Host#rack} have changed.

@param host [Cassandra::Host] a host instance @return [void]

   # File lib/cassandra/listener.rb
61 def host_lost(host)
62 end
host_up(host) click to toggle source

This method is called whenever a host is considered to be up, whether

by Cassandra's gossip exchange or when the driver has successfully
established a connection to it.

@param host [Cassandra::Host] a host instance @return [void]

   # File lib/cassandra/listener.rb
34 def host_up(host)
35 end
keyspace_changed(keyspace) click to toggle source

This method is called whenever an existing keyspace is changed. This happens when a new table is created or an existing table is dropped or altered.

@param keyspace [Cassandra::Keyspace] a keyspace instance @return [void]

   # File lib/cassandra/listener.rb
77 def keyspace_changed(keyspace)
78 end
keyspace_created(keyspace) click to toggle source

This method is called whenever a new keyspace is created.

@param keyspace [Cassandra::Keyspace] a keyspace instance @return [void]

   # File lib/cassandra/listener.rb
68 def keyspace_created(keyspace)
69 end
keyspace_dropped(keyspace) click to toggle source

This method is called whenever an existing keyspace is dropped.

@param keyspace [Cassandra::Keyspace] a keyspace instance @return [void]

   # File lib/cassandra/listener.rb
84 def keyspace_dropped(keyspace)
85 end