class Mongo::Monitoring::Event::TopologyChanged
Event
fired when the topology changes.
@since 2.4.0
Attributes
new_topology[R]
@return [ Cluster::Topology
] new_topology
The new topology.
previous_topology[R]
@return [ Cluster::Topology
] previous_topology
The previous topology.
Public Class Methods
new(previous_topology, new_topology)
click to toggle source
Create the event.
@example Create the event.
TopologyChanged.new(previous, new)
@param [ Cluster::Topology
] previous_topology
The previous topology. @param [ Cluster::Topology
] new_topology
The new topology.
@since 2.4.0
# File lib/mongo/monitoring/event/topology_changed.rb, line 39 def initialize(previous_topology, new_topology) @previous_topology = previous_topology @new_topology = new_topology end
Public Instance Methods
summary()
click to toggle source
Returns a concise yet useful summary of the event.
@return [ String ] String summary of the event.
@note This method is experimental and subject to change.
@since 2.7.0 @api experimental
# File lib/mongo/monitoring/event/topology_changed.rb, line 52 def summary "#<#{self.class.name.sub(/^Mongo::Monitoring::Event::/, '')}" + " prev=#{previous_topology.summary}" + " new=#{new_topology.summary}>" end