Class: Mongo::Monitoring::Event::TopologyChanged

Inherits:
Object
  • Object
show all
Defined in:
lib/mongo/monitoring/event/topology_changed.rb

Overview

Event fired when the topology changes.

Since:

  • 2.4.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(previous_topology, new_topology) ⇒ TopologyChanged

Create the event.

Examples:

Create the event.

TopologyChanged.new(previous, new)

Parameters:

Since:

  • 2.4.0



39
40
41
42
# 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

Instance Attribute Details

#new_topologyCluster::Topology (readonly)

Returns new_topology The new topology.

Returns:

Since:

  • 2.4.0



28
29
30
# File 'lib/mongo/monitoring/event/topology_changed.rb', line 28

def new_topology
  @new_topology
end

#previous_topologyCluster::Topology (readonly)

Returns previous_topology The previous topology.

Returns:

Since:

  • 2.4.0



25
26
27
# File 'lib/mongo/monitoring/event/topology_changed.rb', line 25

def previous_topology
  @previous_topology
end