Class: Mongo::Monitoring::Event::ServerHeartbeatStarted
- Inherits:
-
Event::Base
- Object
- Event::Base
- Mongo::Monitoring::Event::ServerHeartbeatStarted
- Defined in:
- build/ruby-driver-v2.19/lib/mongo/monitoring/event/server_heartbeat_started.rb
Overview
Event fired when a server heartbeat is dispatched.
Instance Attribute Summary collapse
-
#address ⇒ Address
readonly
Address The server address.
Instance Method Summary collapse
-
#awaited? ⇒ true | false
Whether the heartbeat was awaited.
-
#initialize(address, awaited: false) ⇒ ServerHeartbeatStarted
constructor
private
Create the event.
-
#summary ⇒ String
Returns a concise yet useful summary of the event.
Constructor Details
#initialize(address, awaited: false) ⇒ ServerHeartbeatStarted
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Create the event.
45 46 47 48 |
# File 'build/ruby-driver-v2.19/lib/mongo/monitoring/event/server_heartbeat_started.rb', line 45 def initialize(address, awaited: false) @address = address @awaited = !!awaited end |
Instance Attribute Details
#address ⇒ Address (readonly)
Returns address The server address.
28 29 30 |
# File 'build/ruby-driver-v2.19/lib/mongo/monitoring/event/server_heartbeat_started.rb', line 28 def address @address end |
Instance Method Details
#awaited? ⇒ true | false
Returns Whether the heartbeat was awaited.
31 32 33 |
# File 'build/ruby-driver-v2.19/lib/mongo/monitoring/event/server_heartbeat_started.rb', line 31 def awaited? @awaited end |
#summary ⇒ String
Note:
This method is experimental and subject to change.
Returns a concise yet useful summary of the event.
58 59 60 61 |
# File 'build/ruby-driver-v2.19/lib/mongo/monitoring/event/server_heartbeat_started.rb', line 58 def summary "#<#{short_class_name}" + " address=#{address}>" end |