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.
42 43 44 45 |
# File 'lib/mongo/monitoring/event/server_closed.rb', line 42 def initialize(address, topology) @address = address @topology = topology end |
Instance Attribute Details
#address ⇒ Address (readonly)
Returns address The server address.
28 29 30 |
# File 'lib/mongo/monitoring/event/server_closed.rb', line 28 def address @address end |
#topology ⇒ Topology (readonly)
Returns topology The topology.
31 32 33 |
# File 'lib/mongo/monitoring/event/server_closed.rb', line 31 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.
55 56 57 58 |
# File 'lib/mongo/monitoring/event/server_closed.rb', line 55 def summary "#<#{short_class_name}" + " address=#{address} topology=#{topology.summary}>" end |