Class: Cassandra::Listener Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/cassandra/listener.rb

Overview

This class is 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

Cassandra state listener.

See Also:

Instance Method Summary collapse

Instance Method Details

#host_down(host) ⇒ void

This method returns an undefined value.

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.

Parameters:

  • a host instance



43
44
# File 'lib/cassandra/listener.rb', line 43

def host_down(host)
end

#host_found(host) ⇒ void

This method returns an undefined value.

This method is called whenever a host is discovered by the driver, whether because it is a completely new node or if its Host#datacenter or Host#rack have changed.

Parameters:

  • a host instance



52
53
# File 'lib/cassandra/listener.rb', line 52

def host_found(host)
end

#host_lost(host) ⇒ void

This method returns an undefined value.

This method is called whenever a host leaves the cluster, whether because it is completely gone or if its Host#datacenter or Host#rack have changed.

Parameters:

  • a host instance



61
62
# File 'lib/cassandra/listener.rb', line 61

def host_lost(host)
end

#host_up(host) ⇒ void

This method returns an undefined value.

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.

Parameters:

  • a host instance



34
35
# File 'lib/cassandra/listener.rb', line 34

def host_up(host)
end

#keyspace_changed(keyspace) ⇒ void

This method returns an undefined value.

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.

Parameters:

  • a keyspace instance



77
78
# File 'lib/cassandra/listener.rb', line 77

def keyspace_changed(keyspace)
end

#keyspace_created(keyspace) ⇒ void

This method returns an undefined value.

This method is called whenever a new keyspace is created.

Parameters:

  • a keyspace instance



68
69
# File 'lib/cassandra/listener.rb', line 68

def keyspace_created(keyspace)
end

#keyspace_dropped(keyspace) ⇒ void

This method returns an undefined value.

This method is called whenever an existing keyspace is dropped.

Parameters:

  • a keyspace instance



84
85
# File 'lib/cassandra/listener.rb', line 84

def keyspace_dropped(keyspace)
end