store.cc File Reference
#include "squid.h"
#include "CacheDigest.h"
#include "CacheManager.h"
#include "comm/Connection.h"
#include "comm/Read.h"
#include "ETag.h"
#include "event.h"
#include "fde.h"
#include "globals.h"
#include "http.h"
#include "HttpReply.h"
#include "HttpRequest.h"
#include "mem_node.h"
#include "MemObject.h"
#include "mgr/Registration.h"
#include "mgr/StoreIoAction.h"
#include "profiler/Profiler.h"
#include "repl_modules.h"
#include "RequestFlags.h"
#include "SquidConfig.h"
#include "SquidTime.h"
#include "StatCounters.h"
#include "stmem.h"
#include "Store.h"
#include "store/Controller.h"
#include "store/Disk.h"
#include "store/Disks.h"
#include "store_digest.h"
#include "store_key_md5.h"
#include "store_log.h"
#include "store_rebuild.h"
#include "StoreClient.h"
#include "StoreIOState.h"
#include "StoreMeta.h"
#include "StrList.h"
#include "swap_log_op.h"
#include "tools.h"
#include "DelayPools.h"
#include "mem/Pool.h"
#include <climits>
#include <stack>
#include "comm.h"
Include dependency graph for store.cc:

Go to the source code of this file.

Classes

struct  _storerepl_entry
 
struct  _store_check_cachable_hist
 

Macros

#define REBUILD_TIMESTAMP_DELTA_MAX   2
 
#define STORE_IN_MEM_BUCKETS   (229)
 
#define MAINTAIN_MAX_SCAN   1024
 
#define MAINTAIN_MAX_REMOVE   64
 

Typedefs

typedef struct _storerepl_entry storerepl_entry_t
 

Functions

static int getKeyCounter (void)
 
void destroyStoreEntry (void *data)
 
StoreEntrystoreGetPublic (const char *uri, const HttpRequestMethod &method)
 
StoreEntrystoreGetPublicByRequestMethod (HttpRequest *req, const HttpRequestMethod &method, const KeyScope keyScope)
 
StoreEntrystoreGetPublicByRequest (HttpRequest *req, const KeyScope keyScope)
 
StoreEntrystoreCreatePureEntry (const char *url, const char *log_url, const RequestFlags &flags, const HttpRequestMethod &method)
 
StoreEntrystoreCreateEntry (const char *url, const char *logUrl, const RequestFlags &flags, const HttpRequestMethod &method)
 
void storeAppendPrintf (StoreEntry *e, const char *fmt,...)
 
void storeAppendVPrintf (StoreEntry *e, const char *fmt, va_list vargs)
 
int storeTooManyDiskFilesOpen (void)
 
void storeCheckCachableStats (StoreEntry *sentry)
 
void storeGetMemSpace (int size)
 
static void storeLateRelease (void *)
 
static void storeRegisterWithCacheManager (void)
 
void storeInit (void)
 
void storeConfigure (void)
 
void storeFreeMemory (void)
 
int expiresMoreThan (time_t expires, time_t when)
 
void storeFsInit (void)
 
void storeReplAdd (const char *type, REMOVALPOLICYCREATE *create)
 
RemovalPolicycreateRemovalPolicy (RemovalPolicySettings *settings)
 
std::ostream & operator<< (std::ostream &os, const StoreEntry &e)
 

Variables

const char * memStatusStr []
 
const char * pingStatusStr []
 
const char * storeStatusStr []
 
const char * swapStatusStr []
 
static storerepl_entry_tstorerepl_list = NULL
 
static OBJH storeCheckCachableStats
 
static EVH storeLateRelease
 
static std::stack< StoreEntry * > LateReleaseStack
 
struct _store_check_cachable_hist store_check_cachable_hist
 

Macro Definition Documentation

#define MAINTAIN_MAX_REMOVE   64

Definition at line 1246 of file store.cc.

#define MAINTAIN_MAX_SCAN   1024

Definition at line 1245 of file store.cc.

#define REBUILD_TIMESTAMP_DELTA_MAX   2

StoreEntry uses explicit new/delete operators, which set pool chunk size to 2MB XXX: convert to MEMPROXY_CLASS() API

Definition at line 60 of file store.cc.

#define STORE_IN_MEM_BUCKETS   (229)

Definition at line 62 of file store.cc.

Typedef Documentation

Definition at line 92 of file store.cc.

Function Documentation

int expiresMoreThan ( time_t  expires,
time_t  when 
)

Definition at line 1476 of file store.cc.

References squid_curtime.

static int getKeyCounter ( void  )
static

Definition at line 573 of file store.cc.

Referenced by StoreEntry::setPrivateKey().

void storeAppendPrintf ( StoreEntry e,
const char *  fmt,
  ... 
)

Definition at line 904 of file store.cc.

Referenced by DiskThreadsIOStrategy::aioStats(), asnStats(), cacheDigestGuessStatsReport(), cacheDigestReport(), carpCachemgr(), cbdataDump(), clientdbDump(), commIncomingStats(), Auth::User::CredentialsCacheStats(), DelaySpec::dump(), DelayPool::dump(), ClientDelayPool::dump(), Mgr::FunAction::dump(), Mgr::MenuAction::dump(), MessageDelayPool::dump(), Fs::Ufs::UFSSwapDir::dump(), Mgr::StoreIoAction::dump(), Format::Format::dump(), EventScheduler::dump(), Ipc::ReadWriteLockStats::dump(), Mgr::ReconfigureAction::dump(), DiskdAction::dump(), Mgr::RotateAction::dump(), Mgr::OfflineToggleAction::dump(), Note::dump(), Auth::SchemeConfig::dump(), Mgr::InfoAction::dump(), dump_access_log(), dump_acl(), dump_acl_address(), dump_acl_b_size_t(), dump_acl_tos(), dump_address(), dump_b_int64_t(), dump_b_size_t(), dump_b_ssize_t(), dump_cachedir(), dump_cachemgrpasswd(), dump_CpuAffinityMap(), dump_denyinfo(), dump_externalAclHelper(), dump_generic_port(), dump_HeaderWithAclList(), dump_icap_service_failure_limit(), dump_int(), dump_int64_t(), dump_IpAddress_list(), dump_kb_int64_t(), dump_memcachemode(), dump_onoff(), dump_peer(), dump_peer_options(), dump_peers(), dump_PortCfg(), dump_refreshpattern(), dump_removalpolicy(), dump_sslproxy_cert_adapt(), dump_sslproxy_cert_sign(), dump_string(), dump_time_msec(), dump_time_t(), dump_tristate(), dump_u_short(), dump_uri_whitespace(), dump_UrlHelperTimeout(), dump_wccp2_amethod(), dump_wccp2_method(), dump_wccp2_service(), dump_wccp2_service_info(), dump_wordlist(), DumpAvgStat(), DumpCountersStats(), PconnPool::dumpHash(), PconnPool::dumpHist(), DumpInfo(), DumpIoStats(), DumpMallocStatistics(), DelayConfig::dumpPoolCount(), ClientDelayConfig::dumpPoolCount(), Rock::SwapDir::dumpRateOption(), Adaptation::Config::dumpService(), Adaptation::Config::DumpServiceGroups(), DumpServiceTimesStats(), Rock::SwapDir::dumpSizeOption(), fde::DumpStats(), fde::dumpStats(), Rock::SwapDir::dumpTimeOption(), externalAclStats(), fqdnStats(), fwdStats(), gopherEndHTML(), gopherHTMLFooter(), gopherHTMLHeader(), gopherToHTML(), header_mangler_dump_access(), header_mangler_dump_replacement(), httpHdrCcStatDumper(), httpHdrScStatDumper(), httpHdrScTargetStatDumper(), httpHeaderFieldStatDumper(), httpHeaderFldsPerHdrDumper(), httpHeaderStatDump(), httpHeaderStoreReport(), idnsStats(), ipcacheStatPrint(), lru_stats(), netdbBinaryExchange(), netdbDump(), Fs::Ufs::UFSSwapDir::optionIODump(), Store::Disk::optionObjectSizeDump(), DiskdIOStrategy::optionQ1Dump(), DiskdIOStrategy::optionQ2Dump(), Store::Disk::optionReadOnlyDump(), peerDigestStatsReport(), peerSourceHashCachemgr(), peerUserHashCachemgr(), printRadixNode(), redirectStats(), refreshCountsStats(), refreshCountsStatsEntry(), refreshStats(), squidaio_stats(), Store::Disks::stat(), Store::Controller::stat(), Store::Disk::stat(), MemStore::stat(), Transients::stat(), stat_ipcache_get(), statClientRequests(), statCountersHistograms(), statDigestBlob(), Fs::Ufs::UFSSwapDir::statfs(), DiskdIOStrategy::statfs(), Rock::SwapDir::statfs(), statHistBinDumper(), statHistEnumDumper(), statHistIntDumper(), statHistSBufDumper(), statObjects(), statPeerSelect(), DelaySpec::stats(), DelayBucket::stats(), DelayTaggedBucket::stats(), DelayUserBucket::stats(), DelayTagged::stats(), DelayUser::stats(), DelayPools::Stats(), Aggregate::stats(), VectorPool::stats(), ClassCBucket::stats(), ClassCHostPool::stats(), statUtilization(), storeCheckCachableStats(), storeDigestReport(), storeIdStats(), storeLogTagsHist(), xprof_show_item(), xprof_summary(), and xprof_summary_item().

