a collection of kids More...

#include <Kids.h>

Collaboration diagram for Kids:

Public Member Functions

 Kids ()
 
void init ()
 initialize all kid records based on Config More...
 
Kidfind (pid_t pid)
 returns kid by pid More...
 
Kidget (size_t i)
 returns the kid by index, useful for kids iteration More...
 
bool allHopeless () const
 whether all kids are hopeless More...
 
void forgetAllFailures ()
 forgets all failures in all kids More...
 
time_t forgetOldFailures ()
 
bool allExitedHappy () const
 whether all kids called exited happy More...
 
bool someSignaled (const int sgnl) const
 whether some kids died from a given signal More...
 
bool someRunning () const
 whether some kids are running More...
 
bool shouldRestartSome () const
 whether some kids should be restarted by master More...
 
size_t count () const
 returns the number of kids More...
 

Private Member Functions

 Kids (const Kids &)
 not implemented More...
 
Kidsoperator= (const Kids &)
 not implemented More...
 

Private Attributes

std::vector< Kidstorage
 

Detailed Description

Definition at line 17 of file Kids.h.

Constructor & Destructor Documentation

Kids::Kids ( )

Definition at line 21 of file Kids.cc.

Kids::Kids ( const Kids )
private

Member Function Documentation

bool Kids::allExitedHappy ( ) const

Definition at line 115 of file Kids.cc.

References i, and storage.

bool Kids::allHopeless ( ) const

Definition at line 76 of file Kids.cc.

References i, and storage.

Referenced by masterExit().

size_t Kids::count ( ) const

Definition at line 155 of file Kids.cc.

References storage.

Referenced by BroadcastSignalIfAny(), find(), get(), and watch_child().

Kid * Kids::find ( pid_t  pid)

Definition at line 56 of file Kids.cc.

References assert, count(), i, NULL, pid, and storage.

Referenced by watch_child().

void Kids::forgetAllFailures ( )

Definition at line 86 of file Kids.cc.

References storage.

Referenced by masterReconfigureStart().

time_t Kids::forgetOldFailures ( )

forgets all failures in hopeless kids that were dead for a long time

Returns
seconds till the next check (zero if there are no hopeless kids left)

Definition at line 93 of file Kids.cc.

References assert, Config, SquidConfig::hopelessKidRevivalDelay, and storage.

Referenced by masterMaintainKidRevivalSchedule().

Kid & Kids::get ( size_t  i)

Definition at line 69 of file Kids.cc.

References assert, count(), i, and storage.

Referenced by BroadcastSignalIfAny(), and watch_child().

void Kids::init ( void  )

maintain n kids

Definition at line 26 of file Kids.cc.

References SquidConfig::cacheSwap, Config, i, Must, Store::DiskConfig::n_strands, NumberOfKids(), storage, and SquidConfig::workers.

Referenced by watch_child().

Kids& Kids::operator= ( const Kids )
private
bool Kids::shouldRestartSome ( ) const

Definition at line 145 of file Kids.cc.

References i, and storage.

Referenced by watch_child().

bool Kids::someRunning ( ) const

Definition at line 135 of file Kids.cc.

References i, and storage.

Referenced by watch_child().

bool Kids::someSignaled ( const int  sgnl) const

Definition at line 125 of file Kids.cc.

References i, and storage.

Referenced by masterExit().

Member Data Documentation


The documentation for this class was generated from the following files:

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors