CodeContext with constant details known at construction time. More...
#include <PrecomputedCodeContext.h>
Public Types | |
typedef RefCount< PrecomputedCodeContext > | Pointer |
Public Member Functions | |
PrecomputedCodeContext (const char *gist, const SBuf &detail) | |
ScopedId | codeContextGist () const override |
std::ostream & | detailCodeContext (std::ostream &os) const override |
appends human-friendly context description line(s) to a cache.log record More... | |
Static Public Member Functions | |
static const Pointer & | Current () |
static void | Reset () |
forgets the current context, setting it to nil/unknown More... | |
static void | Reset (const Pointer) |
changes the current context; nil argument sets it to nil/unknown More... | |
Public Attributes | |
Stopwatch | busyTime |
time spent in this context (see also: busy_time) More... | |
Static Private Member Functions | |
static void | ForgetCurrent () |
static void | Entering (const Pointer &codeCtx) |
static void | Leaving () |
Private Attributes | |
const char * | gist_ |
the id used in codeContextGist() More... | |
const SBuf | detail_ |
the detail used in detailCodeContext() More... | |
Detailed Description
Definition at line 19 of file PrecomputedCodeContext.h.
Member Typedef Documentation
◆ Pointer
Definition at line 22 of file PrecomputedCodeContext.h.
Constructor & Destructor Documentation
◆ PrecomputedCodeContext()
|
inline |
Definition at line 24 of file PrecomputedCodeContext.h.
Member Function Documentation
◆ codeContextGist()
|
inlineoverridevirtual |
- Returns
- a small, permanent ID of the current context gists persist forever and are suitable for passing to other SMP workers
Implements CodeContext.
Definition at line 28 of file PrecomputedCodeContext.h.
References gist_.
◆ Current()
|
staticinherited |
- Returns
- the known global context or, to indicate unknown context, nil
Definition at line 33 of file CodeContext.cc.
References Instance().
Referenced by CallAndRestore_(), CallSubscription< Call_ >::callback(), CallContextCreator(), clientConnectionsClose(), clientHttpConnectionsOpen(), commStartHalfClosedMonitor(), CurrentCodeContextDetail(), HappyOrderEnforcer::enqueue(), CommQuotaQueue::enqueue(), StoreEntry::invokeHandlers(), neighborsUdpPing(), peerDnsRefreshStart(), Security::KeyLog::record(), CodeContext::Reset(), ScheduleCall(), Ftp::StartListening(), Ftp::StopListening(), tunnelDelayedClientRead(), and tunnelDelayedServerRead().
◆ detailCodeContext()
|
inlineoverridevirtual |
Implements CodeContext.
Definition at line 29 of file PrecomputedCodeContext.h.
References detail_, and Debug::Extra().
◆ Entering()
|
staticprivateinherited |
Switches the current context to the given known context. Improves debugging output by replacing omni-directional "Reset" with directional "Entering".
Definition at line 55 of file CodeContext.cc.
References CodeContext::busyTime, CodeContext::codeContextGist(), debugs, CodeContext::ForgetCurrent(), Instance(), and Stopwatch::resume().
Referenced by CodeContext::Reset().
◆ ForgetCurrent()
|
staticprivateinherited |
Forgets the current known context, possibly triggering its destruction. Preserves the gist of the being-forgotten context during its destruction. Knows nothing about the next context – the caller must set it.
Definition at line 42 of file CodeContext.cc.
References assert, FadingCodeContext::gist, and Instance().
Referenced by CodeContext::Entering(), and CodeContext::Leaving().
◆ Leaving()
|
staticprivateinherited |
Forgets the current known context. Improves debugging output by replacing omni-directional "Reset" with directional "Leaving".
Definition at line 68 of file CodeContext.cc.
References debugs, CodeContext::ForgetCurrent(), and Instance().
Referenced by CodeContext::Reset().
◆ Reset() [1/2]
|
staticinherited |
Definition at line 77 of file CodeContext.cc.
References Instance(), and CodeContext::Leaving().
Referenced by CallAndRestore_(), CallContextCreator(), checkTimeouts(), clientConnectionsClose(), clientHttpConnectionsOpen(), ClientHttpRequest::ClientHttpRequest(), CodeContextGuard::CodeContextGuard(), comm_close_complete(), Http::Stream::finished(), AsyncCallQueue::fire(), StoreEntry::invokeHandlers(), neighborsUdpPing(), peerCountMcastPeersCreateAndSend(), peerDnsRefreshStart(), ConnStateData::postHttpsAccept(), Ftp::StartListening(), Ftp::StopListening(), tunnelDelayedClientRead(), tunnelDelayedServerRead(), and CodeContextGuard::~CodeContextGuard().
◆ Reset() [2/2]
|
staticinherited |
Definition at line 84 of file CodeContext.cc.
References CodeContext::Current(), CodeContext::Entering(), and CodeContext::Leaving().
Member Data Documentation
◆ busyTime
|
inherited |
Definition at line 76 of file CodeContext.h.
Referenced by Format::Format::assemble(), and CodeContext::Entering().
◆ detail_
|
private |
Definition at line 33 of file PrecomputedCodeContext.h.
Referenced by detailCodeContext().
◆ gist_
|
private |
Definition at line 32 of file PrecomputedCodeContext.h.
Referenced by codeContextGist().
The documentation for this class was generated from the following file:
- src/base/PrecomputedCodeContext.h
Introduction
- About Squid
- Why Squid?
- Squid Developers
- How to Donate
- How to Help Out
- Getting Squid
- Squid Source Packages
- Squid Deployment Case-Studies
- Squid Software Foundation
Documentation
- Quick Setup
- Configuration:
- FAQ and Wiki
- Guide Books:
- Non-English
- More...
Support
- Security Advisories
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products
Miscellaneous
- Developer Resources
- Related Writings
- Related Software:
- Squid Artwork
Web Site Translations
Mirrors
- Website:
- ... full list