Class Mongo::Cluster::PeriodicExecutor
In: lib/mongo/cluster/periodic_executor.rb
Parent: Object

A manager that calls execute on its executors at a regular interval.

@api private

@since 2.5.0

Methods

execute   flush   new   restart!   run!   stop!  

Constants

FREQUENCY = 5   The default time interval for the periodic executor to execute.

@since 2.5.0

Public Class methods

Create a periodic executor.

@example Create a PeriodicExecutor.

  Mongo::Cluster::PeriodicExecutor.new(reaper, reaper2)

@api private

@since 2.5.0

Public Instance methods

Trigger an execute call on each reaper.

@example Trigger all reapers.

  periodic_executor.execute

@api private

@since 2.5.0

Execute all pending operations.

@example Execute all pending operations.

  periodic_executor.flush

@api private

@since 2.5.0

restart!()

Alias for run!

Start the thread.

@example Start the periodic executor‘s thread.

  periodic_executor.run!

@api private

@since 2.5.0

Stop the executor‘s thread.

@example Stop the executors‘s thread.

  periodic_executor.stop!

@param [ Boolean ] wait Whether to wait for background threads to

  finish running.

@api private

@since 2.5.0

[Validate]