class Mongo::Event::StandaloneDiscovered

This handles when a standalone is discovered.

@since 2.0.6

Attributes

cluster[R]

@return [ Mongo::Cluster ] cluster The event publisher.

Public Class Methods

new(cluster) click to toggle source

Initialize the new standalone discovered event handler.

@example Create the new handler.

StandaloneDiscovered.new(cluster)

@param [ Mongo::Cluster ] cluster The cluster to publish from.

@since 2.0.6

# File lib/mongo/event/standalone_discovered.rb, line 34
def initialize(cluster)
  @cluster = cluster
end

Public Instance Methods

handle(description) click to toggle source

This event tells the cluster to notify its topology that a standalone was discovered.

@example Handle the event.

standalone_discovered.handle(description)

@param [ Server::Description ] description The description of the

server.

@since 2.0.6

# File lib/mongo/event/standalone_discovered.rb, line 48
def handle(description)
  cluster.standalone_discovered
end