class Mongo::Server::Description::Inspector::StandaloneDiscovered
Handles notifying the cluster that a standalone was discovered.
@since 2.0.6
Public Class Methods
new(event_listeners)
click to toggle source
Instantiate the standalone discovered inspection.
@example Instantiate the inspection.
StandaloneDiscovered.new(listeners)
@param [ Event::Listeners ] event_listeners The event listeners.
@since 2.0.6
# File lib/mongo/server/description/inspector/standalone_discovered.rb, line 34 def initialize(event_listeners) @event_listeners = event_listeners end
Public Instance Methods
run(description, updated)
click to toggle source
Run the standalone discovered inspection.
@example Run the inspection.
StandaloneDiscovered.run(description, {})
@param [ Description ] description The server description. @param [ Description ] updated The updated description.
@since 2.0.6
# File lib/mongo/server/description/inspector/standalone_discovered.rb, line 47 def run(description, updated) if !description.standalone? && updated.standalone? publish(Event::STANDALONE_DISCOVERED, updated) end end