Class: Mongo::Monitoring::Event::ServerClosed
- Inherits:
-
Event::Base
- Object
- Event::Base
- Mongo::Monitoring::Event::ServerClosed
- Defined in:
- lib/mongo/monitoring/event/server_closed.rb
Overview
Event fired when the server is closed.
Instance Attribute Summary collapse
-
#address ⇒ Address
readonly
Address The server address.
-
#topology ⇒ Topology
readonly
Topology The topology.
Instance Method Summary collapse
-
#initialize(address, topology) ⇒ ServerClosed
constructor
Create the event.
-
#summary ⇒ String
Returns a concise yet useful summary of the event.
Constructor Details
#initialize(address, topology) ⇒ ServerClosed
Create the event.
39 40 41 42 |
# File 'lib/mongo/monitoring/event/server_closed.rb', line 39 def initialize(address, topology) @address = address @topology = topology end |
Instance Attribute Details
#address ⇒ Address (readonly)
Returns address The server address.
25 26 27 |
# File 'lib/mongo/monitoring/event/server_closed.rb', line 25 def address @address end |
#topology ⇒ Topology (readonly)
Returns topology The topology.
28 29 30 |
# File 'lib/mongo/monitoring/event/server_closed.rb', line 28 def topology @topology end |
Instance Method Details
#summary ⇒ String
Note:
This method is experimental and subject to change.
Returns a concise yet useful summary of the event.
52 53 54 55 |
# File 'lib/mongo/monitoring/event/server_closed.rb', line 52 def summary "#<#{self.class.name.sub(/^Mongo::Monitoring::Event::/, '')}" + " address=#{address} topology=#{topology.summary}>" end |