void storeAppendVPrintf ( StoreEntry e,
const char *  fmt,
va_list  vargs 
)

Definition at line 914 of file store.cc.

void storeConfigure ( void  )

Definition at line 1404 of file store.cc.

References Store::Root(), and Store::Controller::updateLimits().

Referenced by configDoConfigure(), and storeSwapOutFileClosed().

void storeFreeMemory ( void  )

Definition at line 1466 of file store.cc.

References Store::FreeMemory(), NULL, and store_digest.

Referenced by SquidShutdown().

void storeFsInit ( void  )

Definition at line 1764 of file store.cc.

References storeReplSetup().

Referenced by SquidMain().

StoreEntry* storeGetPublicByRequestMethod ( HttpRequest req,
const HttpRequestMethod method,
const KeyScope  keyScope 
)
static void storeLateRelease ( void *  )
static
static void storeRegisterWithCacheManager ( void  )
static
void storeReplAdd ( const char *  type,
REMOVALPOLICYCREATE create 
)
int storeTooManyDiskFilesOpen ( void  )

Variable Documentation

std::stack<StoreEntry*> LateReleaseStack
static

Definition at line 111 of file store.cc.

const char* memStatusStr[]
Initial value:
= {
"NOT_IN_MEMORY",
"IN_MEMORY"
}
Todo:
Convert these string constants to enum string-arrays generated

Definition at line 66 of file store.cc.

const char* pingStatusStr[]
Initial value:
= {
"PING_NONE",
"PING_WAITING",
"PING_DONE"
}

Definition at line 71 of file store.cc.

struct _store_check_cachable_hist store_check_cachable_hist
OBJH storeCheckCachableStats
static

Definition at line 105 of file store.cc.

Referenced by storeRegisterWithCacheManager().

EVH storeLateRelease
static

Definition at line 106 of file store.cc.

Referenced by storeInit(), and storeLateRelease().

storerepl_entry_t* storerepl_list = NULL
static

Definition at line 99 of file store.cc.

const char* storeStatusStr[]
Initial value:
= {
"STORE_OK",
"STORE_PENDING"
}

Definition at line 77 of file store.cc.

const char* swapStatusStr[]
Initial value:
= {
"SWAPOUT_NONE",
"SWAPOUT_WRITING",
"SWAPOUT_DONE"
}

Definition at line 82 of file store.cc.

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors