Class: Mongo::Server::Description::Inspector::StandaloneDiscovered
- Inherits:
-
Object
- Object
- Mongo::Server::Description::Inspector::StandaloneDiscovered
- Includes:
- Event::Publisher
- Defined in:
- lib/mongo/server/description/inspector/standalone_discovered.rb
Overview
Handles notifying the cluster that a standalone was discovered.
Instance Attribute Summary
Attributes included from Event::Publisher
Instance Method Summary collapse
-
#initialize(event_listeners) ⇒ StandaloneDiscovered
constructor
Instantiate the standalone discovered inspection.
-
#run(description, updated) ⇒ Object
Run the standalone discovered inspection.
Methods included from Event::Publisher
Constructor Details
#initialize(event_listeners) ⇒ StandaloneDiscovered
Instantiate the standalone discovered inspection.
34 35 36 |
# File 'lib/mongo/server/description/inspector/standalone_discovered.rb', line 34 def initialize(event_listeners) @event_listeners = event_listeners end |
Instance Method Details
#run(description, updated) ⇒ Object
Run the standalone discovered inspection.
47 48 49 50 51 |
# 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 |