class Mongo::Monitoring::Event::TopologyChanged
Event
fired when the topology changes.
@since 2.4.0
Attributes
@return [ Cluster::Topology
] new_topology
The new topology.
@return [ Cluster::Topology
] previous_topology
The previous topology.
Public Class Methods
Source
# 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
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
Public Instance Methods
Source
# File lib/mongo/monitoring/event/topology_changed.rb, line 52 def summary "#<#{short_class_name}" + " prev=#{previous_topology.summary}" + " new=#{new_topology.summary}>" end
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