a collection of kids More...
#include <Kids.h>
Public Member Functions | |
Kids () | |
void | init () |
initialize all kid records based on Config More... | |
Kid * | find (pid_t pid) |
returns kid by pid More... | |
Kid & | get (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... | |
Kids & | operator= (const Kids &) |
not implemented More... | |
Private Attributes | |
std::vector< Kid > | storage |
Detailed Description
Constructor & Destructor Documentation
◆ Kids() [1/2]
◆ Kids() [2/2]
|
private |
Member Function Documentation
◆ allExitedHappy()
◆ allHopeless()
bool Kids::allHopeless | ( | ) | const |
◆ 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 | ) |
◆ forgetAllFailures()
void Kids::forgetAllFailures | ( | ) |
◆ 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()
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=()
◆ shouldRestartSome()
bool Kids::shouldRestartSome | ( | ) | const |
◆ someRunning()
bool Kids::someRunning | ( | ) | const |
◆ someSignaled()
bool Kids::someSignaled | ( | const int | sgnl | ) | const |
Member Data Documentation
◆ storage
|
private |
Definition at line 62 of file Kids.h.
Referenced by allExitedHappy(), allHopeless(), count(), find(), forgetAllFailures(), forgetOldFailures(), get(), init(), shouldRestartSome(), someRunning(), and someSignaled().
The documentation for this class was generated from the following files: