#include <Store.h>


Public Member Functions | |
bool | checkDeferRead (int fd) const |
const char * | getMD5Text () const |
StoreEntry () | |
virtual | ~StoreEntry () |
MemObject & | mem () |
const MemObject & | mem () const |
const HttpReply * | hasFreshestReply () const |
void | write (StoreIOBuffer) |
bool | isEmpty () const |
bool | isAccepting () const |
size_t | bytesWanted (Range< size_t > const aRange, bool ignoreDelayPool=false) const |
void | lengthWentBad (const char *reason) |
flags [truncated or too big] entry with ENTRY_BAD_LENGTH and releases it More... | |
void | complete () |
store_client_t | storeClientType () const |
const char * | getSerialisedMetaData (size_t &length) const |
void | storeErrorResponse (HttpReply *reply) |
Store a prepared error response. MemObject locks the reply object. More... | |
void | replaceHttpReply (const HttpReplyPointer &, const bool andStartWriting=true) |
void | startWriting () |
bool | mayStartSwapOut () |
whether we may start writing to disk (now or in the future) More... | |
void | trimMemory (const bool preserveSwappable) |
void | memOutDecision (const bool willCacheInRam) |
void | swapOutDecision (const MemObject::SwapOut::Decision &decision) |
void | abort () |
bool | makePublic (const KeyScope keyScope=ksDefault) |
void | makePrivate (const bool shareable) |
void | clearPrivate () |
bool | setPublicKey (const KeyScope keyScope=ksDefault) |
void | clearPublicKeyScope () |
const cache_key * | publicKey () const |
void | setPrivateKey (const bool shareable, const bool permanent) |
void | expireNow () |
void | releaseRequest (const bool shareable=false) |
void | negativeCache () |
bool | cacheNegatively () |
void | invokeHandlers () |
void | cacheInMemory () |
start or continue storing in memory cache More... | |
void | swapOut () |
bool | swappingOut () const |
whether we are in the process of writing this entry to disk More... | |
bool | swappedOut () const |
whether the entire entry is now on disk (possibly marked for deletion) More... | |
bool | swapoutFailed () const |
whether we failed to write this entry to disk More... | |
void | swapOutFileClose (int how) |
const char * | url () const |
bool | checkCachable () |
int | checkNegativeHit () const |
int | locked () const |
int | validToSend () const |
bool | memoryCachable () |
checkCachable() and can be cached in memory More... | |
void | createMemObject () |
void | createMemObject (const char *storeId, const char *logUri, const HttpRequestMethod &aMethod) |
initialize mem_obj with URIs/method; assert if mem_obj already exists More... | |
void | ensureMemObject (const char *storeId, const char *logUri, const HttpRequestMethod &aMethod) |
initialize mem_obj (if needed) and set URIs/method (if missing) More... | |
void | dump (int debug_lvl) const |
void | hashDelete () |
void | hashInsert (const cache_key *) |
void | registerAbort (STABH *cb, void *) |
void | reset () |
void | setMemStatus (mem_status_t) |
bool | timestampsSet () |
void | unregisterAbort () |
void | destroyMemObject () |
int | checkTooSmall () |
void | delayAwareRead (const Comm::ConnectionPointer &conn, char *buf, int len, AsyncCall::Pointer callback) |
void | setNoDelay (bool const) |
void | lastModified (const time_t when) |
time_t | lastModified () const |
const char * | describeTimestamps () const |
bool | modifiedSince (const time_t ims, const int imslen=-1) const |
bool | hasIfMatchEtag (const HttpRequest &request) const |
has ETag matching at least one of the If-Match etags More... | |
bool | hasIfNoneMatchEtag (const HttpRequest &request) const |
has ETag matching at least one of the If-None-Match etags More... | |
bool | hasEtag (ETag &etag) const |
whether this entry has an ETag; if yes, puts ETag value into parameter More... | |
bool | updateOnNotModified (const StoreEntry &e304) |
Store::Disk & | disk () const |
the disk this entry is [being] cached on; asserts for entries w/o a disk More... | |
bool | hasDisk (const sdirno dirn=-1, const sfileno filen=-1) const |
void | attachToDisk (const sdirno, const sfileno, const swap_status_t) |
void | detachFromDisk () |
bool | hasTransients () const |
whether there is a corresponding locked transients table entry More... | |
bool | hasMemStore () const |
whether there is a corresponding locked shared memory table entry More... | |
bool | hittingRequiresCollapsing () const |
whether this entry can feed collapsed requests and only them More... | |
void | setCollapsingRequirement (const bool required) |
allow or forbid collapsed requests feeding More... | |
void * | operator new (size_t byteCount) |
void | operator delete (void *address) |
int64_t | objectLen () const |
int64_t | contentLen () const |
void | lock (const char *context) |
int | unlock (const char *context) |
int | locks () const |
returns a local concurrent use counter, for debugging More... | |
void | touch () |
update last reference timestamp and related Store metadata More... | |
void | release (const bool shareable=false) |
void | abandon (const char *context) |
bool | mayStartHitting () const |
void | deferProducer (const AsyncCall::Pointer &producer) |
call back producer when more buffer space is available More... | |
void | kickProducer () |
calls back producer registered with deferProducer More... | |
virtual void | append (char const *, int) |
Appends a c-string to existing packed data. More... | |
virtual void | vappendf (const char *, va_list) |
virtual void | buffer () |
virtual void | flush () |
void | appendf (const char *fmt,...) PRINTF_FORMAT_ARG2 |
Append operation with printf-style arguments. More... | |
Static Public Member Functions | |
static size_t | inUseCount () |
static void | getPublicByRequestMethod (StoreClient *aClient, HttpRequest *request, const HttpRequestMethod &method) |
static void | getPublicByRequest (StoreClient *aClient, HttpRequest *request) |
static void | getPublic (StoreClient *aClient, const char *uri, const HttpRequestMethod &method) |
Public Attributes | |
MemObject * | mem_obj |
RemovalPolicyNode | repl |
time_t | timestamp |
time_t | lastref |
time_t | expires |
uint64_t | swap_file_sz |
uint16_t | refcount |
uint16_t | flags |
sfileno | swap_filen:25 |
unique ID inside a cache_dir for swapped out entries; -1 for others More... | |
sdirno | swap_dirn:7 |
mem_status_t | mem_status:3 |
ping_status_t | ping_status:3 |
store_status_t | store_status:3 |
swap_status_t | swap_status:3 |
ESIElement::Pointer | cachedESITree |
void * | key |
hash_link * | next |
Static Public Attributes | |
static DeferredRead::DeferrableRead | DeferReader |
Protected Types | |
typedef Store::EntryGuard | EntryGuard |
Protected Member Functions | |
void | transientsAbandonmentCheck () |
void | checkDisk () const |
does nothing except throwing if disk-associated data members are inconsistent More... | |
Private Member Functions | |
void | doAbandon (const char *context) |
bool | checkTooBig () const |
void | forcePublicKey (const cache_key *newkey) |
StoreEntry * | adjustVary () |
const cache_key * | calcPublicKey (const KeyScope keyScope) |
bool | validLength () const |
bool | hasOneOfEtags (const String &reqETags, const bool allowWeakMatch) const |
whether at least one of the request ETags matches entity ETag More... | |
Private Attributes | |
time_t | lastModified_ |
received Last-Modified value or -1; use lastModified() More... | |
unsigned short | lock_count |
bool | shareableWhenPrivate |
AsyncCall::Pointer | deferredProducer |
producer callback registered with deferProducer More... | |
Static Private Attributes | |
static MemAllocator * | pool = NULL |
Friends | |
std::ostream & | operator<< (std::ostream &os, const StoreEntry &e) |
Detailed Description
Member Typedef Documentation
◆ EntryGuard
|
protected |
Constructor & Destructor Documentation
◆ StoreEntry()
StoreEntry::StoreEntry | ( | ) |
◆ ~StoreEntry()
Member Function Documentation
◆ abandon()
|
inline |
One of the three methods to get rid of an unlocked StoreEntry object. May destroy this object if it is unlocked; does nothing otherwise. Unlike release(), may not trigger eviction of underlying store entries, but, unlike destroyStoreEntry(), does honor an earlier release request.
Definition at line 275 of file Store.h.
References doAbandon(), and locked().
Referenced by unlock().
◆ abort()
void StoreEntry::abort | ( | ) |
Definition at line 1109 of file store.cc.
References MemObject::abort, StatCounters::aborted_requests, assert, MemObject::abort_::callback, cbdataReferenceValid(), MemObject::abort_::data, DBG_IMPORTANT, debugs, EBIT_CLR, EBIT_SET, ENTRY_ABORTED, ENTRY_FWD_HDR_WAIT, eventAdd(), flags, getMD5Text(), HERE(), invokeHandlers(), lock(), mem_obj, negativeCache(), NOT_IN_MEMORY, NULL, releaseRequest(), setMemStatus(), statCounter, STORE_OK, STORE_PENDING, store_status, swapOutFileClose(), unlock(), unregisterAbort(), and StoreIOState::writerGone.
Referenced by isEmpty(), peerCountMcastPeersDone(), storeUnregister(), swapOut(), and Store::Controller::syncCollapsed().
◆ adjustVary()
|
private |
Updates mem_obj->request->vary_headers to reflect the current Vary. The vary_headers field is used to calculate the Vary marker key. Releases the old Vary marker with an outdated key (if any).
- Returns
- new (locked) Vary marker StoreEntry or, if none was needed, nil
- Exceptions
-
std::exception on failures
Definition at line 689 of file store.cc.
References assert, SBuf::clear(), SBuf::cmp(), complete(), HttpRequest::flags, MemObject::freshestReply(), RefCount< C >::getRaw(), Http::HDR_X_ACCELERATOR_VARY, Http::Message::header, httpMakeVaryMark(), SBuf::isEmpty(), MemObject::logUri(), makePublic(), mem_obj, HttpRequest::method, MemObject::method, HttpHeader::putStr(), replaceHttpReply(), MemObject::request, request(), Http::scOkay, HttpReply::setHeaders(), squid_curtime, startWriting(), storeCreateEntry(), storeGetPublic(), MemObject::storeId(), TexcHere, timestampsSet(), unlock(), Http::VARY, HttpRequest::vary_headers, and MemObject::vary_headers.
Referenced by setPublicKey().
◆ append()
|
virtual |
Implements Packable.
Reimplemented in CapturingStoreEntry.
Definition at line 829 of file store.cc.
References assert, MemObject::baseReply(), StoreIOBuffer::data, MemObject::endOffset(), Http::Message::hdr_sz, len, StoreIOBuffer::length, mem_obj, NULL, StoreIOBuffer::offset, STORE_PENDING, store_status, and write().
Referenced by MimeIcon::created(), Format::Format::dump(), dump_SBufList(), DumpInfo(), gopherReadReply(), gopherToHTML(), internalStart(), mayStartHitting(), netdbBinaryExchange(), WhoisState::readReply(), statObjects(), storeDigestCBlockSwapOut(), storeDigestSwapOutStep(), and vappendf().
◆ appendf()
|
inlineinherited |
Definition at line 61 of file Packable.h.
References Packable::vappendf().
Referenced by Ftp::Server::acceptDataConnection(), aclParseAccessLine(), aclParseAclList(), Format::Format::assemble(), HttpStateData::buildRequestPrefix(), clientPackRangeHdr(), clientPackTermBound(), ErrorState::compileLegacyCode(), ErrorState::Dump(), dump_cachemgrpasswd(), Security::ServerOptions::dumpCfg(), Security::PeerOptions::dumpCfg(), store_client::dumpStats(), Adaptation::Icap::ModXact::encapsulateHead(), errorInitialize(), Adaptation::Icap::Xaction::fillDoneStatus(), Adaptation::Icap::ModXact::fillDoneStatus(), Adaptation::Icap::Xaction::fillPendingStatus(), Adaptation::Icap::ModXact::fillPendingStatus(), HttpStateData::getMoreRequestBody(), gopherSendRequest(), Ftp::Server::handleEpsvReply(), Ftp::Server::handlePasvReply(), helperDispatch(), httpHdrContRangePackInto(), httpHdrRangeRespSpecPackInto(), internalRemoteUri(), Adaptation::Icap::ModXact::makeAllowHeader(), Adaptation::Icap::OptXact::makeRequest(), Adaptation::Icap::ModXact::makeRequestHeaders(), Adaptation::Icap::ModXact::makeUsernameHeader(), memBufReport(), munge_menu_line(), munge_other_line(), Adaptation::Icap::ModXact::openChunk(), HttpRequest::pack(), Http::Stream::packChunk(), HttpRequest::packFirstLineInto(), HttpHdrRangeSpec::packInto(), Http::StatusLine::packInto(), HttpHdrScTarget::packInto(), HttpHdrCc::packInto(), helper::packStatsInto(), Acl::AllOf::parse(), Ftp::PrintReply(), Ftp::Client::sendEprt(), Ftp::Client::sendPassive(), ExternalACLLookup::Start(), Ident::Start(), MemObject::stat(), statStoreEntry(), Ipc::Inquirer::status(), Comm::TcpAcceptor::status(), AsyncJob::status(), Http::Tunneler::status(), Adaptation::Ecap::XactionRep::status(), Security::PeerConnector::status(), Adaptation::Icap::Xaction::status(), BodyPipe::status(), HappyConnOpener::status(), Adaptation::Icap::ServiceRep::status(), wordlistCat(), Ftp::Server::writeCustomReply(), Ftp::Server::writeEarlyReply(), Ftp::Server::writeErrorReply(), and Http::Tunneler::writeRequest().
◆ attachToDisk()
void StoreEntry::attachToDisk | ( | const sdirno | dirn, |
const sfileno | fno, | ||
const swap_status_t | status | ||
) |
Makes hasDisk(dirn, filn) true. The caller should have locked the corresponding disk store entry for reading or writing.
Definition at line 1993 of file store.cc.
References checkDisk(), debugs, getMD5Text(), swap_dirn, swap_filen, swap_status, and swapStatusStr.
Referenced by Fs::Ufs::UFSSwapDir::addDiskRestore(), Rock::SwapDir::anchorEntry(), lastModified(), and storeSwapOutStart().
◆ buffer()
|
virtual |
disable sending content to the clients.
This just sets DELAY_SENDING.
Reimplemented from Packable.
Reimplemented in CapturingStoreEntry.
Definition at line 1649 of file store.cc.
References DELAY_SENDING, EBIT_SET, and flags.
Referenced by testRock::addEntry(), Ftp::Gateway::appendSuccessHeader(), MimeIcon::created(), Mgr::Action::fillEntry(), gopherMimeCreate(), gopherSendComplete(), mayStartHitting(), netdbBinaryExchange(), Mgr::Forwarder::sendError(), WhoisState::setReplyToOK(), startWriting(), statObjects(), storeDigestRewriteResume(), storeErrorResponse(), HttpRequest::swapOut(), testUfs::testUfsSearch(), clientReplyContext::traceReply(), and urnHandleReply().
◆ bytesWanted()
Definition at line 229 of file store.cc.
References Range< C, S >::end, and NULL.
Referenced by Client::handleMoreAdaptedBodyAvailable(), isEmpty(), ClientHttpRequest::noteMoreBodyDataAvailable(), and HttpStateData::readReply().
◆ cacheInMemory()
void StoreEntry::cacheInMemory | ( | ) |
Referenced by publicKey().
◆ cacheNegatively()
bool StoreEntry::cacheNegatively | ( | ) |
Definition at line 166 of file store.cc.
Referenced by HttpStateData::haveParsedReplyHeaders(), and publicKey().
◆ calcPublicKey()
Calculates correct public key for feeding forcePublicKey(). Assumes adjustVary() has been called for this entry already.
Definition at line 676 of file store.cc.
References assert, RefCount< C >::getRaw(), mem_obj, MemObject::method, MemObject::request, MemObject::storeId(), storeKeyPublic(), and storeKeyPublicByRequest().
Referenced by clearPublicKeyScope(), and setPublicKey().
◆ checkCachable()
bool StoreEntry::checkCachable | ( | ) |
Satisfies cachability requirements shared among disk and RAM caches. Encapsulates common checks of mayStartSwapOut() and memoryCachable(). TODO: Rename and make private so only those two methods can call this.
Definition at line 957 of file store.cc.
References checkTooBig(), checkTooSmall(), debugs, _store_check_cachable_hist::Default, EBIT_TEST, ENTRY_BAD_LENGTH, ENTRY_NEGCACHED, fdNFree(), flags, hasDisk(), KEY_PRIVATE, mem_obj, MemObject::method, Http::METHOD_GET, _store_check_cachable_hist::missing_parts, _store_check_cachable_hist::negative_cached, _store_check_cachable_hist::no, _store_check_cachable_hist::non_get, _store_check_cachable_hist::not_entry_cachable, _store_check_cachable_hist::private_key, RELEASE_REQUEST, releaseRequest(), RESERVED_FD, store_check_cachable_hist, STORE_OK, store_status, storeTooManyDiskFilesOpen(), _store_check_cachable_hist::too_big, _store_check_cachable_hist::too_many_open_fds, _store_check_cachable_hist::too_many_open_files, _store_check_cachable_hist::too_small, _store_check_cachable_hist::wrong_content_length, and _store_check_cachable_hist::yes.
Referenced by mayStartSwapOut(), memoryCachable(), storeSwapOutFileClosed(), and swapoutFailed().
◆ checkDeferRead()
bool StoreEntry::checkDeferRead | ( | int | fd | ) | const |
Definition at line 247 of file store.cc.
References INT_MAX.
Referenced by statObjects(), and swapOut().
◆ checkDisk()
|
protected |
Definition at line 2015 of file store.cc.
References SquidConfig::cacheSwap, Config, CurrentException(), DBG_IMPORTANT, debugs, EBIT_TEST, flags, Must, Store::DiskConfig::n_configured, RELEASE_REQUEST, swap_dirn, swap_filen, swap_status, SWAPOUT_NONE, swapoutFailed(), swappedOut(), and swappingOut().
Referenced by attachToDisk(), and hasDisk().
◆ checkNegativeHit()
int StoreEntry::checkNegativeHit | ( | ) | const |
Definition at line 1346 of file store.cc.
References EBIT_TEST, ENTRY_NEGCACHED, expires, flags, squid_curtime, STORE_OK, and store_status.
Referenced by clientReplyContext::cacheHit(), and swapoutFailed().
◆ checkTooBig()
|
private |
Definition at line 946 of file store.cc.
References MemObject::baseReply(), Http::Message::content_length, MemObject::endOffset(), mem_obj, and store_maxobjsize.
Referenced by checkCachable().
◆ checkTooSmall()
int StoreEntry::checkTooSmall | ( | ) |
Definition at line 929 of file store.cc.
References MemObject::baseReply(), Config, Http::Message::content_length, EBIT_TEST, ENTRY_SPECIAL, flags, mem(), mem_obj, SquidConfig::minObjectSize, MemObject::object_sz, SquidConfig::Store, STORE_OK, and store_status.
Referenced by checkCachable(), and locked().
◆ clearPrivate()
void StoreEntry::clearPrivate | ( | ) |
A low-level method just resetting "private key" flags. To avoid key inconsistency please use forcePublicKey() or similar instead.
Definition at line 158 of file store.cc.
References assert, EBIT_CLR, EBIT_TEST, KEY_PRIVATE, and RELEASE_REQUEST.
Referenced by forcePublicKey(), and isEmpty().
◆ clearPublicKeyScope()
void StoreEntry::clearPublicKeyScope | ( | ) |
Resets existing public key to a public key with default scope, releasing the old default-scope entry (if any). Does nothing if the existing public key already has default scope.
Definition at line 633 of file store.cc.
References calcPublicKey(), EBIT_TEST, flags, forcePublicKey(), hash_link::key, KEY_PRIVATE, ksDefault, and storeKeyHashCmp.
Referenced by clientReplyContext::handleIMSReply(), and isEmpty().
◆ complete()
void StoreEntry::complete | ( | ) |
Definition at line 1063 of file store.cc.
References assert, current_time, debugs, EBIT_CLR, EBIT_TEST, MemObject::endOffset(), ENTRY_ABORTED, ENTRY_BAD_LENGTH, ENTRY_FWD_HDR_WAIT, flags, getMD5Text(), HttpRequest::hier, invokeHandlers(), lengthWentBad(), mem_obj, mem_status, MemObject::nclients, NOT_IN_MEMORY, MemObject::object_sz, MemObject::request, HierarchyLogEntry::store_complete_stop, STORE_OK, STORE_PENDING, store_status, and validLength().
Referenced by testRock::addEntry(), adjustVary(), FwdState::complete(), FwdState::completed(), MimeIcon::created(), ClientHttpRequest::endRequestSatisfaction(), Mgr::Action::fillEntry(), ClientHttpRequest::handleAdaptedHeader(), internalStart(), isEmpty(), netdbBinaryExchange(), clientReplyContext::processMiss(), clientReplyContext::purgeDoPurgeHead(), Mgr::Forwarder::sendError(), clientReplyContext::sendNotModified(), CacheManager::start(), statObjects(), storeDigestRewriteFinish(), storeErrorResponse(), testUfs::testUfsSearch(), clientReplyContext::traceReply(), and urnHandleReply().
◆ contentLen()
|
inline |
Definition at line 249 of file Store.h.
References MemObject::baseReply(), Http::Message::hdr_sz, lock(), mem(), objectLen(), and unlock().
Referenced by storeLog().
◆ createMemObject() [1/2]
void StoreEntry::createMemObject | ( | ) |
initialize mem_obj; assert if mem_obj already exists avoid this method in favor of createMemObject(trio)!
Definition at line 1623 of file store.cc.
References assert, and mem_obj.
Referenced by Rock::SwapDir::get(), MemStore::get(), Transients::get(), locked(), storeCreatePureEntry(), testStoreController::testMaxSize(), testStoreHashIndex::testMaxSize(), testStoreController::testStats(), and testStoreHashIndex::testStats().
◆ createMemObject() [2/2]
void StoreEntry::createMemObject | ( | const char * | storeId, |
const char * | logUri, | ||
const HttpRequestMethod & | aMethod | ||
) |
Definition at line 1630 of file store.cc.
References assert, ensureMemObject(), and mem_obj.
◆ deferProducer()
void StoreEntry::deferProducer | ( | const AsyncCall::Pointer & | producer | ) |
Definition at line 358 of file store.cc.
References debugs, and deferredProducer.
Referenced by Client::handleMoreAdaptedBodyAvailable(), mayStartHitting(), and ClientHttpRequest::noteMoreBodyDataAvailable().
◆ delayAwareRead()
void StoreEntry::delayAwareRead | ( | const Comm::ConnectionPointer & | conn, |
char * | buf, | ||
int | len, | ||
AsyncCall::Pointer | callback | ||
) |
Definition at line 203 of file store.cc.
References assert, comm_read(), debugs, Comm::Connection::fd, and fd_table.
Referenced by getMD5Text(), gopherSendComplete(), locked(), and Ftp::Client::maybeReadVirginBody().
◆ describeTimestamps()
const char * StoreEntry::describeTimestamps | ( | ) | const |
- Returns
- a formatted string with entry's timestamps
Definition at line 2054 of file store.cc.
References buf, expires, lastModified_, lastref, LOCAL_ARRAY, and timestamp.
Referenced by lastModified(), statStoreEntry(), and timestampsSet().
◆ destroyMemObject()
void StoreEntry::destroyMemObject | ( | ) |
Definition at line 378 of file store.cc.
References debugs, hasMemStore(), hasTransients(), mem_obj, Store::Controller::memoryDisconnect(), NOT_IN_MEMORY, NULL, Store::Root(), setMemStatus(), shutting_down, and Store::Controller::transientsDisconnect().
Referenced by destroyStoreEntry(), MemStore::evictCached(), locked(), and Store::Controller::memoryEvictCached().
◆ detachFromDisk()
void StoreEntry::detachFromDisk | ( | ) |
Makes hasDisk() false. The caller should have unlocked the corresponding disk store entry.
Definition at line 2007 of file store.cc.
References swap_dirn, swap_filen, swap_status, and SWAPOUT_NONE.
Referenced by Rock::SwapDir::disconnect(), Fs::Ufs::UFSSwapDir::evictCached(), and lastModified().
◆ disk()
Store::Disk & StoreEntry::disk | ( | ) | const |
Definition at line 1973 of file store.cc.
References assert, hasDisk(), INDEXSD, and swap_dirn.
Referenced by Store::Disks::dereference(), destroyStoreEntry(), Store::Disks::evictCached(), lastModified(), Store::Disks::reference(), storeOpen(), storeSwapOutFileClosed(), and Store::Disks::updateHeaders().
◆ doAbandon()
|
private |
keep the unlocked StoreEntry object in the local store_table (if needed) or delete it (otherwise)
Definition at line 480 of file store.cc.
References assert, DBG_IMPORTANT, debugs, EBIT_TEST, flags, Store::Controller::handleIdleEntry(), KEY_PRIVATE, locked(), release(), RELEASE_REQUEST, Store::Root(), STORE_PENDING, store_status, and storePendingNClients().
Referenced by abandon().
◆ dump()
void StoreEntry::dump | ( | int | debug_lvl | ) | const |
Definition at line 1547 of file store.cc.
References debugs, expires, getMD5Text(), lastModified_, lastref, lock_count, mem_obj, mem_status, hash_link::next, ping_status, refcount, store_status, storeEntryFlags(), swap_dirn, swap_file_sz, swap_filen, swap_status, and timestamp.
Referenced by clientReplyContext::buildReplyHeader(), dump_acl_list(), Fs::Ufs::UFSSwapDir::dumpEntry(), locked(), and clientReplyContext::processMiss().
◆ ensureMemObject()
void StoreEntry::ensureMemObject | ( | const char * | storeId, |
const char * | logUri, | ||
const HttpRequestMethod & | aMethod | ||
) |
Definition at line 1637 of file store.cc.
References mem_obj, and MemObject::setUris().
Referenced by createMemObject(), clientReplyContext::doGetMoreData(), locked(), peerDigestRequest(), clientReplyContext::processExpired(), and clientReplyContext::purgeFoundObject().
◆ expireNow()
void StoreEntry::expireNow | ( | ) |
Definition at line 797 of file store.cc.
References debugs, expires, getMD5Text(), and squid_curtime.
Referenced by publicKey().
◆ flush()
|
virtual |
flush any buffered content.
This just clears DELAY_SENDING and Invokes the handlers to begin sending anything that may be buffered.
Reimplemented from Packable.
Reimplemented in CapturingStoreEntry.
Definition at line 1660 of file store.cc.
References DELAY_SENDING, EBIT_CLR, EBIT_TEST, flags, and invokeHandlers().
Referenced by testRock::addEntry(), Ftp::Gateway::completedListing(), MimeIcon::created(), Mgr::Action::fillEntry(), gopherReadReply(), gopherSendComplete(), gopherToHTML(), mayStartHitting(), netdbBinaryExchange(), Ftp::Relay::processReplyBody(), Ftp::Gateway::processReplyBody(), WhoisState::readReply(), Mgr::Forwarder::sendError(), startWriting(), statObjects(), storeDigestRewriteResume(), storeErrorResponse(), HttpRequest::swapOut(), and testUfs::testUfsSearch().
◆ forcePublicKey()
|
private |
Unconditionally sets public key for this store entry. Releases the old entry with the same public key (if any).
Definition at line 650 of file store.cc.
References assert, clearPrivate(), debugs, hasDisk(), hash_lookup(), hashDelete(), hashInsert(), MemObject::hasUris(), hash_link::key, mem_obj, store_table, storeDirSwapLog(), storeKeyText(), and SWAP_LOG_ADD.
Referenced by clearPublicKeyScope(), and setPublicKey().
◆ getMD5Text()
const char * StoreEntry::getMD5Text | ( | ) | const |
Definition at line 185 of file store.cc.
References CommRead::buf, CommRead::callback, CommRead::conn, DeferReader, delayAwareRead(), CommRead::len, and storeKeyText().
Referenced by abort(), attachToDisk(), StoreMetaMD5::checkConsistency(), complete(), store_client::copy(), dump(), expireNow(), HeapKeyGen_StoreEntry_GDSF(), HeapKeyGen_StoreEntry_LFUDA(), HeapKeyGen_StoreEntry_LRU(), lock(), neighborsUdpPing(), HttpStateData::processReplyHeader(), release(), setMemStatus(), statClientRequests(), statStoreEntry(), storeClientCopy2(), storeDigestAdd(), storeDigestAddable(), storeDigestDel(), storeDigestRewriteStart(), storeDirSwapLog(), storeLog(), storeSwapInStart(), storeUnregister(), swapOutFileClose(), unlock(), validLength(), and write().
◆ getPublic()
|
static |
Definition at line 515 of file store.cc.
References assert, StoreClient::created(), and storeGetPublic().
Referenced by doV2Query(), doV3Query(), MimeIcon::load(), and UrnState::start().
◆ getPublicByRequest()
|
static |
Definition at line 508 of file store.cc.
References assert, StoreClient::created(), and storeGetPublicByRequest().
Referenced by htcpSpecifier::checkHit(), and clientReplyContext::identifyStoreObject().
◆ getPublicByRequestMethod()
|
static |
Definition at line 501 of file store.cc.
References assert, StoreClient::created(), and storeGetPublicByRequestMethod().
Referenced by clientReplyContext::purgeDoMissPurge(), clientReplyContext::purgeDoPurgeGet(), clientReplyContext::purgeFoundGet(), and clientReplyContext::purgeRequestFindObjectToPurge().
◆ getSerialisedMetaData()
char const * StoreEntry::getSerialisedMetaData | ( | size_t & | length | ) | const |
- Returns
- a malloc()ed buffer containing a length-long packed swap header
Definition at line 1821 of file store.cc.
References assert, storeSwapMetaBuild(), storeSwapMetaPack(), and storeSwapTLVFree().
Referenced by isEmpty(), Rock::HeaderUpdater::startWriting(), and storeSwapOutStart().
◆ hasDisk()
whether one of this StoreEntry owners has locked the corresponding disk entry (at the specified disk entry coordinates, if any)
Definition at line 1982 of file store.cc.
References checkDisk(), Must, swap_dirn, and swap_filen.
Referenced by MemStore::anchorEntry(), Store::Disk::canLog(), checkCachable(), Store::Controller::dereferenceIdle(), destroyStoreEntry(), Rock::SwapDir::disconnect(), disk(), Store::Disks::evictCached(), Rock::SwapDir::evictCached(), Fs::Ufs::UFSSwapDir::evictCached(), forcePublicKey(), lastModified(), mayStartSwapOut(), store_client::moreToSend(), neighborsUdpPing(), Rock::SwapDir::openStoreIO(), Store::Controller::referenceBusy(), release(), Fs::Ufs::UFSSwapDir::replacementRemove(), store_client::store_client(), storeCleanup(), storeDirSwapLog(), storeSwapInStart(), storeSwapOutStart(), swapOut(), Store::Controller::syncCollapsed(), Store::Disks::updateAnchored(), Rock::SwapDir::updateAnchored(), and validToSend().
◆ hasEtag()
bool StoreEntry::hasEtag | ( | ETag & | etag | ) | const |
Definition at line 1915 of file store.cc.
References Http::ETAG, hasFreshestReply(), and ETag::str.
Referenced by lastModified(), and clientReplyContext::processExpired().
◆ hasFreshestReply()
|
inline |
- Return values
-
* the address of freshest reply (if mem_obj exists) nullptr when mem_obj does not exist
- See also
- MemObject::freshestReply()
Definition at line 58 of file Store.h.
References MemObject::freshestReply(), mem_obj, and write().
Referenced by hasEtag(), and refreshCheck().
◆ hashDelete()
void StoreEntry::hashDelete | ( | ) |
Definition at line 427 of file store.cc.
References hash_remove_link(), hash_link::key, NULL, store_table, and storeKeyFree().
Referenced by destroyStoreEntry(), forcePublicKey(), locked(), and setPrivateKey().
◆ hashInsert()
void StoreEntry::hashInsert | ( | const cache_key * | someKey | ) |
Definition at line 418 of file store.cc.
References assert, debugs, hash_join(), hash_link::key, store_table, storeKeyDup(), and storeKeyText().
Referenced by Fs::Ufs::UFSSwapDir::addDiskRestore(), addedEntry(), Store::Controller::addReading(), forcePublicKey(), locked(), and setPrivateKey().
◆ hasIfMatchEtag()
bool StoreEntry::hasIfMatchEtag | ( | const HttpRequest & | request | ) | const |
Definition at line 1926 of file store.cc.
References HttpHeader::getList(), hasOneOfEtags(), Http::Message::header, and Http::IF_MATCH.
Referenced by lastModified(), and clientReplyContext::processConditional().
◆ hasIfNoneMatchEtag()
bool StoreEntry::hasIfNoneMatchEtag | ( | const HttpRequest & | request | ) | const |
Definition at line 1933 of file store.cc.
References HttpRequest::flags, HttpHeader::getList(), hasOneOfEtags(), Http::Message::header, Http::IF_NONE_MATCH, RequestFlags::isRanged, HttpRequest::method, Http::METHOD_GET, and Http::METHOD_HEAD.
Referenced by lastModified(), and clientReplyContext::processConditional().
◆ hasMemStore()
|
inline |
Definition at line 201 of file Store.h.
References MemObject::MemCache::index, mem_obj, and MemObject::memCache.
Referenced by destroyMemObject(), MemStore::disconnect(), MemStore::evictCached(), operator<<(), Store::Controller::syncCollapsed(), transientsAbandonmentCheck(), and MemStore::updateAnchored().
◆ hasOneOfEtags()
|
private |
Definition at line 1944 of file store.cc.
References String::append(), Http::ETAG, etagIsStrongEqual(), etagIsWeakEqual(), etagParseInit(), MemObject::freshestReply(), HttpHeader::getETag(), Http::Message::header, mem(), NULL, strListGetItem(), strListIsMember(), and String::termedBuf().
Referenced by hasIfMatchEtag(), and hasIfNoneMatchEtag().
◆ hasTransients()
|
inline |
Definition at line 199 of file Store.h.
References MemObject::XitTable::index, mem_obj, and MemObject::xitTable.
Referenced by Transients::addEntry(), Store::Controller::allowCollapsing(), Store::Controller::allowSharing(), Store::Controller::anchorToCache(), CollapsedForwarding::Broadcast(), Store::Controller::checkTransients(), Transients::clearCollapsingRequirement(), Transients::completeWriting(), destroyMemObject(), Transients::disconnect(), Transients::evictCached(), Transients::monitorIo(), operator<<(), Transients::readers(), Transients::status(), Store::Controller::stopSharing(), Store::Controller::transientReaders(), transientsAbandonmentCheck(), Store::Controller::transientsCompleteWriting(), Store::Controller::transientsReader(), and Store::Controller::transientsWriter().
◆ hittingRequiresCollapsing()
|
inline |
Definition at line 204 of file Store.h.
References EBIT_TEST, ENTRY_REQUIRES_COLLAPSING, flags, and setCollapsingRequirement().
Referenced by ICPState::confirmAndPrepHit(), UrnState::created(), htcpSpecifier::created(), Ipc::StoreMapAnchor::exportInto(), StoreClient::startCollapsingOn(), startWriting(), and Store::Controller::syncCollapsed().
◆ inUseCount()
|
static |
Definition at line 177 of file store.cc.
Referenced by Store::Controller::getStats(), snmp_prfSysFn(), Store::Controller::stat(), and storeDigestCalcCap().
◆ invokeHandlers()
void StoreEntry::invokeHandlers | ( | ) |
- Todo:
- argh, why both?
Definition at line 755 of file store_client.cc.
References store_client::_callback, dlink_node::data, debugs, DELAY_SENDING, store_client::disk_io_pending, EBIT_TEST, ENTRY_FWD_HDR_WAIT, store_client::flags, i, dlink_node::next, store_client::node, NULL, store_client::Callback::pending(), PROF_start, PROF_stop, sc, and storeClientCopy2().
Referenced by abort(), complete(), flush(), publicKey(), storePendingNClients(), Store::Controller::syncCollapsed(), and write().
◆ isAccepting()
bool StoreEntry::isAccepting | ( | ) | const |
Definition at line 2042 of file store.cc.
References EBIT_TEST, ENTRY_ABORTED, flags, STORE_PENDING, and store_status.
Referenced by Client::abortOnBadEntry(), isEmpty(), and HttpStateData::processReplyBody().
◆ isEmpty()
|
inline |
Check if the Store entry is empty
- Return values
-
true Store contains 0 bytes of data. false Store contains 1 or more bytes of data. false Store contains negative content !!!!!!
Definition at line 67 of file Store.h.
References abort(), bytesWanted(), clearPrivate(), clearPublicKeyScope(), complete(), MemObject::endOffset(), getSerialisedMetaData(), isAccepting(), ksDefault, lengthWentBad(), makePrivate(), makePublic(), mayStartSwapOut(), mem(), memOutDecision(), replaceHttpReply(), setPublicKey(), startWriting(), storeClientType(), storeErrorResponse(), swapOutDecision(), and trimMemory().
Referenced by Ftp::Gateway::appendSuccessHeader(), FwdState::checkRetry(), FwdState::completed(), Ssl::ServerBump::connectedOk(), errorAppendEntry(), Ftp::Relay::failed(), Ftp::Client::failed(), Ftp::Relay::forwardReply(), gopherMimeCreate(), gopherReadReply(), Client::handleAdaptationAborted(), Client::handleAdaptationBlocked(), ClientHttpRequest::handleAdaptationFailure(), Client::handledEarlyAdaptationAbort(), HttpStateData::handleRequestBodyProducerAborted(), FwdState::retryOrBail(), and startWriting().
◆ kickProducer()
void StoreEntry::kickProducer | ( | ) |
Definition at line 368 of file store.cc.
References deferredProducer, NULL, and ScheduleCallHere.
Referenced by store_client::copy(), mayStartHitting(), and storeUnregister().
◆ lastModified() [1/2]
|
inline |
Definition at line 164 of file Store.h.
References lastModified_.
Referenced by Fs::Ufs::UFSSwapDir::addDiskRestore(), addedEntry(), clientReplyContext::cacheHit(), Ipc::StoreMapAnchor::exportInto(), htcpTstReply(), Fs::Ufs::UFSSwapDir::logEntry(), peerDigestFetchSetStats(), peerDigestRequest(), clientReplyContext::processExpired(), Fs::Ufs::RebuildState::rebuildFromDirectory(), refreshIsCachable(), refreshStaleness(), Ipc::StoreMapAnchor::set(), and UFSCleanLog::write().
◆ lastModified() [2/2]
|
inline |
- Returns
- entry's 'effective' modification time
Definition at line 166 of file Store.h.
References attachToDisk(), describeTimestamps(), detachFromDisk(), disk(), hasDisk(), hasEtag(), hasIfMatchEtag(), hasIfNoneMatchEtag(), lastModified_, modifiedSince(), request(), timestamp, and updateOnNotModified().
Referenced by modifiedSince(), and timestampsSet().
◆ lengthWentBad()
void StoreEntry::lengthWentBad | ( | const char * | reason | ) |
Definition at line 1055 of file store.cc.
References debugs, EBIT_SET, ENTRY_BAD_LENGTH, flags, and releaseRequest().
Referenced by complete(), Client::handleAdaptedBodyProducerAborted(), and isEmpty().
◆ lock()
void StoreEntry::lock | ( | const char * | context | ) |
claim shared ownership of this entry (for use in a given context) matching lock() and unlock() contexts eases leak triage but is optional
Definition at line 439 of file store.cc.
References debugs, getMD5Text(), and lock_count.
Referenced by abort(), Client::Client(), Ftp::Gateway::completedListing(), contentLen(), store_client::copy(), UrnState::created(), MimeIcon::created(), clientReplyContext::doGetMoreData(), clientReplyContext::forgetHit(), Mgr::Forwarder::Forwarder(), FwdState::FwdState(), GopherStateData::GopherStateData(), heap_purgeNext(), Rock::IoState::IoState(), ClientHttpRequest::loggingEntry(), peerDigestRequest(), clientReplyContext::processExpired(), clientReplyContext::purgeFoundObject(), release(), Ssl::ServerBump::ServerBump(), clientReplyContext::setReplyToStoreEntry(), statObjectsStart(), storeCreateEntry(), storeErrorResponse(), Ipc::StoreMapUpdate::StoreMapUpdate(), storeSwapOutStart(), storeUnregister(), testPackableStream::testGetStream(), and whoisStart().
◆ locked()
|
inline |
Definition at line 136 of file Store.h.
References buf, callback, checkTooSmall(), conn, createMemObject(), delayAwareRead(), destroyMemObject(), dump(), ensureMemObject(), hashDelete(), hashInsert(), len, lock_count, memoryCachable(), registerAbort(), reset(), setMemStatus(), setNoDelay(), storeId(), timestampsSet(), unregisterAbort(), and validToSend().
Referenced by abandon(), FwdState::dispatch(), doAbandon(), Rock::SwapDir::evictCached(), Fs::Ufs::UFSSwapDir::evictCached(), MemStore::evictCached(), heap_purgeNext(), lru_purgeNext(), lru_stats(), Store::Controller::memoryEvictCached(), neighborsHtcpReply(), neighborsUdpAck(), release(), storeDigestRewriteResume(), storeUnregister(), and Store::Controller::syncCollapsed().
◆ locks()
|
inline |
Definition at line 260 of file Store.h.
References lock_count, release(), and touch().
Referenced by operator<<(), and statStoreEntry().
◆ makePrivate()
void StoreEntry::makePrivate | ( | const bool | shareable | ) |
Definition at line 152 of file store.cc.
Referenced by gopherSendRequest(), HttpStateData::haveParsedReplyHeaders(), isEmpty(), HttpStateData::processSurrogateControl(), and WhoisState::readReply().
◆ makePublic()
Definition at line 145 of file store.cc.
References EBIT_TEST, and RELEASE_REQUEST.
Referenced by adjustVary(), Store::Controller::allowCollapsing(), gopherSendRequest(), HttpStateData::haveParsedReplyHeaders(), Ftp::Gateway::haveParsedReplyHeaders(), isEmpty(), and WhoisState::readReply().
◆ mayStartHitting()
|
inline |
May the caller commit to treating this [previously locked] entry as a cache hit?
Definition at line 279 of file Store.h.
References append(), buffer(), deferProducer(), EBIT_TEST, flush(), KEY_PRIVATE, kickProducer(), shareableWhenPrivate, and vappendf().
Referenced by clientReplyContext::cacheHit(), and clientReplyContext::handleIMSReply().
◆ mayStartSwapOut()
bool StoreEntry::mayStartSwapOut | ( | ) |
Definition at line 333 of file store_swapout.cc.
References Store::Controller::accumulateMore(), assert, SquidConfig::cacheSwap, checkCachable(), Config, debugs, MemObject::SwapOut::decision, EBIT_TEST, MemObject::endOffset(), ENTRY_ABORTED, ENTRY_SPECIAL, MemObject::expectedReplySize(), flags, hasDisk(), HERE(), MemObject::inmem_lo, MemObject::isContiguous(), mem_obj, Store::DiskConfig::n_configured, Store::Root(), store_maxobjsize, STORE_OK, store_status, MemObject::swapout, swapOutDecision(), swappingOut(), MemObject::SwapOut::swImpossible, MemObject::SwapOut::swPossible, MemObject::SwapOut::swStarted, and url().
◆ mem() [1/2]
|
inline |
Definition at line 52 of file Store.h.
References assert, and mem_obj.
Referenced by testRock::addEntry(), asHandleReply(), Client::blockCaching(), clientReplyContext::blockedHit(), Http::Stream::buildRangeHeader(), checkTooSmall(), clientReplyContext::cloneReply(), FwdState::complete(), contentLen(), MemStore::copyFromShmSlice(), testRock::createEntry(), clientReplyContext::handleIMSReply(), hasOneOfEtags(), isEmpty(), netdbExchangeHandleReply(), objectLen(), Http::Stream::packRange(), peerDigestFetchReply(), peerDigestSwapInHeaders(), HttpStateData::peerSupportsConnectionPinning(), clientReplyContext::processConditional(), store_client::readBody(), FwdState::reforward(), clientReplyContext::replyStatus(), reset(), clientReplyContext::sendNotModified(), Rock::HeaderUpdater::startWriting(), storeSwapOutFileClosed(), testUfs::testUfsSearch(), timestampsSet(), MemStore::updateHeadersOrThrow(), and varyEvaluateMatch().
◆ mem() [2/2]
|
inline |
◆ memoryCachable()
bool StoreEntry::memoryCachable | ( | ) |
Definition at line 1325 of file store.cc.
References checkCachable(), Config, MemObject::data_hdr, MemObject::inmem_lo, mem_obj, SquidConfig::memory_cache_first, NULL, SquidConfig::onoff, refcount, mem_hdr::size(), and swappedOut().
Referenced by Store::Controller::keepForLocalMemoryCache(), locked(), and MemStore::shouldCache().
◆ memOutDecision()
void StoreEntry::memOutDecision | ( | const bool | willCacheInRam | ) |
Definition at line 1852 of file store.cc.
References transientsAbandonmentCheck().
Referenced by isEmpty(), MemStore::startCaching(), and MemStore::write().
◆ modifiedSince()
bool StoreEntry::modifiedSince | ( | const time_t | ims, |
const int | imslen = -1 |
||
) | const |
Definition at line 1889 of file store.cc.
References assert, debugs, lastModified(), and url().
Referenced by clientIfRangeMatch(), clientReplyContext::handleIMSReply(), lastModified(), and clientReplyContext::processConditional().
◆ negativeCache()
void StoreEntry::negativeCache | ( | ) |
Set object for negative caching. Preserves any expiry information given by the server. In absence of proper expiry info it will set to expire immediately, or with HTTP-violations enabled the configured negative-TTL is observed
Definition at line 1367 of file store.cc.
References Config, EBIT_SET, ENTRY_NEGCACHED, expires, flags, SquidConfig::negativeTtl, and squid_curtime.
Referenced by abort(), publicKey(), and storeErrorResponse().
◆ objectLen()
|
inline |
Definition at line 248 of file Store.h.
References mem(), and MemObject::object_sz.
Referenced by contentLen(), Mgr::StoreToCommWriter::doneAll(), store_client::moreToSend(), store_client::readBody(), clientReplyContext::storeOKTransferDone(), storeSwapOutFileClosed(), validLength(), and Http::Stream::writeComplete().
◆ operator delete()
◆ operator new()
void * StoreEntry::operator new | ( | size_t | byteCount | ) |
Definition at line 127 of file store.cc.
References assert, and memPoolCreate.
◆ publicKey()
|
inline |
- Returns
- public key (if the entry has it) or nil (otherwise)
Definition at line 103 of file Store.h.
References cacheInMemory(), cacheNegatively(), EBIT_TEST, expireNow(), flags, invokeHandlers(), hash_link::key, KEY_PRIVATE, negativeCache(), releaseRequest(), setPrivateKey(), and swapOut().
Referenced by Store::Disks::evictCached(), Rock::SwapDir::evictCached(), and MemStore::evictCached().
◆ registerAbort()
void StoreEntry::registerAbort | ( | STABH * | cb, |
void * | data | ||
) |
Definition at line 1528 of file store.cc.
References MemObject::abort, assert, MemObject::abort_::callback, cbdataReference, MemObject::abort_::data, mem_obj, and NULL.
Referenced by locked(), Ftp::Relay::Relay(), Mgr::StoreToCommWriter::start(), and FwdState::start().
◆ release()
void StoreEntry::release | ( | const bool | shareable = false | ) |
One of the three methods to get rid of an unlocked StoreEntry object. Removes all unlocked (and marks for eventual removal all locked) Store entries, including attached and unattached entries that have our key. Also destroys us if we are unlocked or makes us private otherwise.
Definition at line 1191 of file store.cc.
References debugs, destroyStoreEntry(), Store::Controller::evictCached(), getMD5Text(), hasDisk(), lock(), locked(), PROF_start, PROF_stop, releaseRequest(), Store::Root(), Store::Controller::store_dirs_rebuilding, STORE_LOG_RELEASE, and storeLog().
Referenced by doAbandon(), Store::Controller::handleIdleEntry(), Ftp::Gateway::haveParsedReplyHeaders(), httpMaybeRemovePublic(), locks(), Fs::Ufs::UFSSwapDir::maintain(), clientReplyContext::purgeDoPurgeGet(), clientReplyContext::purgeDoPurgeHead(), Client::setFinalReply(), Store::Controller::syncCollapsed(), and testRock::testRockSwapOut().
◆ releaseRequest()
void StoreEntry::releaseRequest | ( | const bool | shareable = false | ) |
Makes the StoreEntry private and marks the corresponding entry for eventual removal from the Store.
Definition at line 452 of file store.cc.
References debugs, EBIT_TEST, flags, RELEASE_REQUEST, setPrivateKey(), and shareableWhenPrivate.
Referenced by abort(), checkCachable(), FwdState::completed(), htcpClrStoreEntry(), HttpStateData::HttpStateData(), lengthWentBad(), peerDigestFetchFinish(), peerDigestFetchReply(), clientReplyContext::processMiss(), publicKey(), Ftp::Relay::Relay(), release(), storeErrorResponse(), storeSwapOutFileClosed(), and clientReplyContext::traceReply().
◆ replaceHttpReply()
void StoreEntry::replaceHttpReply | ( | const HttpReplyPointer & | rep, |
const bool | andStartWriting = true |
||
) |
Definition at line 1774 of file store.cc.
References DBG_CRITICAL, debugs, mem_obj, MemObject::replaceBaseReply(), startWriting(), and url().
Referenced by adjustVary(), Ftp::Gateway::completedListing(), MimeIcon::created(), Ftp::Relay::failedErrorMessage(), Mgr::Action::fillEntry(), ftpFail(), ftpSendReply(), gopherMimeCreate(), ClientHttpRequest::handleAdaptedHeader(), internalStart(), isEmpty(), Ftp::Gateway::loginFailed(), netdbBinaryExchange(), clientReplyContext::processMiss(), clientReplyContext::purgeDoPurgeHead(), Mgr::Forwarder::sendError(), clientReplyContext::sendNotModified(), Client::setFinalReply(), Ftp::Server::setReply(), WhoisState::setReplyToOK(), CacheManager::start(), Ftp::Gateway::start(), storeDigestRewriteResume(), storeErrorResponse(), clientReplyContext::traceReply(), and urnHandleReply().
◆ reset()
void StoreEntry::reset | ( | ) |
Definition at line 1669 of file store.cc.
References debugs, expires, lastModified_, mem(), MemObject::reset(), timestamp, and url().
Referenced by FwdState::complete(), HttpStateData::continueAfterParsingHeader(), and locked().
◆ setCollapsingRequirement()
void StoreEntry::setCollapsingRequirement | ( | const bool | required | ) |
Definition at line 2066 of file store.cc.
References EBIT_CLR, EBIT_SET, ENTRY_REQUIRES_COLLAPSING, and flags.
Referenced by Store::Controller::allowCollapsing(), Ipc::StoreMapAnchor::exportInto(), Transients::get(), hittingRequiresCollapsing(), startWriting(), and Store::Controller::syncCollapsed().
◆ setMemStatus()
void StoreEntry::setMemStatus | ( | mem_status_t | new_status | ) |
Definition at line 1572 of file store.cc.
References RemovalPolicy::Add, assert, debugs, EBIT_TEST, MemStore::Enabled(), ENTRY_SPECIAL, flags, getMD5Text(), hot_obj_count, IN_MEMORY, MemObject::inmem_lo, mem_obj, mem_policy, mem_status, NULL, RemovalPolicy::Remove, and MemObject::repl.
Referenced by abort(), Fs::Ufs::UFSSwapDir::addDiskRestore(), addedEntry(), MemStore::anchorEntry(), MemStore::copyFromShm(), destroyMemObject(), Store::Controller::handleIdleEntry(), and locked().
◆ setNoDelay()
void StoreEntry::setNoDelay | ( | bool const | newValue | ) |
Definition at line 253 of file store.cc.
Referenced by HttpStateData::HttpStateData(), and locked().
◆ setPrivateKey()
void StoreEntry::setPrivateKey | ( | const bool | shareable, |
const bool | permanent | ||
) |
Either fills this entry with private key or changes the existing key from public to private.
- Parameters
-
permanent whether this entry should be private forever.
Definition at line 566 of file store.cc.
References assert, debugs, EBIT_SET, EBIT_TEST, Store::Controller::evictCached(), flags, getKeyCounter(), hash_lookup(), hashDelete(), hashInsert(), MemObject::hasUris(), MemObject::id, hash_link::key, KEY_PRIVATE, mem_obj, NULL, RELEASE_REQUEST, Store::Root(), shareableWhenPrivate, store_table, and storeKeyPrivate().
Referenced by publicKey(), releaseRequest(), and storeCreateEntry().
◆ setPublicKey()
Definition at line 593 of file store.cc.
References Store::Controller::addWriting(), adjustVary(), assert, calcPublicKey(), DBG_IMPORTANT, debugs, EBIT_TEST, flags, forcePublicKey(), hash_link::key, KEY_PRIVATE, mem_obj, RELEASE_REQUEST, Store::Root(), and Store::EntryGuard::unlockAndReset().
Referenced by MimeIcon::created(), testRock::createEntry(), isEmpty(), storeCreateEntry(), storeDigestRewriteResume(), and testUfs::testUfsSearch().
◆ startWriting()
void StoreEntry::startWriting | ( | ) |
pack and write reply headers and, maybe, body
Definition at line 1790 of file store.cc.
References assert, MemObject::baseReply(), buffer(), flush(), hittingRequiresCollapsing(), isEmpty(), MemObject::markEndOfReplyHeaders(), mem_obj, Store::Root(), setCollapsingRequirement(), Store::Controller::transientsClearCollapsingRequirement(), and MemObject::updatedReply().
Referenced by adjustVary(), isEmpty(), replaceHttpReply(), and Client::setFinalReply().
◆ storeClientType()
store_client_t StoreEntry::storeClientType | ( | ) | const |
Definition at line 267 of file store.cc.
References assert, DBG_IMPORTANT, debugs, EBIT_TEST, ENTRY_ABORTED, HERE(), STORE_DISK_CLIENT, STORE_MEM_CLIENT, STORE_OK, and SWAPOUT_NONE.
Referenced by isEmpty().
◆ storeErrorResponse()
void StoreEntry::storeErrorResponse | ( | HttpReply * | reply | ) |
Definition at line 1757 of file store.cc.
References buffer(), complete(), flush(), lock(), negativeCache(), releaseRequest(), replaceHttpReply(), and unlock().
Referenced by errorAppendEntry(), isEmpty(), and clientReplyContext::setReplyToReply().
◆ swapOut()
void StoreEntry::swapOut | ( | ) |
Definition at line 160 of file store_swapout.cc.
References abort(), assert, MemObject::availableForSwapOut(), checkDeferRead(), DBG_CRITICAL, debugs, MemObject::SwapOut::decision, doPages(), EBIT_TEST, MemObject::endOffset(), ENTRY_ABORTED, flags, hasDisk(), HERE(), MemObject::inmem_lo, MemObject::lowestMemReaderOffset(), mayStartSwapOut(), mem_obj, Store::Controller::memoryOut(), NULL, MemObject::object_sz, MemObject::objectBytesOnDisk(), StoreIOState::offset(), MemObject::SwapOut::queue_offset, RELEASE_REQUEST, Store::Root(), MemObject::SwapOut::sio, SM_PAGE_SIZE, STORE_OK, STORE_PENDING, store_status, storeSwapOutStart(), storeTooManyDiskFilesOpen(), MemObject::swapout, swapOutFileClose(), swappingOut(), MemObject::SwapOut::swPossible, url(), and StoreIOState::wroteAll.
Referenced by testRock::addEntry(), publicKey(), storeUnregister(), and testUfs::testUfsSearch().
◆ swapOutDecision()
void StoreEntry::swapOutDecision | ( | const MemObject::SwapOut::Decision & | decision | ) |
Definition at line 1858 of file store.cc.
References assert, MemObject::SwapOut::decision, mem_obj, MemObject::swapout, and transientsAbandonmentCheck().
Referenced by isEmpty(), mayStartSwapOut(), and storeSwapOutStart().
◆ swapoutFailed()
|
inline |
Definition at line 128 of file Store.h.
References checkCachable(), checkNegativeHit(), swap_status, SWAPOUT_FAILED, swapOutFileClose(), and url().
Referenced by checkDisk(), store_client::store_client(), storeSwapInStart(), and storeUnregister().
◆ swapOutFileClose()
void StoreEntry::swapOutFileClose | ( | int | how | ) |
Definition at line 261 of file store_swapout.cc.
References assert, debugs, getMD5Text(), RefCount< C >::getRaw(), mem_obj, NULL, MemObject::SwapOut::sio, storeClose(), and MemObject::swapout.
Referenced by abort(), swapOut(), and swapoutFailed().
◆ swappedOut()
|
inline |
Definition at line 126 of file Store.h.
References swap_status, and SWAPOUT_DONE.
Referenced by Store::Disk::canLog(), checkDisk(), Fs::Ufs::UFSSwapDir::evictCached(), Store::Controller::handleIdleEntry(), memoryCachable(), and storeUnregister().
◆ swappingOut()
|
inline |
Definition at line 124 of file Store.h.
References swap_status, and SWAPOUT_WRITING.
Referenced by checkDisk(), doPages(), store_client::fileRead(), mayStartSwapOut(), storeSwapOutFileClosed(), swapOut(), and validToSend().
◆ timestampsSet()
bool StoreEntry::timestampsSet | ( | ) |
Definition at line 1440 of file store.cc.
References Http::AGE, HttpReply::date, debugs, describeTimestamps(), expires, MemObject::freshestReply(), HttpRequest::hier, lastModified(), lastModified_, mem(), mem_obj, HierarchyLogEntry::peerResponseTime(), MemObject::request, squid_curtime, and timestamp.
Referenced by testRock::addEntry(), adjustVary(), MimeIcon::created(), ftpWriteTransferDone(), gopherReadReply(), ClientHttpRequest::handleAdaptedHeader(), HttpStateData::haveParsedReplyHeaders(), Ftp::Gateway::haveParsedReplyHeaders(), locked(), HttpStateData::processSurrogateControl(), WhoisState::readReply(), clientReplyContext::sendNotModified(), storeDigestRewriteFinish(), testUfs::testUfsSearch(), and updateOnNotModified().
◆ touch()
void StoreEntry::touch | ( | ) |
Definition at line 446 of file store.cc.
References lastref, and squid_curtime.
Referenced by locks().
◆ transientsAbandonmentCheck()
|
protected |
Abandon the transient entry our worker has created if neither the shared memory cache nor the disk cache wants to store it. Collapsed requests, if any, should notice and use Plan B instead of getting stuck waiting for us to start swapping the entry out.
Definition at line 1839 of file store.cc.
References debugs, MemObject::SwapOut::decision, hasMemStore(), hasTransients(), mem_obj, Store::Root(), shutting_down, Store::Controller::stopSharing(), MemObject::swapout, and MemObject::SwapOut::swImpossible.
Referenced by memOutDecision(), and swapOutDecision().
◆ trimMemory()
void StoreEntry::trimMemory | ( | const bool | preserveSwappable | ) |
Definition at line 1867 of file store.cc.
References debugs, EBIT_TEST, ENTRY_SPECIAL, flags, IN_MEMORY, MemObject::inmem_lo, mem_obj, mem_status, MemObject::trimSwappable(), and MemObject::trimUnSwappable().
Referenced by isEmpty(), and Store::Controller::memoryOut().
◆ unlock()
int StoreEntry::unlock | ( | const char * | context | ) |
disclaim shared ownership; may remove entry from store and delete it returns remaning lock level (zero for unlocked and possibly gone entry)
Definition at line 463 of file store.cc.
References abandon(), assert, debugs, getMD5Text(), and lock_count.
Referenced by abort(), adjustVary(), Ftp::Gateway::completedListing(), contentLen(), store_client::copy(), ClientHttpRequest::doCallouts(), clientReplyContext::forgetHit(), heap_purgeDone(), ClientHttpRequest::loggingEntry(), peerCountMcastPeersDone(), peerDigestFetchFinish(), peerDigestFetchReply(), clientReplyContext::removeStoreReference(), statObjects(), storeDigestRewriteResume(), storeErrorResponse(), storeLateRelease(), storeSwapOutFileClosed(), storeUnregister(), Mgr::StoreToCommWriter::swanSong(), GopherStateData::swanSong(), testRock::testRockSwapOut(), testUfs::testUfsSearch(), whoisClose(), Client::~Client(), DigestFetchState::~DigestFetchState(), Mgr::Forwarder::~Forwarder(), FwdState::~FwdState(), Rock::IoState::~IoState(), netdbExchangeState::~netdbExchangeState(), Ssl::ServerBump::~ServerBump(), Ipc::StoreMapUpdate::~StoreMapUpdate(), and UrnState::~UrnState().
◆ unregisterAbort()
void StoreEntry::unregisterAbort | ( | ) |
Definition at line 1537 of file store.cc.
References MemObject::abort, assert, MemObject::abort_::callback, cbdataReferenceDone, MemObject::abort_::data, mem_obj, and NULL.
Referenced by abort(), locked(), Mgr::StoreToCommWriter::swanSong(), and FwdState::~FwdState().
◆ updateOnNotModified()
bool StoreEntry::updateOnNotModified | ( | const StoreEntry & | e304 | ) |
Updates easily-accessible non-Store-specific parts of the entry. Use Controller::updateOnNotModified() instead of this helper.
- Returns
- whether anything was actually updated
Definition at line 1505 of file store.cc.
References MemObject::appliedUpdates, assert, MemObject::baseReply(), debugs, MemObject::freshestReply(), mem_obj, HttpReply::recreateOnNotModified(), timestampsSet(), and MemObject::updateReply().
Referenced by lastModified(), and Store::Controller::updateOnNotModified().
◆ url()
const char * StoreEntry::url | ( | ) | const |
Definition at line 1614 of file store.cc.
References mem_obj, NULL, and MemObject::storeId().
Referenced by asHandleReply(), FwdState::complete(), FwdState::connectStart(), HttpStateData::continueAfterParsingHeader(), FwdState::dispatch(), FwdState::fail(), ftpSendReply(), FwdState::FwdState(), Ftp::Gateway::Gateway(), gopherSendComplete(), gopherStart(), gopherTimeout(), gopherToHTML(), Mgr::Forwarder::handleError(), clientReplyContext::handleIMSReply(), HttpStateData::handleMoreRequestBodyAvailable(), FwdState::handleUnregisteredServerEnd(), htcpClear(), htcpClrStoreEntry(), htcpQuery(), HttpStateData::httpBuildRequestHeader(), httpStart(), HttpStateData::httpTimeout(), HttpStateData::keepaliveAccounting(), Ftp::Gateway::listenForDataChannel(), mayStartSwapOut(), modifiedSince(), neighborsUdpPing(), Ftp::Gateway::parseListing(), peerSelect(), peerSelectIcpPing(), clientReplyContext::purgeDoPurgeGet(), clientReplyContext::purgeDoPurgeHead(), WhoisState::readReply(), FwdState::reforward(), replaceHttpReply(), reset(), clientReplyContext::sendMoreData(), FwdState::serverClosed(), UrnState::start(), CacheManager::start(), FwdState::Start(), HttpStateData::statusIfComplete(), storeDigestDel(), storeKeyPublicByRequestMethod(), storeSwapMetaBuild(), storeSwapOutFileClosed(), storeSwapOutStart(), swapOut(), swapoutFailed(), Ftp::Client::timeout(), FwdState::unregister(), PeerSelector::url(), urnHandleReply(), FwdState::useDestinations(), whoisTimeout(), Ftp::Gateway::~Gateway(), and netdbExchangeState::~netdbExchangeState().
◆ validLength()
|
private |
whether the base response has all the body bytes we expect
- Returns
- true for responses with unknown/unspecified body length
- true for responses with the right number of accumulated body bytes
Definition at line 1253 of file store.cc.
References assert, MemObject::baseReply(), debugs, getMD5Text(), mem_obj, MemObject::method, Http::METHOD_HEAD, NULL, objectLen(), Http::scNoContent, and Http::scNotModified.
Referenced by complete().
◆ validToSend()
int StoreEntry::validToSend | ( | ) | const |
Definition at line 1400 of file store.cc.
References EBIT_TEST, ENTRY_ABORTED, ENTRY_NEGCACHED, expires, flags, hasDisk(), MemObject::inmem_lo, mem_obj, RELEASE_REQUEST, squid_curtime, and swappingOut().
Referenced by ICPState::confirmAndPrepHit(), htcpSpecifier::created(), and locked().
◆ vappendf()
|
virtual |
Append operation, with vsprintf(3)-style arguments.
- Note
- arguments may be evaluated more than once, be careful of side-effects
XXX: This method either should not exist or should not be virtual. Kids should not be forced to re-implement vappendf() logic. That logic should be implemented once, using other [Packable] APIs. Packable is not about providing a printf(3) service. Packable is about writing opaque data to various custom destinations.
Implements Packable.
Definition at line 847 of file store.cc.
References append(), assert, buf, fatal(), LOCAL_ARRAY, and xstrerr().
Referenced by mayStartHitting(), storeAppendPrintf(), and storeAppendVPrintf().
◆ write()
void StoreEntry::write | ( | StoreIOBuffer | writeBuffer | ) |
Definition at line 804 of file store.cc.
References assert, MemObject::baseReply(), debugs, EBIT_CLR, EBIT_TEST, ENTRY_FWD_HDR_WAIT, flags, getMD5Text(), Http::Message::hdr_sz, invokeHandlers(), StoreIOBuffer::length, mem_obj, NULL, StoreIOBuffer::offset, PROF_start, PROF_stop, MemObject::readAheadPolicyCanRead(), STORE_PENDING, store_status, storeGetMemSpace(), and MemObject::write().
Referenced by append(), Client::handleMoreAdaptedBodyAvailable(), hasFreshestReply(), ClientHttpRequest::noteMoreBodyDataAvailable(), and Client::storeReplyBody().
Friends And Related Function Documentation
◆ operator<<
|
friend |
Member Data Documentation
◆ cachedESITree
ESIElement::Pointer StoreEntry::cachedESITree |
Definition at line 246 of file Store.h.
Referenced by ESIContext::getCachedAST(), ESIContext::hasCachedAST(), and ESIContext::updateCachedAST().
◆ DeferReader
|
static |
Definition at line 45 of file Store.h.
Referenced by getMD5Text().
◆ deferredProducer
|
private |
Definition at line 323 of file Store.h.
Referenced by deferProducer(), and kickProducer().
◆ expires
time_t StoreEntry::expires |
Definition at line 214 of file Store.h.
Referenced by Fs::Ufs::UFSSwapDir::addDiskRestore(), addedEntry(), clientReplyContext::buildReplyHeader(), checkNegativeHit(), describeTimestamps(), dump(), expireNow(), Ipc::StoreMapAnchor::exportInto(), htcpTstReply(), Fs::Ufs::UFSSwapDir::logEntry(), negativeCache(), peerDigestFetchSetStats(), peerDigestNewDelay(), Fs::Ufs::RebuildState::rebuildFromDirectory(), refreshStaleness(), reset(), Mgr::Forwarder::sendError(), Ipc::StoreMapAnchor::set(), CacheManager::start(), storeDigestRewriteFinish(), timestampsSet(), validToSend(), and UFSCleanLog::write().
◆ flags
uint16_t StoreEntry::flags |
Definition at line 220 of file Store.h.
Referenced by abort(), Fs::Ufs::UFSSwapDir::addDiskRestore(), addedEntry(), Store::Controller::addWriting(), MemStore::anchorEntry(), Rock::SwapDir::anchorEntry(), asHandleReply(), buffer(), clientReplyContext::buildReplyHeader(), clientReplyContext::cacheHit(), Store::Disk::canLog(), Store::Disk::canStore(), checkCachable(), StoreMetaMD5::checkConsistency(), checkDisk(), checkNegativeHit(), CheckQuickAbortIsReasonable(), checkTooSmall(), Store::Controller::checkTransients(), clearPublicKeyScope(), complete(), FwdState::completed(), store_client::copy(), MemStore::copyToShm(), MimeIcon::created(), Ftp::Client::dataRead(), Store::Controller::dereferenceIdle(), FwdState::dispatch(), doAbandon(), dummy_action(), errorAppendEntry(), clientReplyContext::errorInStream(), Store::Disks::evictCached(), Ipc::StoreMapAnchor::exportInto(), flush(), Ftp::Gateway::ftpAcceptDataConnection(), gopherReadReply(), Store::Controller::handleIdleEntry(), clientReplyContext::handleIMSReply(), Http::One::Server::handleReply(), HttpStateData::haveParsedReplyHeaders(), heap_add(), hittingRequiresCollapsing(), httpMaybeRemovePublic(), isAccepting(), lengthWentBad(), Fs::Ufs::UFSSwapDir::logEntry(), mayStartSwapOut(), negativeCache(), neighborsHtcpReply(), neighborsUdpAck(), netdbExchangeHandleReply(), operator<<(), peerDigestFetchedEnough(), peerDigestRequest(), peerSelectIcpPing(), clientReplyContext::processExpired(), Ftp::Gateway::processHeadResponse(), clientReplyContext::processMiss(), Ftp::Relay::processReplyBody(), HttpStateData::processReplyBody(), Ftp::Gateway::processReplyBody(), publicKey(), clientReplyContext::purgeFoundObject(), Ftp::Client::readControlReply(), HttpStateData::readReply(), Fs::Ufs::RebuildState::rebuildFromDirectory(), Store::Controller::referenceBusy(), FwdState::reforward(), refreshCheck(), releaseRequest(), clientReplyContext::replyStatus(), HttpStateData::reusableReply(), clientReplyContext::sendClientOldEntry(), clientReplyContext::sendClientUpstreamResponse(), Client::sentRequestBody(), Ipc::StoreMapAnchor::set(), setCollapsingRequirement(), Client::setFinalReply(), setMemStatus(), setPrivateKey(), setPublicKey(), MemStore::shouldCache(), statObjects(), storeCleanup(), storeCreatePureEntry(), storeDigestAddable(), storeDigestDel(), storeDigestRewriteResume(), storeDirSwapLog(), storeEntryFlags(), storeRebuildParseEntry(), storeSwapInStart(), swapOut(), Store::Controller::syncCollapsed(), testCacheManager::testRegister(), trimMemory(), Store::Controller::updateOnNotModified(), urnHandleReply(), validToSend(), UFSCleanLog::write(), and write().
◆ key
|
inherited |
Definition at line 19 of file hash.h.
Referenced by accessLogInit(), aclMatchExternal(), MemStore::anchorToCache(), Rock::SwapDir::anchorToCache(), cacheIndexCmp(), StoreMetaMD5::checkConsistency(), clearPublicKeyScope(), client_entry(), clientdbCutoffDenied(), clientdbEstablished(), clientdbGetInfo(), clientdbUpdate(), ClientInfo::ClientInfo(), Rock::SwapDir::createStoreIO(), CommQuotaQueue::dequeue(), destroyStoreEntry(), LeakFinder::dump(), CommQuotaQueue::enqueue(), external_acl_cache_add(), forcePublicKey(), fqdncache_entry::fqdncache_entry(), fqdncacheAddEntry(), fqdncacheParse(), hash_join(), hash_lookup(), hash_remove_link(), hash_unlink(), hashDelete(), hashFreeMemory(), hashInsert(), hashKeyStr(), Rock::SwapDir::hasReadableEntry(), htcpQuery(), IdleConnList::IdleConnList(), idnsCallback(), idnsStartQuery(), ipcache_entry::ipcache_entry(), ipcacheAddEntry(), ipcacheRelease(), LeakFinderPtr::LeakFinderPtr(), Fs::Ufs::UFSSwapDir::logEntry(), Store::Controller::markedForDeletionAndAbandoned(), my_free(), ipcache_entry::name(), neighborsUdpPing(), net_db_name::net_db_name(), netdbHashInsert(), netdbLookupAddr(), PconnPool::noteConnectionRemoved(), Ipc::StoreMap::openForUpdating(), Rock::SwapDir::openStoreIO(), peerCountMcastPeersStart(), publicKey(), read_passwd_file(), Ipc::StoreMapAnchor::set(), setPrivateKey(), setPublicKey(), ClientInfo::setWriteLimiter(), snmp_meshCtblFn(), Ident::Start(), MemStore::startCaching(), storeDigestAdd(), storeDigestDel(), storeKeyPrivate(), storeRebuildParseEntry(), storeSwapMetaBuild(), UFSCleanLog::write(), Rock::IoState::writeToDisk(), ClientInfo::~ClientInfo(), ExternalACLEntry::~ExternalACLEntry(), fqdncache_entry::~fqdncache_entry(), IdleConnList::~IdleConnList(), ipcache_entry::~ipcache_entry(), and net_db_name::~net_db_name().
◆ lastModified_
|
private |
Definition at line 216 of file Store.h.
Referenced by describeTimestamps(), dump(), lastModified(), reset(), and timestampsSet().
◆ lastref
time_t StoreEntry::lastref |
Definition at line 213 of file Store.h.
Referenced by Fs::Ufs::UFSSwapDir::addDiskRestore(), addedEntry(), describeTimestamps(), dump(), Ipc::StoreMapAnchor::exportInto(), HeapKeyGen_StoreEntry_GDSF(), HeapKeyGen_StoreEntry_LFUDA(), HeapKeyGen_StoreEntry_LRU(), Fs::Ufs::UFSSwapDir::logEntry(), lru_stats(), Fs::Ufs::RebuildState::rebuildFromDirectory(), Ipc::StoreMapAnchor::set(), storeCreatePureEntry(), touch(), and UFSCleanLog::write().
◆ lock_count
|
private |
◆ mem_obj
MemObject* StoreEntry::mem_obj |
Definition at line 209 of file Store.h.
Referenced by abort(), Store::Disks::accumulateMore(), Transients::addEntry(), adjustVary(), MemStore::anchorEntry(), append(), CollapsedForwarding::Broadcast(), clientReplyContext::cacheHit(), calcPublicKey(), checkCachable(), StoreMetaURL::checkConsistency(), StoreMetaVary::checkConsistency(), CheckQuickAbortIsReasonable(), checkTooBig(), checkTooSmall(), Transients::clearCollapsingRequirement(), complete(), FwdState::complete(), FwdState::completed(), MemStore::completeWriting(), Transients::completeWriting(), store_client::copy(), MemStore::copyFromShm(), MemStore::copyFromShmSlice(), MemStore::copyToShm(), MemStore::copyToShmSlice(), MimeIcon::created(), createMemObject(), Ftp::Client::dataRead(), Store::Controller::dereferenceIdle(), destroyMemObject(), Rock::SwapDir::disconnect(), MemStore::disconnect(), Transients::disconnect(), store_client::doCopy(), doPages(), dump(), ensureMemObject(), errorAppendEntry(), FwdState::establishTunnelThruProxy(), MemStore::evictCached(), Transients::evictCached(), store_client::fileRead(), findPreviouslyCachedEntry(), forcePublicKey(), Transients::get(), gopherReadReply(), Store::Controller::handleIdleEntry(), hasFreshestReply(), hasMemStore(), hasTransients(), HttpStateData::haveParsedReplyHeaders(), heap_guessType(), HeapKeyGen_StoreEntry_GDSF(), HeapKeyGen_StoreEntry_LFUDA(), HeapKeyGen_StoreEntry_LRU(), htcpClear(), httpMaybeRemovePublic(), Transients::isReader(), Transients::isWriter(), Store::Controller::keepForLocalMemoryCache(), mayStartSwapOut(), mem(), memoryCachable(), Transients::monitorIo(), store_client::moreToSend(), neighborsHtcpReply(), neighborsUdpAck(), neighborsUdpPing(), objectSizeForDirSelection(), operator<<(), peerCountHandleIcpReply(), peerCountMcastPeersDone(), peerCountMcastPeersStart(), peerDigestFetchReply(), peerDigestFetchSetStats(), peerDigestSwapInCBlock(), HttpStateData::processReplyHeader(), store_client::readBody(), Transients::readers(), store_client::readHeader(), HttpStateData::readReply(), Store::Controller::referenceBusy(), FwdState::reforward(), refreshCheck(), refreshCheckDigest(), refreshIsCachable(), registerAbort(), repl_guessType(), replaceHttpReply(), store_client::scheduleMemRead(), store_client::scheduleRead(), setMemStatus(), LruPolicyData::setPolicyNode(), HeapPolicyData::setPolicyNode(), setPrivateKey(), setPublicKey(), MemStore::shouldCache(), FwdState::Start(), MemStore::startCaching(), startWriting(), statObjectsOpenfdFilter(), statObjectsVmFilter(), statStoreEntry(), Transients::status(), storeClientCopyPending(), storeClientListAdd(), storeDigestRewriteFinish(), storeDigestRewriteStart(), storeLog(), clientReplyContext::storeNotOKTransferDone(), storePendingNClients(), storeSwapInStart(), storeSwapMetaBuild(), storeSwapOutFileClosed(), storeSwapOutStart(), storeUnregister(), swapOut(), swapOutDecision(), swapOutFileClose(), Store::Controller::syncCollapsed(), testRock::testRockSwapOut(), timestampsSet(), transientsAbandonmentCheck(), trimMemory(), store_client::unpackHeader(), unregisterAbort(), MemStore::updateAnchored(), MemStore::updateHeaders(), Store::Controller::updateOnNotModified(), updateOnNotModified(), url(), validLength(), validToSend(), varyEvaluateMatch(), MemStore::write(), write(), and HttpStateData::wroteLast().
◆ mem_status
mem_status_t StoreEntry::mem_status |
Definition at line 228 of file Store.h.
Referenced by clientReplyContext::cacheHit(), complete(), Store::Controller::dereferenceIdle(), describeStatuses(), dump(), operator<<(), Store::Controller::referenceBusy(), setMemStatus(), MemStore::shouldCache(), storeSwapInStart(), trimMemory(), and Store::Controller::updateOnNotModified().
◆ next
|
inherited |
Definition at line 20 of file hash.h.
Referenced by clientdbGC(), Store::LocalSearch::copyBucket(), dump(), hash_join(), hash_lookup(), hash_next(), hash_remove_link(), hash_unlink(), IdleConnList::IdleConnList(), LeakFinderPtr::LeakFinderPtr(), and lru_stats().
◆ ping_status
ping_status_t StoreEntry::ping_status |
Definition at line 230 of file Store.h.
Referenced by Fs::Ufs::UFSSwapDir::addDiskRestore(), addedEntry(), Rock::SwapDir::anchorEntry(), FwdState::cancelOpening(), describeStatuses(), FwdState::dispatch(), dump(), neighborsHtcpReply(), neighborsUdpAck(), operator<<(), peerCountMcastPeersStart(), peerSelectIcpPing(), and storeCreatePureEntry().
◆ pool
|
staticprivate |
◆ refcount
uint16_t StoreEntry::refcount |
Definition at line 219 of file Store.h.
Referenced by Fs::Ufs::UFSSwapDir::addDiskRestore(), addedEntry(), dump(), Ipc::StoreMapAnchor::exportInto(), HeapKeyGen_StoreEntry_GDSF(), HeapKeyGen_StoreEntry_LFUDA(), Fs::Ufs::UFSSwapDir::logEntry(), memoryCachable(), Fs::Ufs::RebuildState::rebuildFromDirectory(), Ipc::StoreMapAnchor::set(), statStoreEntry(), store_client::store_client(), storeCreatePureEntry(), and UFSCleanLog::write().
◆ repl
RemovalPolicyNode StoreEntry::repl |
Definition at line 210 of file Store.h.
Referenced by Fs::Ufs::UFSSwapDir::dereference(), Rock::SwapDir::dereference(), heap_guessType(), Rock::SwapDir::ignoreReferences(), Fs::Ufs::UFSSwapDir::reference(), Rock::SwapDir::reference(), repl_guessType(), Fs::Ufs::UFSSwapDir::replacementAdd(), Fs::Ufs::UFSSwapDir::replacementRemove(), LruPolicyData::setPolicyNode(), HeapPolicyData::setPolicyNode(), and Rock::SwapDir::trackReferences().
◆ shareableWhenPrivate
|
private |
Nobody can find/lock KEY_PRIVATE entries, but some transactions (e.g., collapsed requests) find/lock a public entry before it becomes private. May such transactions start using the now-private entry they previously locked? This member should not affect transactions that already started reading from the entry.
Definition at line 319 of file Store.h.
Referenced by mayStartHitting(), operator<<(), releaseRequest(), and setPrivateKey().
◆ store_status
store_status_t StoreEntry::store_status |
Definition at line 232 of file Store.h.
Referenced by abort(), Fs::Ufs::UFSSwapDir::addDiskRestore(), addedEntry(), MemStore::anchorEntry(), Rock::SwapDir::anchorEntry(), append(), asHandleReply(), clientReplyContext::cacheHit(), checkCachable(), checkNegativeHit(), CheckQuickAbortIsReasonable(), FwdState::checkRetry(), checkTooSmall(), clientReplyContext::checkTransferDone(), complete(), FwdState::completed(), MemStore::copyFromShm(), describeStatuses(), doAbandon(), store_client::doCopy(), Mgr::StoreToCommWriter::doneAll(), doPages(), dump(), errorAppendEntry(), HttpStateData::httpTimeout(), isAccepting(), mayStartSwapOut(), store_client::moreToSend(), netdbExchangeHandleReply(), operator<<(), peerDigestPDFinish(), Ftp::Client::readControlReply(), FwdState::reforward(), storeCreatePureEntry(), storeDigestAddable(), storeUnregister(), swapOut(), testStoreController::testMaxSize(), testStoreHashIndex::testMaxSize(), testStoreHashIndex::testStats(), testStoreController::testStats(), urnHandleReply(), MemStore::write(), and write().
◆ swap_dirn
sdirno StoreEntry::swap_dirn |
Definition at line 226 of file Store.h.
Referenced by addedEntry(), attachToDisk(), checkDisk(), Fs::Ufs::UFSSwapDir::dereference(), Rock::SwapDir::dereference(), detachFromDisk(), disk(), dump(), hasDisk(), operator<<(), Fs::Ufs::UFSSwapDir::reference(), Rock::SwapDir::reference(), Fs::Ufs::UFSSwapDir::replacementRemove(), statStoreEntry(), storeCleanupDoubleCheck(), storeDirSwapLog(), storeLog(), storeSwapInFileNotify(), storeSwapOutFileClosed(), storeSwapOutStart(), testRock::testRockSwapOut(), testUfs::testUfsSearch(), Store::Disks::updateAnchored(), and Store::Controller::updateOnNotModified().
◆ swap_file_sz
uint64_t StoreEntry::swap_file_sz |
Definition at line 218 of file Store.h.
Referenced by Fs::Ufs::UFSSwapDir::addDiskRestore(), addedEntry(), MemStore::anchorEntry(), Store::Disk::canLog(), Fs::Ufs::UFSSwapDir::doubleCheck(), dump(), Fs::Ufs::UFSSwapDir::evictCached(), Ipc::StoreMapAnchor::exportInto(), Fs::Ufs::UFSSwapDir::finalizeSwapoutSuccess(), HeapKeyGen_StoreEntry_GDSF(), Rock::Rebuild::importEntry(), Fs::Ufs::UFSSwapDir::logEntry(), Rock::SwapDir::openStoreIO(), Fs::Ufs::RebuildState::rebuildFromDirectory(), Ipc::StoreMapAnchor::set(), Rock::HeaderUpdater::startWriting(), storeDigestAddable(), storeRebuildParseEntry(), storeSwapOutFileClosed(), store_client::unpackHeader(), MemStore::updateAnchoredWith(), Rock::SwapDir::updateAnchoredWith(), and UFSCleanLog::write().
◆ swap_filen
sfileno StoreEntry::swap_filen |
Definition at line 224 of file Store.h.
Referenced by Fs::Ufs::UFSSwapDir::addDiskRestore(), addedEntry(), attachToDisk(), checkDisk(), Fs::Ufs::UFSSwapDir::dereference(), Rock::SwapDir::dereference(), detachFromDisk(), Rock::SwapDir::disconnect(), Fs::Ufs::UFSSwapDir::doubleCheck(), dump(), Fs::Ufs::UFSSwapDir::dumpEntry(), Rock::SwapDir::evictCached(), Fs::Ufs::UFSSwapDir::evictCached(), hasDisk(), Fs::Ufs::UFSSwapDir::logEntry(), Fs::Ufs::UFSStrategy::open(), Rock::SwapDir::openStoreIO(), operator<<(), Fs::Ufs::UFSSwapDir::reference(), Rock::SwapDir::reference(), statStoreEntry(), storeDirSwapLog(), storeLog(), storeSwapInFileNotify(), storeSwapOutFileClosed(), storeSwapOutStart(), testRock::testRockSwapOut(), testUfs::testUfsSearch(), StoreIOState::touchingStoreEntry(), Fs::Ufs::UFSStoreState::UFSStoreState(), Rock::SwapDir::updateAnchored(), Rock::SwapDir::updateHeaders(), and UFSCleanLog::write().
◆ swap_status
swap_status_t StoreEntry::swap_status |
Definition at line 234 of file Store.h.
Referenced by addedEntry(), attachToDisk(), checkDisk(), describeStatuses(), detachFromDisk(), dump(), operator<<(), storeSwapOutFileClosed(), storeSwapOutStart(), swapoutFailed(), swappedOut(), swappingOut(), and testRock::testRockSwapOut().
◆ timestamp
time_t StoreEntry::timestamp |
Definition at line 212 of file Store.h.
Referenced by Fs::Ufs::UFSSwapDir::addDiskRestore(), addedEntry(), clientReplyContext::buildReplyHeader(), describeTimestamps(), dump(), Ipc::StoreMapAnchor::exportInto(), htcpTstReply(), lastModified(), Fs::Ufs::UFSSwapDir::logEntry(), Fs::Ufs::RebuildState::rebuildFromDirectory(), refreshCheck(), refreshStaleness(), reset(), clientReplyContext::sendNotModified(), Ipc::StoreMapAnchor::set(), storeCreatePureEntry(), storeSwapMetaBuild(), timestampsSet(), and UFSCleanLog::write().
The documentation for this class was generated from the following files:
- src/Store.h
- src/store.cc
- src/store_client.cc
- src/store_swapout.cc
- src/tests/stub_store.cc
- src/tests/stub_store_client.cc