|
Squid Web Cache master
|
a collection of kids More...
#include <Kids.h>
Public Member Functions | |
| Kids () | |
| void | init () |
| initialize all kid records based on Config | |
| Kid * | find (pid_t pid) |
| returns kid by pid | |
| Kid & | get (size_t i) |
| returns the kid by index, useful for kids iteration | |
| bool | allHopeless () const |
| whether all kids are hopeless | |
| void | forgetAllFailures () |
| forgets all failures in all kids | |
| time_t | forgetOldFailures () |
| bool | allExitedHappy () const |
| whether all kids called exited happy | |
| bool | someSignaled (const int sgnl) const |
| whether some kids died from a given signal | |
| bool | someRunning () const |
| whether some kids are running | |
| bool | shouldRestartSome () const |
| whether some kids should be restarted by master | |
| size_t | count () const |
| returns the number of kids | |
Private Member Functions | |
| Kids (const Kids &) | |
| not implemented | |
| Kids & | operator= (const Kids &) |
| not implemented | |
Private Attributes | |
| std::vector< Kid > | storage |
|
private |
| bool Kids::allHopeless | ( | ) | const |
| size_t Kids::count | ( | ) | const |
Definition at line 146 of file Kids.cc.
References storage.
Referenced by BroadcastSignalIfAny(), find(), get(), and watch_child().
| Kid * Kids::find | ( | pid_t | pid | ) |
| void Kids::forgetAllFailures | ( | ) |
| time_t Kids::forgetOldFailures | ( | ) |
forgets all failures in hopeless kids that were dead for a long time
Definition at line 84 of file Kids.cc.
References assert, Config, SquidConfig::hopelessKidRevivalDelay, and storage.
Referenced by masterMaintainKidRevivalSchedule().
Definition at line 60 of file Kids.cc.
References assert, count(), and storage.
Referenced by BroadcastSignalIfAny(), and watch_child().
| void Kids::init | ( | ) |
maintain n kids
Definition at line 26 of file Kids.cc.
References SquidConfig::cacheSwap, SBuf::clear(), Config, Must, Store::DiskConfig::n_strands, NumberOfKids(), storage, and SquidConfig::workers.
Referenced by watch_child().
| bool Kids::shouldRestartSome | ( | ) | const |
| bool Kids::someRunning | ( | ) | const |
| bool Kids::someSignaled | ( | const int | sgnl | ) | const |
|
private |
Definition at line 62 of file Kids.h.
Referenced by allExitedHappy(), allHopeless(), count(), find(), forgetAllFailures(), forgetOldFailures(), get(), init(), shouldRestartSome(), someRunning(), and someSignaled().