class Mongo::Monitoring::Event::ServerDescriptionChanged
Event
fired when a server's description changes.
@since 2.4.0
Attributes
@return [ Address
] address The server address.
@return [ Server::Description
] new_description
The new server
description.
@return [ Server::Description
] previous_description
The previous server
description.
@return [ Topology ] topology The topology.
Public Class Methods
Create the event.
@example Create the event.
ServerDescriptionChanged.new(address, topology, previous, new)
@param [ Address
] address The server address. @param [ Integer ] topology The topology. @param [ Server::Description
] previous_description
The previous description. @param [ Server::Description
] new_description
The new description.
@since 2.4.0
# 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
Public Instance Methods
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/server_description_changed.rb, line 64 def summary "#<#{self.class.name.sub(/^Mongo::Monitoring::Event::/, '')}" + " address=#{address} topology=#{topology.summary}" + # TODO Add summaries to descriptions and use them here " prev=#{previous_description.inspect} new=#{new_description.inspect}>" end