Class: Mongo::Monitoring::Event::ServerOpening

Inherits:
Event::Base
  • Object
show all
Defined in:
build/ruby-driver-v2.19/lib/mongo/monitoring/event/server_opening.rb

Overview

Event fired when the server is opening.

Since:

  • 2.4.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(address, topology) ⇒ ServerOpening

Create the event.

Examples:

Create the event.

ServerOpening.new(address)

Parameters:

  • address (Address)

    The server address.

  • topology (Integer)

    The topology.

Since:

  • 2.4.0



42
43
44
45
# File 'build/ruby-driver-v2.19/lib/mongo/monitoring/event/server_opening.rb', line 42

def initialize(address, topology)
  @address = address
  @topology = topology
end

Instance Attribute Details

#addressAddress (readonly)

Returns address The server address.

Returns:

  • (Address)

    address The server address.

Since:

  • 2.4.0



28
29
30
# File 'build/ruby-driver-v2.19/lib/mongo/monitoring/event/server_opening.rb', line 28

def address
  @address
end

#topologyTopology (readonly)

Returns topology The topology.

Returns:

  • (Topology)

    topology The topology.

Since:

  • 2.4.0



31
32
33
# File 'build/ruby-driver-v2.19/lib/mongo/monitoring/event/server_opening.rb', line 31

def topology
  @topology
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



55
56
57
58
# File 'build/ruby-driver-v2.19/lib/mongo/monitoring/event/server_opening.rb', line 55

def summary
  "#<#{short_class_name}" +
  " address=#{address} topology=#{topology.summary}>"
end