RunnersRegistry.cc File Reference
#include "squid.h"
#include "base/RunnersRegistry.h"
#include "base/TextException.h"
#include "debug/Stream.h"
#include <set>
Include dependency graph for RunnersRegistry.cc:

Go to the source code of this file.

Typedefs

typedef std::set< RegisteredRunner * > Runners
 a collection of unique runners, in no particular order More...
 

Functions

static RunnersFindRunners ()
 
static void GetRidOfRunner (RegisteredRunner *rr)
 
static void RegisterRunner_ (RegisteredRunner *rr)
 
bool RegisterRunner (RegisteredRunner *rr)
 registers a given runner with the given registry and returns true on success More...
 
void RunRegistered (const RegisteredRunner::Method &event)
 

Variables

static RunnersTheRunners = nullptr
 all known runners More...
 
static bool RunnersGone = false
 used to avoid re-creating deleted TheRunners after shutdown finished. More...
 

Typedef Documentation

◆ Runners

typedef std::set<RegisteredRunner*> Runners

Definition at line 16 of file RunnersRegistry.cc.

Function Documentation

◆ FindRunners()

static Runners * FindRunners ( )
inlinestatic

creates the registered runners container if needed

Returns
either registered runners (if they should exist) or nil (otherwise)

Definition at line 25 of file RunnersRegistry.cc.

References RunnersGone, and TheRunners.

Referenced by IndependentRunner::registerRunner(), RegisterRunner(), RegisterRunner_(), RunRegistered(), and IndependentRunner::unregisterRunner().

◆ GetRidOfRunner()

static void GetRidOfRunner ( RegisteredRunner rr)
inlinestatic

Definition at line 33 of file RunnersRegistry.cc.

Referenced by RegisterRunner(), and RunRegistered().

◆ RegisterRunner()

bool RegisterRunner ( RegisteredRunner rr)

◆ RegisterRunner_()

static void RegisterRunner_ ( RegisteredRunner rr)
inlinestatic

Definition at line 41 of file RunnersRegistry.cc.

References FindRunners(), and Must.

Referenced by IndependentRunner::registerRunner(), and RegisterRunner().

◆ RunRegistered()

void RunRegistered ( const RegisteredRunner::Method m)

Calls a given method of all runners. All runners are destroyed after the finishShutdown() call.

Definition at line 64 of file RunnersRegistry.cc.

References FindRunners(), RegisteredRunner::finishShutdown(), GetRidOfRunner(), RunnersGone, and TheRunners.

Variable Documentation

◆ RunnersGone

bool RunnersGone = false
static

Definition at line 20 of file RunnersRegistry.cc.

Referenced by FindRunners(), and RunRegistered().

◆ TheRunners

Runners* TheRunners = nullptr
static

Definition at line 18 of file RunnersRegistry.cc.

Referenced by FindRunners(), and RunRegistered().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors