RunnersRegistry.cc File Reference
#include "squid.h"
#include "base/RunnersRegistry.h"
#include "base/TextException.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)
 
bool UseThisStatic (const void *)
 convenience function to "use" an otherwise unreferenced static variable More...
 

Variables

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

Typedef Documentation

typedef std::set<RegisteredRunner*> Runners

Definition at line 15 of file RunnersRegistry.cc.

Function Documentation

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 24 of file RunnersRegistry.cc.

References RunnersGone, and TheRunners.

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

static void GetRidOfRunner ( RegisteredRunner rr)
inlinestatic

Definition at line 32 of file RunnersRegistry.cc.

Referenced by RegisterRunner(), and RunRegistered().

bool RegisterRunner ( RegisteredRunner rr)
static void RegisterRunner_ ( RegisteredRunner rr)
inlinestatic

Definition at line 40 of file RunnersRegistry.cc.

References FindRunners(), and Must.

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

void RunRegistered ( const RegisteredRunner::Method m)

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

Definition at line 63 of file RunnersRegistry.cc.

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

bool UseThisStatic ( const void *  )

Definition at line 111 of file RunnersRegistry.cc.

Variable Documentation

bool RunnersGone = false
static

Definition at line 19 of file RunnersRegistry.cc.

Referenced by FindRunners(), and RunRegistered().

Runners* TheRunners = NULL
static

Definition at line 17 of file RunnersRegistry.cc.

Referenced by FindRunners(), and RunRegistered().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors