Class: Mongo::Monitoring::Event::ServerDescriptionChanged
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
::Mongo::Event::Base
|
|
Instance Chain:
self,
::Mongo::Event::Base
|
|
Inherits: |
Mongo::Event::Base
|
Defined in: | lib/mongo/monitoring/event/server_description_changed.rb |
Overview
::Mongo::Monitoring::Event
fired when a server’s description changes.
Class Method Summary
-
.new(address, topology, previous_description, new_description, awaited: false) ⇒ ServerDescriptionChanged
constructor
Internal use only
Internal use only
Create the event.
Instance Attribute Summary
- #address ⇒ Address readonly
- #awaited? ⇒ true | false readonly
- #new_description ⇒ Server::Description readonly
- #previous_description ⇒ Server::Description readonly
- #topology ⇒ Topology readonly
Instance Method Summary
-
#summary ⇒ String
Returns a concise yet useful summary of the event.
- #awaited_indicator private
::Mongo::Event::Base
- Inherited
#summary | Returns a concise yet useful summary of the event. |
#short_class_name |
Instance Attribute Details
#address ⇒ Address (readonly)
# File 'lib/mongo/monitoring/event/server_description_changed.rb', line 28
attr_reader :address
#awaited? ⇒ true
| false
(readonly)
# File 'lib/mongo/monitoring/event/server_description_changed.rb', line 44
def awaited? @awaited end
#new_description ⇒ Server::Description (readonly)
# File 'lib/mongo/monitoring/event/server_description_changed.rb', line 39
attr_reader :new_description
#previous_description ⇒ Server::Description (readonly)
# File 'lib/mongo/monitoring/event/server_description_changed.rb', line 35
attr_reader :previous_description
#topology ⇒ Topology
(readonly)
# File 'lib/mongo/monitoring/event/server_description_changed.rb', line 31
attr_reader :topology
Instance Method Details
#awaited_indicator (private)
# File 'lib/mongo/monitoring/event/server_description_changed.rb', line 89
def awaited_indicator if awaited? ' [awaited]' else '' end end
#summary ⇒ String
Note:
This method is experimental and subject to change.
Returns a concise yet useful summary of the event.
# File 'lib/mongo/monitoring/event/server_description_changed.rb', line 80
def summary "#<#{short_class_name}" + " address=#{address}" + # TODO Add summaries to descriptions and use them here " prev=#{previous_description.server_type.upcase} new=#{new_description.server_type.upcase}#{awaited_indicator}>" end