Class: Mongo::Monitoring::Event::ServerHeartbeatStarted

Inherits:
Event::Base
  • Object
show all
Defined in:
lib/mongo/monitoring/event/server_heartbeat_started.rb

Overview

Event fired when a server heartbeat is dispatched.

Since:

  • 2.7.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(address) ⇒ 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.

Examples:

Create the event.

ServerHeartbeatStarted.new(address)

Parameters:

  • address (Address)

    The server address.

Since:

  • 2.7.0



36
37
38
# File 'lib/mongo/monitoring/event/server_heartbeat_started.rb', line 36

def initialize(address)
  @address = address
end

Instance Attribute Details

#addressAddress (readonly)

Returns address The server address.

Returns:

  • (Address)

    address The server address.

Since:

  • 2.7.0



25
26
27
# File 'lib/mongo/monitoring/event/server_heartbeat_started.rb', line 25

def address
  @address
end

Instance Method Details

#summaryString

Note:

This method is experimental and subject to change.

Returns a concise yet useful summary of the event.

Returns:

  • (String)

    String summary of the event.

Since:

  • 2.7.0



48
49
50
51
# File 'lib/mongo/monitoring/event/server_heartbeat_started.rb', line 48

def summary
  "#<#{self.class.name.sub(/^Mongo::Monitoring::Event::/, '')}" +
  " address=#{address}>"
end