Class: Mongo::Monitoring::Event::ServerDescriptionChanged

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

Overview

Event fired when a server's description changes.

Since:

  • 2.4.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(address, topology, previous_description, new_description) ⇒ ServerDescriptionChanged

Create the event.

Examples:

Create the event.

ServerDescriptionChanged.new(address, topology, previous, new)

Parameters:

Since:

  • 2.4.0



49
50
51
52
53
54
# File 'lib/mongo/monitoring/event/server_description_changed.rb', line 49

def initialize(address, topology, previous_description, new_description)
  @address = address
  @topology = topology
  @previous_description = previous_description
  @new_description = new_description
end

Instance Attribute Details

#addressAddress (readonly)

Returns address The server address.

Returns:

  • (Address)

    address The server address.

Since:

  • 2.4.0



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

def address
  @address
end

#new_descriptionServer::Description (readonly)

Returns new_description The new server description.

Returns:

Since:

  • 2.4.0



36
37
38
# File 'lib/mongo/monitoring/event/server_description_changed.rb', line 36

def new_description
  @new_description
end

#previous_descriptionServer::Description (readonly)

Returns previous_description The previous server description.

Returns:

Since:

  • 2.4.0



32
33
34
# File 'lib/mongo/monitoring/event/server_description_changed.rb', line 32

def previous_description
  @previous_description
end

#topologyTopology (readonly)

Returns topology The topology.

Returns:

  • (Topology)

    topology The topology.

Since:

  • 2.4.0



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

def topology
  @topology
end