Class: Mongo::Monitoring::Event::TopologyChanged
- Inherits:
-
Event::Base
- Object
- Event::Base
- Mongo::Monitoring::Event::TopologyChanged
- Defined in:
- build/ruby-driver-v2.19/lib/mongo/monitoring/event/topology_changed.rb
Overview
Event fired when the topology changes.
Instance Attribute Summary collapse
-
#new_topology ⇒ Cluster::Topology
readonly
New_topology The new topology.
-
#previous_topology ⇒ Cluster::Topology
readonly
Previous_topology The previous topology.
Instance Method Summary collapse
-
#initialize(previous_topology, new_topology) ⇒ TopologyChanged
constructor
Create the event.
-
#summary ⇒ String
Returns a concise yet useful summary of the event.
Constructor Details
#initialize(previous_topology, new_topology) ⇒ TopologyChanged
Create the event.
42 43 44 45 |
# File 'build/ruby-driver-v2.19/lib/mongo/monitoring/event/topology_changed.rb', line 42 def initialize(previous_topology, new_topology) @previous_topology = previous_topology @new_topology = new_topology end |
Instance Attribute Details
#new_topology ⇒ Cluster::Topology (readonly)
Returns new_topology The new topology.
31 32 33 |
# File 'build/ruby-driver-v2.19/lib/mongo/monitoring/event/topology_changed.rb', line 31 def new_topology @new_topology end |
#previous_topology ⇒ Cluster::Topology (readonly)
Returns previous_topology The previous topology.
28 29 30 |
# File 'build/ruby-driver-v2.19/lib/mongo/monitoring/event/topology_changed.rb', line 28 def previous_topology @previous_topology end |
Instance Method Details
#summary ⇒ String
Note:
This method is experimental and subject to change.
Returns a concise yet useful summary of the event.
55 56 57 58 59 |
# File 'build/ruby-driver-v2.19/lib/mongo/monitoring/event/topology_changed.rb', line 55 def summary "#<#{short_class_name}" + " prev=#{previous_topology.summary}" + " new=#{new_topology.summary}>" end |