Class: Mongo::Monitoring::Event::TopologyChanged
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
::Mongo::Event::Base
|
|
Instance Chain:
self,
::Mongo::Event::Base
|
|
Inherits: |
Mongo::Event::Base
|
Defined in: | lib/mongo/monitoring/event/topology_changed.rb |
Overview
::Mongo::Monitoring::Event
fired when the topology changes.
Class Method Summary
-
.new(previous_topology, new_topology) ⇒ TopologyChanged
constructor
Create the event.
Instance Attribute Summary
- #new_topology ⇒ Cluster::Topology readonly
- #previous_topology ⇒ Cluster::Topology readonly
Instance Method Summary
-
#summary ⇒ String
Returns a concise yet useful summary of the event.
::Mongo::Event::Base
- Inherited
#summary | Returns a concise yet useful summary of the event. |
#short_class_name |
Constructor Details
.new(previous_topology, new_topology) ⇒ TopologyChanged
Create the event.
# File '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)
# File 'lib/mongo/monitoring/event/topology_changed.rb', line 31
attr_reader :new_topology
#previous_topology ⇒ Cluster::Topology (readonly)
# File 'lib/mongo/monitoring/event/topology_changed.rb', line 28
attr_reader :previous_topology
Instance Method Details
#summary ⇒ String
Note:
This method is experimental and subject to change.
Returns a concise yet useful summary of the event.
# File 'lib/mongo/monitoring/event/topology_changed.rb', line 55
def summary "#<#{short_class_name}" + " prev=#{previous_topology.summary}" + " new=#{new_topology.summary}>" end