Class Mongo::Cluster::SocketReaper
In: lib/mongo/cluster/reapers/socket_reaper.rb
Parent: Object

A manager that calls a method on each of a cluster‘s pools to close stale

 sockets.

@api private

@since 2.5.0

Methods

execute   flush   new  

Public Class methods

Initialize the SocketReaper object.

@example Initialize the socket reaper.

  SocketReaper.new(cluster)

@param [ Mongo::Cluster ] cluster The cluster whose pools’ stale sockets

 need to be reaped at regular intervals.

@since 2.5.0

Public Instance methods

Execute the operation to close the pool‘s stale sockets.

@example Close the stale sockets in each of the cluster‘s pools.

  socket_reaper.execute

@since 2.5.0

When the socket reaper is garbage-collected, there‘s no need to close stale sockets;

  sockets will be closed anyway when the pools are garbage-collected.

@since 2.5.0

[Validate]