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() [1/2]

Kids::Kids ( )

Definition at line 21 of file Kids.cc.

◆ Kids() [2/2]

Kids::Kids ( const Kids )
private

Member Function Documentation

◆ allExitedHappy()

bool Kids::allExitedHappy ( ) const

Definition at line 106 of file Kids.cc.

References storage.

◆ allHopeless()

bool Kids::allHopeless ( ) const

Definition at line 67 of file Kids.cc.

References storage.

Referenced by masterExit().

◆ count()

size_t Kids::count ( ) const

Definition at line 146 of file Kids.cc.

References storage.

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

◆ find()

Kid * Kids::find ( pid_t  pid)

Definition at line 47 of file Kids.cc.

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

Referenced by watch_child().

◆ forgetAllFailures()

void Kids::forgetAllFailures ( )

Definition at line 77 of file Kids.cc.

References storage.

Referenced by masterReconfigureStart().

◆ forgetOldFailures()

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 84 of file Kids.cc.

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

Referenced by masterMaintainKidRevivalSchedule().

◆ get()

Kid & Kids::get ( size_t  i)

Definition at line 60 of file Kids.cc.

References assert, count(), and storage.

Referenced by BroadcastSignalIfAny(), and watch_child().

◆ init()

void Kids::init ( void  )

maintain n kids

Definition at line 26 of file Kids.cc.

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

Referenced by watch_child().

◆ operator=()

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

◆ shouldRestartSome()

bool Kids::shouldRestartSome ( ) const

Definition at line 136 of file Kids.cc.

References storage.

Referenced by watch_child().

◆ someRunning()

bool Kids::someRunning ( ) const

Definition at line 126 of file Kids.cc.

References storage.

Referenced by watch_child().

◆ someSignaled()

bool Kids::someSignaled ( const int  sgnl) const

Definition at line 116 of file Kids.cc.

References storage.

Referenced by masterExit().

Member Data Documentation

◆ storage


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors