A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/group__BDB__BLOB__Cache.html below:

NCBI C++ ToolKit: BDB library BLOB Cache

enum   SBDB_CacheUnitStatistics::EErrGetPut { SBDB_CacheUnitStatistics::eErr_Unknown , SBDB_CacheUnitStatistics::eErr_Put , SBDB_CacheUnitStatistics::eErr_Get }   Put/Get errors. More...
  enum   CBDB_Cache::EWriteSyncMode { CBDB_Cache::eWriteSync , CBDB_Cache::eWriteNoSync }   Suggest page size. More...
  enum   CBDB_Cache::ELockMode { CBDB_Cache::eNoLock , CBDB_Cache::ePidLock }   Locking modes to protect cache instance. More...
  enum   CBDB_Cache::ETRansact { CBDB_Cache::eUseTrans , CBDB_Cache::eNoTrans }   Underlying BDB database can be configured using transactional or non-transactional API. More...
  enum   CBDB_Cache::EBlobAccessType { CBDB_Cache::eBlobStore , CBDB_Cache::eBlobUpdate , CBDB_Cache::eBlobRead }   access type for "UpdateAccessTime" methods More...
  enum   CBDB_Cache::EBlobCheckinMode { CBDB_Cache::eBlobCheckIn , CBDB_Cache::eBlobCheckIn_Create }   BLOB check-in mode. More...
  enum   CBDB_Cache::EBlobCheckinRes { CBDB_Cache::EBlobCheckIn_NotFound , CBDB_Cache::eBlobCheckIn_Found , CBDB_Cache::eBlobCheckIn_Created }   Result of BLOB check-in process. More...
  void  BDB_Register_Cache (void)   Register NCBI_BDB_ICacheEntryPoint. More...
    SCache_AttrDB::SCache_AttrDB ()     SCache_IdIDX::SCache_IdIDX ()     SBDB_TimeAccessStatistics::SBDB_TimeAccessStatistics (unsigned d, unsigned hr, unsigned put, unsigned get)     SBDB_CacheUnitStatistics::SBDB_CacheUnitStatistics ()   void  SBDB_CacheUnitStatistics::Init ()   void  SBDB_CacheUnitStatistics::AddStore (time_t tm, unsigned store, unsigned update, unsigned blob_size, unsigned overflow)   void  SBDB_CacheUnitStatistics::AddRead (time_t tm)   void  SBDB_CacheUnitStatistics::AddExplDelete ()   void  SBDB_CacheUnitStatistics::AddPurgeDelete ()   void  SBDB_CacheUnitStatistics::AddNeverRead ()   void  SBDB_CacheUnitStatistics::AddInternalError (EErrGetPut operation)   void  SBDB_CacheUnitStatistics::AddProtocolError (EErrGetPut operation)   void  SBDB_CacheUnitStatistics::AddNoBlobError (EErrGetPut operation)   void  SBDB_CacheUnitStatistics::AddCommError (EErrGetPut operation)   void  SBDB_CacheUnitStatistics::AddBlobQuotaError ()   static void  SBDB_CacheUnitStatistics::AddToHistogram (TBlobSizeHistogram *hist, unsigned size)   void  SBDB_CacheUnitStatistics::ConvertToRegistry (IRWRegistry *reg, const string &sect_name_postfix) const   Convert statistics into registry sections and entries. More...
  void  SBDB_CacheUnitStatistics::PrintStatistics (CNcbiOstream &out) const   void  SBDB_CacheUnitStatistics::InitHistorgam (TBlobSizeHistogram *hist)   void  SBDB_CacheUnitStatistics::x_AddErrGetPut (EErrGetPut operation)     SBDB_CacheStatistics::SBDB_CacheStatistics ()   void  SBDB_CacheStatistics::Init ()   Drop all collected statistics. More...
  void  SBDB_CacheStatistics::AddStore (const string &client, time_t tm, unsigned store, unsigned update, unsigned blob_size, unsigned overflow)   void  SBDB_CacheStatistics::AddRead (const string &client, time_t tm)   void  SBDB_CacheStatistics::AddExplDelete (const string &client)   void  SBDB_CacheStatistics::AddPurgeDelete (const string &client)   void  SBDB_CacheStatistics::AddNeverRead (const string &client)   void  SBDB_CacheStatistics::AddInternalError (const string &client, SBDB_CacheUnitStatistics::EErrGetPut operation)   void  SBDB_CacheStatistics::AddProtocolError (const string &client, SBDB_CacheUnitStatistics::EErrGetPut operation)   void  SBDB_CacheStatistics::AddNoBlobError (const string &client, SBDB_CacheUnitStatistics::EErrGetPut operation)   void  SBDB_CacheStatistics::AddCommError (const string &client, SBDB_CacheUnitStatistics::EErrGetPut operation)   void  SBDB_CacheStatistics::AddBlobQuotaError (const string &client)   void  SBDB_CacheStatistics::ConvertToRegistry (IRWRegistry *reg) const   void  SBDB_CacheStatistics::PrintStatistics (CNcbiOstream &out) const   SBDB_CacheUnitStatisticsSBDB_CacheStatistics::GlobalStatistics ()     CBDB_Cache::CBDB_Cache ()   virtual  CBDB_Cache::~CBDB_Cache ()   void  CBDB_Cache::SetWriteSync (EWriteSyncMode wsync)   Set write syncronization. More...
  EWriteSyncMode  CBDB_Cache::GetWriteSync () const   void  CBDB_Cache::RunPurgeThread (unsigned purge_delay=30)   Schedule a background Purge thread (cleans the cache from the obsolete entries) SetPurgeBatchSize and SetBatchSleep should be used to regulate the thread priority. More...
  void  CBDB_Cache::StartPurgeThread ()   Start background thread. More...
  void  CBDB_Cache::StopPurgeThread ()   Stop background thread. More...
  void  CBDB_Cache::Open (const string &cache_path, const string &cache_name, ELockMode lm=eNoLock, Uint8 cache_ram_size=0, ETRansact use_trans=eUseTrans, unsigned int log_mem_size=0)   Open local cache instance (read-write access) If cache does not exists it is created. More...
  void  CBDB_Cache::Verify (const string &cache_path, const string &cache_name, const string &err_file=0, bool force_remove=false)   Run verification of the cache database. More...
  void  CBDB_Cache::OpenReadOnly (const string &cache_path, const string &cache_name, unsigned int cache_ram_size=0)   Open local cache in read-only mode. More...
  CBDB_EnvCBDB_Cache::GetEnv ()   Get environment. More...
  bool  CBDB_Cache::IsJoinedEnv ()   Return true if environment is not created but joined. More...
  void  CBDB_Cache::Close ()   bool  CBDB_Cache::IsReadOnly () const   Return TRUE if cache is read-only. More...
  void  CBDB_Cache::SetMonitor (IServer_Monitor *monitor)   Set monitor (class does NOT take ownership) More...
  IServer_MonitorCBDB_Cache::GetMonitor ()   Get monitor. More...
  void  CBDB_Cache::SetReadUpdateLimit (unsigned)   Set update attribute limit (0 by default) More...
  void  CBDB_Cache::CleanLog ()   Remove all non-active LOG files. More...
  void  CBDB_Cache::SetLogFileMax (unsigned fl_size)   Set transaction log file size. More...
  void  CBDB_Cache::SetLogDir (const string &log_dir)   Transaction log directory. More...
  void  CBDB_Cache::SetInitIfDirty (bool value)   void  CBDB_Cache::SetPurgeBatchSize (unsigned batch_size)   Number of records in scanned at once by Purge Cache is exclusively locks an internal mutex while scanning the batch and all other threads is getting locked. More...
  unsigned  CBDB_Cache::GetPurgeBatchSize () const   void  CBDB_Cache::SetBatchSleep (unsigned sleep)   Set sleep in milliseconds between Purge batches (for low priority Purge processes) More...
  unsigned  CBDB_Cache::GetBatchSleep () const   void  CBDB_Cache::StopPurge ()   Request to stop Purge. More...
  void  CBDB_Cache::CleanLogOnPurge (unsigned int factor)   When factor is non zero every factor-even Purge will remove old log files. More...
  void  CBDB_Cache::SetCheckpoint (unsigned int bytes)   Checkpoint the database at least as often as every bytes of log file are written. More...
  void  CBDB_Cache::SetCheckpointDelay (unsigned int delay)   Checkpoint the database every 'delay' minutes. More...
  void  CBDB_Cache::SetOverflowLimit (unsigned limit)   unsigned  CBDB_Cache::GetOverflowLimit () const   void  CBDB_Cache::SetTTL_Prolongation (unsigned ttl_prolong)   Maximum limit for read updates (blob expires eventually even if it is accessed) 0 - unlimited prolongation (default) More...
  unsigned  CBDB_Cache::GetTTL_Prolongation () const   Get max limit for read update. More...
  void  CBDB_Cache::SetMaxBlobSize (unsigned max_size)   Set max allowed BLOB size. More...
  unsigned  CBDB_Cache::GetMaxBlobSize () const   Get max allowed BLOB size. More...
  void  CBDB_Cache::SetRR_Volumes (unsigned rrv)   Set number of rotated round-robin volumes. More...
  void  CBDB_Cache::SetMempTrickle (unsigned memp_trickle)   Set dirty page write percent. More...
  const SBDB_CacheStatisticsCBDB_Cache::GetStatistics () const   Get cache operations statistics. More...
  void  CBDB_Cache::GetStatistics (SBDB_CacheStatistics *cache_stat) const   Get cache operations statistics. More...
  void  CBDB_Cache::InitStatistics ()   Drop the previously collected statistics. More...
  void  CBDB_Cache::SetSaveStatistics (bool save)   bool  CBDB_Cache::IsSaveStatistics (void) const   void  CBDB_Cache::Lock ()   Lock cache access. More...
  void  CBDB_Cache::Unlock ()   Unlock cache access. More...
  void  CBDB_Cache::DropBlob (const string &key, int version, const string &subkey, bool for_update, unsigned *blob_id, unsigned *coord)   Delete BLOB. More...
  const stringCBDB_Cache::GetName () const   unsigned  CBDB_Cache::GetNextBlobId (bool lock_id)   Get next BLOB id out from the atomic couter. More...
  bool  CBDB_Cache::IsLocked (unsigned blob_id)   Check if BLOB is locked. More...
  bool  CBDB_Cache::IsLocked (const string &key, int version, const string &subkey)   void  CBDB_Cache::KillBlob (const string &key, int version, const string &subkey, int overflow, unsigned blob_id)   void  CBDB_Cache::WriteOverflow (CNcbiOfstream &overflow_file, const string &overflow_file_path, const char *buf, streamsize count)   Write to the overflow file with error checking If write failes, method deletes the file to avoid file system space leak then throws an exception. More...
  void  CBDB_Cache::RegisterOverflow (const string &key, int version, const string &subkey, unsigned time_to_live, const string &owner)   Register BLOB object as overflow file. More...
  time_t  CBDB_Cache::ComputeMaxTime (time_t start) const   Compute maximum TTL. More...
  void  CBDB_Cache::x_Store (unsigned blob_id, const string &key, int version, const string &subkey, const void *data, size_t size, unsigned int time_to_live, const string &owner, bool do_blob_lock)   time_t  CBDB_Cache::x_ComputeExpTime (int time_stamp, unsigned ttl, int timeout)   bool  CBDB_Cache::x_CheckTimeStampExpired (SCache_AttrDB &attr_db, time_t curr, time_t *exp_time=0)   void  CBDB_Cache::x_UpdateReadAccessTime (const string &key, int version, const string &subkey, CBDB_Transaction &trans)   void  CBDB_Cache::x_UpdateAccessTime (const string &key, int version, const string &subkey, EBlobAccessType access_type, CBDB_Transaction &trans)   Transactional update of access time attributes. More...
  bool  CBDB_Cache::x_RetrieveBlobAttributes (const string &key, int version, const string &subkey, int &overflow, unsigned int &ttl, unsigned int &blob_id, unsigned int &volume_id, unsigned int &split_id)   1. More...
  bool  CBDB_Cache::x_FetchBlobAttributes (const string &key, int version, const string &subkey)   void  CBDB_Cache::x_DropBlob (const string &key, int version, const string &subkey, int overflow, unsigned blob_id, CBDB_Transaction &trans)   bool  CBDB_Cache::DropBlobWithExpCheck (const string &key, int version, const string &subkey, CBDB_Transaction &trans)   Drop BLOB with time expiration check. More...
  bool  CBDB_Cache::DropBlobWithExpCheck (unsigned blob_id, CBDB_Transaction &trans)   Drop BLOB with time expiration check. More...
  void  CBDB_Cache::x_DropOverflow (const string &key, int version, const string &subkey)   void  CBDB_Cache::x_DropOverflow (const string &file_path)   void  CBDB_Cache::x_TruncateDB ()   void  CBDB_Cache::x_Close ()   void  CBDB_Cache::x_PidLock (ELockMode lm)   void  CBDB_Cache::x_PerformCheckPointNoLock (unsigned bytes_written)   IReaderCBDB_Cache::x_CreateOverflowReader (const string &key, int version, const string &subkey, size_t &file_length, TBlobLock &blob_lock)   void  CBDB_Cache::x_UpdateOwnerStatOnDelete (const string &owner, bool expl_delete)   update BLOB owners' statistics on BLOB delete More...
  unsigned  CBDB_Cache::GetBlobId (const string &key, int version, const string &subkey)   Determines BLOB size (requires fetched attribute record) More...
  void  CBDB_Cache::AddToTimeLine (unsigned blob_id, time_t exp_time)   Add BLOB to expiration timeline. More...
  EBlobCheckinRes  CBDB_Cache::BlobCheckIn (unsigned blob_id_ext, const string &key, int version, const string &subkey, EBlobCheckinMode mode, TBlobLock &blob_lock, bool do_id_lock, unsigned *volume_id, unsigned *split_id, unsigned *overflow)   Check if BLOB exists, create registration record if necessary. More...
  void  CBDB_Cache::EvaluateTimeLine (bool *interrupted)   Evaluate timeline BLOBs as deletion candidates. More...
    CBDB_Cache::CBDB_Cache (const CBDB_Cache &)   CBDB_CacheCBDB_Cache::operator= (const CBDB_Cache &)     CBDB_Cache::CacheKey::CacheKey (const string &x_key, int x_version, const string &x_subkey)   bool  CBDB_Cache::CacheKey::operator< (const CacheKey &cache_key) const   void  BDB_ConfigureCache (CBDB_Cache &bdb_cache, const string &path, const string &name, unsigned timeout, ICache::TTimeStampFlags tflags)   Utility for simple cache configuration. More...
  void  NCBI_BDB_ICacheEntryPoint (CPluginManager< ICache >::TDriverInfoList &info_list, CPluginManager< ICache >::EEntryPointRequest method)   void  NCBI_EntryPoint_xcache_bdb (CPluginManager< ICache >::TDriverInfoList &info_list, CPluginManager< ICache >::EEntryPointRequest method)     CBDB_CacheHolder::CBDB_CacheHolder (ICache *blob_cache, ICache *id_cache)     CBDB_CacheHolder::~CBDB_CacheHolder ()   ICacheCBDB_CacheHolder::GetBlobCache ()   ICacheCBDB_CacheHolder::GetIdCache ()     CBDB_CacheHolder::CBDB_CacheHolder (const CBDB_CacheHolder &)   CBDB_CacheHolderCBDB_CacheHolder::operator= (const CBDB_CacheHolder &)   virtual TFlags  CBDB_Cache::GetFlags ()   Retrieve the effective combination of flags from the underlying storage. More...
  virtual void  CBDB_Cache::SetFlags (TFlags flags)   Pass flags to the underlying storage. More...
  virtual void  CBDB_Cache::SetTimeStampPolicy (TTimeStampFlags policy, unsigned int timeout, unsigned int max_timeout=0)   Set timestamp update policy. More...
  virtual TTimeStampFlags  CBDB_Cache::GetTimeStampPolicy () const   Get timestamp policy. More...
  virtual int  CBDB_Cache::GetTimeout () const   Get expiration timeout. More...
  virtual bool  CBDB_Cache::IsOpen () const   virtual void  CBDB_Cache::SetVersionRetention (EKeepVersions policy)   Set version retention policy. More...
  virtual EKeepVersions  CBDB_Cache::GetVersionRetention () const   Get version retention. More...
  void  CBDB_Cache::Store (unsigned blob_id_ext, const string &key, int version, const string &subkey, const void *data, size_t size, unsigned int time_to_live=0, const string &owner=kEmptyStr)   virtual void  CBDB_Cache::Store (const string &key, int version, const string &subkey, const void *data, size_t size, unsigned int time_to_live=0, const string &owner=kEmptyStr)   Add or replace BLOB. More...
  bool  CBDB_Cache::GetSizeEx (const string &key, int version, const string &subkey, size_t *size)   virtual size_t  CBDB_Cache::GetSize (const string &key, int version, const string &subkey)   Check if BLOB exists, return BLOB size. More...
  virtual void  CBDB_Cache::GetBlobOwner (const string &key, int version, const string &subkey, string *owner)   Retrieve BLOB owner. More...
  virtual bool  CBDB_Cache::Read (const string &key, int version, const string &subkey, void *buf, size_t buf_size)   Fetch the BLOB. More...
  virtual IReaderCBDB_Cache::GetReadStream (const string &key, int version, const string &subkey)   Return sequential stream interface to read BLOB data. More...
  virtual IReaderCBDB_Cache::GetReadStream (const string &key, const string &subkey, int *version, EBlobVersionValidity *validity)   Request the latest version of a BLOB. More...
  virtual void  CBDB_Cache::SetBlobVersionAsCurrent (const string &key, const string &subkey, int version)   Set current valid version for a BLOB. More...
  virtual void  CBDB_Cache::GetBlobAccess (const string &key, int version, const string &subkey, SBlobAccessDescr *blob_descr)   Get BLOB access using BlobAccessDescr. More...
  IWriterCBDB_Cache::GetWriteStream (unsigned blob_id_ext, const string &key, int version, const string &subkey, bool do_id_lock, unsigned int time_to_live=0, const string &owner=kEmptyStr)   virtual IWriterCBDB_Cache::GetWriteStream (const string &key, int version, const string &subkey, unsigned int time_to_live=0, const string &owner=kEmptyStr)   Return sequential stream interface to write BLOB data. More...
  virtual void  CBDB_Cache::Remove (const string &key)   virtual void  CBDB_Cache::Remove (const string &key, int version, const string &subkey)   Remove specific cache entry. More...
  virtual time_t  CBDB_Cache::GetAccessTime (const string &key, int version, const string &subkey)   Return last access time for the specified cache entry. More...
  virtual bool  CBDB_Cache::HasBlobs (const string &key, const string &subkey)   Check if any BLOB exists (any version) More...
  virtual void  CBDB_Cache::Purge (time_t access_timeout)   Delete all BLOBs older than specified. More...
  virtual void  CBDB_Cache::Purge (const string &key, const string &subkey, time_t access_timeout)   Delete BLOBs with access time older than specified. More...
  virtual bool  CBDB_Cache::SameCacheParams (const TCacheParams *params) const   virtual string  CBDB_Cache::GetCacheName (void) const   ◆ TBitVector ◆ TBlobLock ◆ TBlobSizeHistogram ◆ TLockVector ◆ TOwnerStatMap ◆ TSplitStore ◆ TTimeAccess ◆ TTimeLine ◆ EBlobAccessType

access type for "UpdateAccessTime" methods

Enumerator eBlobStore  eBlobUpdate  eBlobRead 

Definition at line 747 of file bdb_blobcache.hpp.

◆ EBlobCheckinMode

BLOB check-in mode.

Enumerator eBlobCheckIn 

Check if record exists.

eBlobCheckIn_Create 

If record does not exist - create.

Definition at line 845 of file bdb_blobcache.hpp.

◆ EBlobCheckinRes

Result of BLOB check-in process.

Enumerator EBlobCheckIn_NotFound 

BLOB does not exist.

eBlobCheckIn_Found 

Existing BLOB.

eBlobCheckIn_Created 

BLOB record created.

Definition at line 851 of file bdb_blobcache.hpp.

◆ EErrGetPut

Put/Get errors.

Enumerator eErr_Unknown 

no info on operation

eErr_Put 

Put error.

eErr_Get 

Get error.

Definition at line 207 of file bdb_blobcache.hpp.

◆ ELockMode

Locking modes to protect cache instance.

Enumerator eNoLock 

Do not lock-protect cache instance.

ePidLock 

Create PID lock on cache (exception if failed)

Definition at line 314 of file bdb_blobcache.hpp.

◆ ETRansact

Underlying BDB database can be configured using transactional or non-transactional API.

Transactional provides better protection from failures, non-transactional offers better performance.

Enumerator eUseTrans 

Use transaction environment.

eNoTrans 

Non-transactional environment.

Definition at line 342 of file bdb_blobcache.hpp.

◆ EWriteSyncMode

Suggest page size.

Should be called before Open. Does not have any effect if cache is already created. Options controlling transaction and write syncronicity.

Enumerator eWriteSync  eWriteNoSync 

Definition at line 303 of file bdb_blobcache.hpp.

◆ AddBlobQuotaError() [1/2] void SBDB_CacheUnitStatistics::AddBlobQuotaError ( ) ◆ AddBlobQuotaError() [2/2] void SBDB_CacheStatistics::AddBlobQuotaError ( const stringclient ) ◆ AddCommError() [1/2] ◆ AddCommError() [2/2] void SBDB_CacheUnitStatistics::AddCommError ( EErrGetPut  operation ) ◆ AddExplDelete() [1/2] void SBDB_CacheUnitStatistics::AddExplDelete ( ) inline ◆ AddExplDelete() [2/2] void SBDB_CacheStatistics::AddExplDelete ( const stringclient ) ◆ AddInternalError() [1/2] ◆ AddInternalError() [2/2] void SBDB_CacheUnitStatistics::AddInternalError ( EErrGetPut  operation ) ◆ AddNeverRead() [1/2] void SBDB_CacheUnitStatistics::AddNeverRead ( ) inline ◆ AddNeverRead() [2/2] void SBDB_CacheStatistics::AddNeverRead ( const stringclient ) ◆ AddNoBlobError() [1/2] ◆ AddNoBlobError() [2/2] void SBDB_CacheUnitStatistics::AddNoBlobError ( EErrGetPut  operation ) ◆ AddProtocolError() [1/2] ◆ AddProtocolError() [2/2] void SBDB_CacheUnitStatistics::AddProtocolError ( EErrGetPut  operation ) ◆ AddPurgeDelete() [1/2] void SBDB_CacheUnitStatistics::AddPurgeDelete ( ) inline ◆ AddPurgeDelete() [2/2] void SBDB_CacheStatistics::AddPurgeDelete ( const stringclient ) ◆ AddRead() [1/2] void SBDB_CacheStatistics::AddRead ( const stringclient, time_t  tm  ) ◆ AddRead() [2/2] void SBDB_CacheUnitStatistics::AddRead ( time_t  tm ) ◆ AddStore() [1/2] void SBDB_CacheStatistics::AddStore ( const stringclient, time_t  tm, unsigned  store, unsigned  update, unsigned  blob_size, unsigned  overflow  ) ◆ AddStore() [2/2] void SBDB_CacheUnitStatistics::AddStore ( time_t  tm, unsigned  store, unsigned  update, unsigned  blob_size, unsigned  overflow  )

Definition at line 669 of file bdb_blobcache.cpp.

References SBDB_CacheUnitStatistics::AddToHistogram(), SBDB_CacheUnitStatistics::blob_size_hist, SBDB_CacheUnitStatistics::blob_size_max_total, SBDB_CacheUnitStatistics::blobs_overflow_total, SBDB_CacheUnitStatistics::blobs_size_total, SBDB_CacheUnitStatistics::blobs_stored_total, SBDB_CacheUnitStatistics::blobs_updates_total, SBDB_TimeAccessStatistics::day, SBDB_TimeAccessStatistics::hour, SBDB_TimeAccessStatistics::put_count, s_GetDayHour(), and SBDB_CacheUnitStatistics::time_access.

Referenced by SBDB_CacheStatistics::AddStore().

◆ AddToHistogram() void SBDB_CacheUnitStatistics::AddToHistogram ( TBlobSizeHistogramhist, unsigned  size  ) static ◆ AddToTimeLine() void CBDB_Cache::AddToTimeLine ( unsigned  blob_id, time_t  exp_time  ) private ◆ BDB_ConfigureCache() ◆ BDB_Register_Cache() void BDB_Register_Cache ( void  ) ◆ BlobCheckIn()

Check if BLOB exists, create registration record if necessary.

Definition at line 4874 of file bdb_blobcache.cpp.

References _ASSERT, BDB_THROW, SCache_AttrDB::blob_id, SCache_IdIDX::blob_id, CBDB_Transaction::Commit(), eBDB_Ok, CBDB_Cache::eBlobCheckIn, CBDB_Cache::eBlobCheckIn_Create, CBDB_Cache::eBlobCheckIn_Created, CBDB_Cache::eBlobCheckIn_Found, CBDB_Cache::EBlobCheckIn_NotFound, CBDB_FileCursor::eEQ, CBDB_Transaction::eNoAssociation, CBDB_Transaction::eTransASync, CBDB_FileCursor::Fetch(), CBDB_FileCursor::From, CBDB_Cache::GetNextBlobId(), CBDB_File::Insert(), ncbi::grid::netcache::search::fields::key, SCache_AttrDB::key, SCache_IdIDX::key, CLockVectorGuard< TLockVect >::Lock(), CBDB_Cache::m_CacheAttrDB, CBDB_Cache::m_CacheIdIDX, CBDB_Cache::m_DB_Lock, CBDB_Cache::m_Env, SCache_AttrDB::max_time, SCache_AttrDB::overflow, SCache_AttrDB::owner_name, SCache_AttrDB::read_count, CBDB_FileCursor::SetCondition(), CLockVectorGuard< TLockVect >::SetId(), CBDB_RawFile::SetTransaction(), SCache_AttrDB::split_id, ncbi::grid::netcache::search::fields::subkey, SCache_AttrDB::subkey, SCache_IdIDX::subkey, SCache_AttrDB::time_stamp, SCache_AttrDB::ttl, SCache_AttrDB::upd_count, SCache_AttrDB::version, SCache_IdIDX::version, dtl::version, and SCache_AttrDB::volume_id.

Referenced by CBDB_Cache::GetWriteStream(), and CBDB_Cache::x_Store().

◆ CacheKey() ◆ CBDB_Cache() [1/2] CBDB_Cache::CBDB_Cache ( ) ◆ CBDB_Cache() [2/2] ◆ CBDB_CacheHolder() [1/2] ◆ CBDB_CacheHolder() [2/2] ◆ CleanLog() void CBDB_Cache::CleanLog ( ) ◆ CleanLogOnPurge() void CBDB_Cache::CleanLogOnPurge ( unsigned int  factor ) inline ◆ Close() void CBDB_Cache::Close ( void  )

Definition at line 1628 of file bdb_blobcache.cpp.

References CBDB_Env::CheckRemove(), CBDB_Cache::CleanLog(), ERR_POST_X, CBDB_Env::ForceTransactionCheckpoint(), Info(), kBDBCacheStartedFileName, LOG_POST_X, CBDB_Cache::m_BLOB_SplitStore, CBDB_Cache::m_CacheAttrDB, CBDB_Cache::m_CacheAttrDB_RO1, CBDB_Cache::m_CacheAttrDB_RO2, CBDB_Cache::m_CacheIdIDX, CBDB_Cache::m_CacheIdIDX_RO, CBDB_Cache::m_Closed, CBDB_Cache::m_Env, CBDB_Cache::m_JoinedEnv, CBDB_Cache::m_Name, CBDB_Cache::m_Path, CBDB_Cache::m_PidGuard, CBDB_Cache::m_TimeLine, CDirEntry::MakePath(), CDirEntry::Remove(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::Save(), CBDB_Env::StopBackgroundWriterThread(), CBDB_Cache::StopPurgeThread(), and Warning().

Referenced by CBDB_Cache::Open(), CBDB_Cache::OpenReadOnly(), CBDB_Cache::Verify(), and CBDB_Cache::~CBDB_Cache().

◆ ComputeMaxTime() time_t CBDB_Cache::ComputeMaxTime ( time_t  start ) const inlineprotected ◆ ConvertToRegistry() [1/2] void SBDB_CacheStatistics::ConvertToRegistry ( IRWRegistryreg ) const ◆ ConvertToRegistry() [2/2] void SBDB_CacheUnitStatistics::ConvertToRegistry ( IRWRegistryreg, const stringsect_name_postfix  ) const

Convert statistics into registry sections and entries.

Parameters
sect_name_postfix Registry section name postfix

Definition at line 830 of file bdb_blobcache.cpp.

References SBDB_CacheUnitStatistics::blob_size_hist, SBDB_CacheUnitStatistics::blob_size_max_total, SBDB_CacheUnitStatistics::blobs_db, SBDB_CacheUnitStatistics::blobs_expl_deleted_total, SBDB_CacheUnitStatistics::blobs_never_read_total, SBDB_CacheUnitStatistics::blobs_overflow_total, SBDB_CacheUnitStatistics::blobs_purge_deleted_total, SBDB_CacheUnitStatistics::blobs_read_total, SBDB_CacheUnitStatistics::blobs_size_db, SBDB_CacheUnitStatistics::blobs_size_total, SBDB_CacheUnitStatistics::blobs_stored_total, SBDB_CacheUnitStatistics::blobs_updates_total, map_checker< Container >::empty(), map_checker< Container >::end(), SBDB_CacheUnitStatistics::err_blob_get, SBDB_CacheUnitStatistics::err_blob_over_quota, SBDB_CacheUnitStatistics::err_blob_put, SBDB_CacheUnitStatistics::err_communication, SBDB_CacheUnitStatistics::err_internal, SBDB_CacheUnitStatistics::err_no_blob, SBDB_CacheUnitStatistics::err_protocol, SBDB_TimeAccessStatistics::get_count, SBDB_TimeAccessStatistics::hour, ITERATE, SBDB_TimeAccessStatistics::put_count, NStr::Replace(), IRWRegistry::Set(), SBDB_CacheUnitStatistics::time_access, and NStr::UIntToString().

Referenced by SBDB_CacheStatistics::ConvertToRegistry().

◆ DropBlob()

Delete BLOB.

Parameters
for_update When TRUE blob statistics record will not be deleted (since it's going to be recreated immediately)

Returns non-zero blob_id if blob exists

Definition at line 1782 of file bdb_blobcache.cpp.

References _ASSERT, SBDB_CacheStatistics::AddExplDelete(), SBDB_CacheStatistics::AddNeverRead(), SCache_AttrDB::blob_id, CBDB_Transaction::Commit(), CBDB_FileCursor::Delete(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::Delete(), eBDB_Ok, CBDB_Transaction::eEnvDefault, CBDB_FileCursor::eEQ, CBDB_Transaction::eNoAssociation, CBDB_FileCursor::eReadModifyUpdate, CBDB_RawFile::eThrowOnError, CBDB_FileCursor::Fetch(), CBDB_FileCursor::From, CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::GetCoordinates(), CBDB_Cache::IsSaveStatistics(), ncbi::grid::netcache::search::fields::key, CBDB_Cache::m_BLOB_SplitStore, CBDB_Cache::m_CacheAttrDB, CBDB_Cache::m_DB_Lock, CBDB_Cache::m_Env, CBDB_Cache::m_Statistics, SCache_AttrDB::overflow, SCache_AttrDB::owner_name, SCache_AttrDB::read_count, CBDB_FileCursor::SetCondition(), CBDB_RawFile::SetTransaction(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::SetTransaction(), SCache_AttrDB::split_id, ncbi::grid::netcache::search::fields::subkey, CBDB_FieldString::ToString(), dtl::version, SCache_AttrDB::volume_id, CBDB_Cache::x_DropOverflow(), and CBDB_Cache::x_UpdateOwnerStatOnDelete().

◆ DropBlobWithExpCheck() [1/2]

Drop BLOB with time expiration check.

Definition at line 4678 of file bdb_blobcache.cpp.

References _ASSERT, CTimeLine< BV >::AddObject(), SCache_AttrDB::blob_id, SCache_IdIDX::blob_id, CBDB_File::Delete(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::Delete(), eBDB_Ok, CBDB_RawFile::eThrowOnError, CBDB_File::Fetch(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::GetCoordinates(), CBDB_Cache::IsReadOnly(), ncbi::grid::netcache::search::fields::key, SCache_AttrDB::key, CBDB_Cache::m_BLOB_SplitStore, CBDB_Cache::m_CacheAttrDB, CBDB_Cache::m_CacheAttrDB_RO2, CBDB_Cache::m_CacheIdIDX, CBDB_Cache::m_CARO2_Lock, CBDB_Cache::m_DB_Lock, CBDB_Cache::m_GC_Deleted, CBDB_Cache::m_TimeLine, CBDB_Cache::m_TimeLine_Lock, SCache_AttrDB::overflow, bm::bvector< Alloc >::set(), CBDB_RawFile::SetTransaction(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::SetTransaction(), SCache_AttrDB::split_id, ncbi::grid::netcache::search::fields::subkey, SCache_AttrDB::subkey, SCache_AttrDB::version, dtl::version, SCache_AttrDB::volume_id, CBDB_Cache::x_CheckTimeStampExpired(), and CBDB_Cache::x_DropOverflow().

Referenced by CBDB_Cache::DropBlobWithExpCheck(), CBDB_Cache::EvaluateTimeLine(), and CBDB_Cache::Purge().

◆ DropBlobWithExpCheck() [2/2]

Drop BLOB with time expiration check.

Definition at line 4656 of file bdb_blobcache.cpp.

References SCache_IdIDX::blob_id, CBDB_Cache::DropBlobWithExpCheck(), eBDB_Ok, CBDB_File::Fetch(), ncbi::grid::netcache::search::fields::key, SCache_IdIDX::key, CBDB_Cache::m_CacheIdIDX_RO, CBDB_Cache::m_IDIDX_Lock_RO, ncbi::grid::netcache::search::fields::subkey, SCache_IdIDX::subkey, SCache_IdIDX::version, and dtl::version.

◆ EvaluateTimeLine() void CBDB_Cache::EvaluateTimeLine ( boolinterrupted ) private

Evaluate timeline BLOBs as deletion candidates.

Parameters
interrupted returns TRUE if stop signal received during the call

Definition at line 3524 of file bdb_blobcache.cpp.

References _ASSERT, CTimeLine< BV >::AddObject(), bm::bvector< Alloc >::any(), CTime::AsString(), SCache_AttrDB::blob_id, SCache_IdIDX::blob_id, SCacheDescr::blob_id, CBDB_Transaction::Commit(), bm::bvector< Alloc >::count(), NStr::DoubleToString(), CBDB_Cache::DropBlobWithExpCheck(), eBDB_Ok, CBDB_FileCursor::eEQ, CBDB_FileCursor::eGE, CStopWatch::Elapsed(), CBDB_Transaction::eNoAssociation, CStopWatch::eStart, CBDB_Transaction::eTransASync, CTimeLine< BV >::ExtractObjects(), CBDB_FileCursor::Fetch(), bm::bvector< Alloc >::first(), CBDB_FileCursor::From, CTimeLine< BV >::GetDiscrFactor(), GetFastLocalTime(), i, IServer_Monitor::IsActive(), ncbi::grid::netcache::search::fields::key, SCache_IdIDX::key, SCacheDescr::key, CBDB_Cache::m_BatchSleep, CBDB_Cache::m_CacheAttrDB_RO2, CBDB_Cache::m_CacheIdIDX_RO, CBDB_Cache::m_CARO2_Lock, CBDB_Cache::m_Env, CBDB_Cache::m_GC_Deleted, CBDB_Cache::m_IDIDX_Lock_RO, CBDB_Cache::m_LastTimeLineCheck, CBDB_Cache::m_Monitor, CBDB_Cache::m_PurgeBatchSize, CBDB_Cache::m_PurgeStopSignal, CBDB_Cache::m_TimeLine, CBDB_Cache::m_TimeLine_Lock, msg(), bm::bvector< Alloc >::optimize(), SCache_AttrDB::overflow, SCacheDescr::overflow, IServer_Monitor::Send(), CBDB_FileCursor::SetCondition(), CBDB_RawFile::SetTransaction(), ncbi::grid::netcache::search::fields::subkey, SCache_IdIDX::subkey, SCacheDescr::subkey, sw, CSemaphore::TryWait(), NStr::UIntToString(), NStr::ULongToString(), bm::bvector< Alloc >::iterator_base::valid(), SCache_IdIDX::version, SCacheDescr::version, dtl::version, and CBDB_Cache::x_CheckTimeStampExpired().

Referenced by CBDB_Cache::Purge().

◆ GetAccessTime()

Return last access time for the specified cache entry.

Class implementation may want to implement access time based aging scheme for cache managed objects. In this case it needs to track time of every request to BLOB data.

Parameters
key BLOB identification key subkey BLOB identification subkey version BLOB version
Returns
last access time
See also
TimeStampUpdatePolicy

Implements ICache.

Definition at line 3417 of file bdb_blobcache.cpp.

References _ASSERT, eBDB_Ok, CBDB_File::Fetch(), ncbi::grid::netcache::search::fields::key, SCache_AttrDB::key, CBDB_Cache::m_CacheAttrDB, CBDB_Cache::m_DB_Lock, CBDB_RawFile::SetTransaction(), ncbi::grid::netcache::search::fields::subkey, SCache_AttrDB::subkey, SCache_AttrDB::time_stamp, SCache_AttrDB::version, and dtl::version.

◆ GetBatchSleep() unsigned CBDB_Cache::GetBatchSleep ( ) const ◆ GetBlobAccess()

Get BLOB access using BlobAccessDescr.

Method fills blob_descr parameter. If provided buffer has sufficient capacity for BLOB storage, BLOB is saved into the buffer, otherwise IReader is created.

Note
Method supposed to provide fast access to relatively small BLOBs

Implements ICache.

Definition at line 2890 of file bdb_blobcache.cpp.

References _ASSERT, SBDB_CacheStatistics::AddRead(), ICache::SBlobAccessDescr::blob_found, ICache::SBlobAccessDescr::blob_size, ICache::SBlobAccessDescr::buf, ICache::SBlobAccessDescr::buf_size, buffer, CBDB_Cache::CBDB_CacheIReader, CBDB_Transaction::Commit(), eBDB_Ok, CBDB_FileCursor::eEQ, CBDB_Transaction::eNoAssociation, CBDB_FileCursor::eReadModifyUpdate, CBDB_RawFile::eReallocForbidden, CBDB_Transaction::eTransASync, ICache::fCheckExpirationAlways, CBDB_FileCursor::Fetch(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::Fetch(), CBDB_FileCursor::From, ICache::fTimeStampOnRead, CBDB_Cache::GetBlobId(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::GetCoordinates(), CFastLocalTime::GetLocalTimezone(), CBDB_Cache::IsSaveStatistics(), ncbi::grid::netcache::search::fields::key, CBDB_Cache::m_BLOB_SplitStore, CBDB_Cache::m_CacheAttrDB, CBDB_Cache::m_DB_Lock, CBDB_Cache::m_Env, CBDB_Cache::m_LocalTimer, CBDB_Cache::m_LockTimeout, CBDB_Cache::m_LockVector, CBDB_Cache::m_Statistics, CBDB_Cache::m_TimeStampFlag, SCache_AttrDB::max_time, SCache_AttrDB::overflow, SCache_AttrDB::owner_name, SCache_AttrDB::read_count, ICache::SBlobAccessDescr::reader, CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::ReadRealloc(), CBDB_FileCursor::SetCondition(), CBDB_RawFile::SetTransaction(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::SetTransaction(), SCache_AttrDB::split_id, ncbi::grid::netcache::search::fields::subkey, SCache_AttrDB::time_stamp, CBDB_FieldString::ToString(), CBDB_FileCursor::Update(), dtl::version, SCache_AttrDB::volume_id, CBDB_Cache::x_CheckTimeStampExpired(), and CBDB_Cache::x_CreateOverflowReader().

◆ GetBlobCache() ICache* CBDB_CacheHolder::GetBlobCache ( ) inline ◆ GetBlobId()

Determines BLOB size (requires fetched attribute record)

Definition at line 3177 of file bdb_blobcache.cpp.

References SCache_AttrDB::blob_id, eBDB_Ok, CBDB_File::Fetch(), ncbi::grid::netcache::search::fields::key, SCache_AttrDB::key, CBDB_Cache::m_CacheAttrDB_RO1, CBDB_Cache::m_CARO1_Lock, CBDB_RawFile::SetTransaction(), ncbi::grid::netcache::search::fields::subkey, SCache_AttrDB::subkey, SCache_AttrDB::version, and dtl::version.

Referenced by CBDB_Cache::GetBlobAccess(), CBDB_Cache::GetReadStream(), CBDB_Cache::GetSizeEx(), CBDB_Cache::IsLocked(), and CBDB_Cache::Read().

◆ GetBlobOwner()

Retrieve BLOB owner.

Parameters
owner BLOB owner (as used by method Store)
See also
Store, GetWriteStream

Implements ICache.

Definition at line 2350 of file bdb_blobcache.cpp.

References _ASSERT, ncbi::grid::netcache::search::fields::key, CBDB_Cache::m_CacheAttrDB, CBDB_Cache::m_DB_Lock, SCache_AttrDB::owner_name, CBDB_RawFile::SetTransaction(), ncbi::grid::netcache::search::fields::subkey, CBDB_FieldString::ToString(), dtl::version, and CBDB_Cache::x_FetchBlobAttributes().

◆ GetCacheName() virtual string CBDB_Cache::GetCacheName ( void  ) const inlinevirtual ◆ GetEnv() ◆ GetFlags()

Retrieve the effective combination of flags from the underlying storage.

Implements ICache.

Definition at line 1699 of file bdb_blobcache.cpp.

◆ GetIdCache() ICache* CBDB_CacheHolder::GetIdCache ( ) inline ◆ GetMaxBlobSize() unsigned CBDB_Cache::GetMaxBlobSize ( ) const inline ◆ GetMonitor() ◆ GetName() ◆ GetNextBlobId() unsigned CBDB_Cache::GetNextBlobId ( bool  lock_id ) ◆ GetOverflowLimit() unsigned CBDB_Cache::GetOverflowLimit ( ) const inline ◆ GetPurgeBatchSize() unsigned CBDB_Cache::GetPurgeBatchSize ( ) const ◆ GetReadStream() [1/2]

Request the latest version of a BLOB.

Parameters
[in] key BLOB identification key [in] subkey BLOB identification subkey [out] version Version of the returned BLOB [out] validity Validity of the version of the returned BLOB
Returns
Sequential stream interface to read BLOB data. Return NULL if the BLOB data is not found in the cache.
Note
If the BLOB data is not found in the cache, then neither 'version' nor 'validity' values will be set by the method.
See also
SetCurrentBlobVersion()

Implements ICache.

Definition at line 2871 of file bdb_blobcache.cpp.

References NCBI_USER_THROW.

◆ GetReadStream() [2/2]

Return sequential stream interface to read BLOB data.

Parameters
key BLOB identification key subkey BLOB identification subkey version BLOB version
Returns
Interface pointer or NULL if BLOB does not exist

Implements ICache.

Definition at line 2671 of file bdb_blobcache.cpp.

References _ASSERT, SBDB_CacheStatistics::AddRead(), SCache_AttrDB::blob_id, buffer, CBDB_Cache::CBDB_CacheIReader, CBDB_Transaction::Commit(), eBDB_Ok, CBDB_FileCursor::eEQ, CBDB_Transaction::eNoAssociation, CBDB_FileCursor::eReadModifyUpdate, CBDB_Transaction::eTransASync, ICache::fCheckExpirationAlways, CBDB_FileCursor::Fetch(), CBDB_FileCursor::From, ICache::fTimeStampOnRead, CBDB_Cache::GetBlobId(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::GetCoordinates(), CFastLocalTime::GetLocalTimezone(), CBDB_Cache::IsSaveStatistics(), ncbi::grid::netcache::search::fields::key, CBDB_Cache::m_BLOB_SplitStore, CBDB_Cache::m_CacheAttrDB, CBDB_Cache::m_DB_Lock, CBDB_Cache::m_Env, CBDB_Cache::m_LocalTimer, CBDB_Cache::m_LockTimeout, CBDB_Cache::m_LockVector, CBDB_Cache::m_Statistics, CBDB_Cache::m_TimeStampFlag, SCache_AttrDB::max_time, SCache_AttrDB::overflow, SCache_AttrDB::owner_name, SCache_AttrDB::read_count, CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::ReadRealloc(), CBDB_FileCursor::SetCondition(), CBDB_RawFile::SetTransaction(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::SetTransaction(), SCache_AttrDB::split_id, ncbi::grid::netcache::search::fields::subkey, SCache_AttrDB::time_stamp, CBDB_FieldString::ToString(), CBDB_FileCursor::Update(), dtl::version, SCache_AttrDB::volume_id, CBDB_Cache::x_CheckTimeStampExpired(), and CBDB_Cache::x_CreateOverflowReader().

◆ GetSize() ◆ GetSizeEx()

Definition at line 2281 of file bdb_blobcache.cpp.

References CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::BlobSize(), eBDB_Ok, CFile::Exists(), ICache::fCheckExpirationAlways, CBDB_Cache::GetBlobId(), CFile::GetLength(), CBDB_Cache::GetName(), ncbi::grid::netcache::search::fields::key, CBDB_Cache::m_BLOB_SplitStore, CBDB_Cache::m_CacheAttrDB, CBDB_Cache::m_DB_Lock, CBDB_Cache::m_LockTimeout, CBDB_Cache::m_LockVector, CBDB_Cache::m_Path, CBDB_Cache::m_TimeStampFlag, SCache_AttrDB::overflow, s_MakeOverflowFileName(), CBDB_RawFile::SetTransaction(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::SetTransaction(), ncbi::grid::netcache::search::fields::size, ncbi::grid::netcache::search::fields::subkey, dtl::version, CBDB_Cache::x_CheckTimeStampExpired(), and CBDB_Cache::x_RetrieveBlobAttributes().

Referenced by CBDB_Cache::GetSize().

◆ GetStatistics() [1/2] ◆ GetStatistics() [2/2] ◆ GetTimeout() int CBDB_Cache::GetTimeout ( ) const virtual ◆ GetTimeStampPolicy() ◆ GetTTL_Prolongation() unsigned CBDB_Cache::GetTTL_Prolongation ( ) const inline ◆ GetVersionRetention() ◆ GetWriteStream() [1/2] ◆ GetWriteStream() [2/2]

Definition at line 3207 of file bdb_blobcache.cpp.

References _ASSERT, _VERIFY, CBDB_Cache::BlobCheckIn(), CBDB_Cache::CBDB_CacheIWriter, CBDB_Cache::eBlobCheckIn_Create, CBDB_Cache::EBlobCheckIn_NotFound, ICache::eDropAll, ICache::eDropOlder, CLockVectorGuard< TLockVect >::GetId(), CFastLocalTime::GetLocalTimezone(), CBDB_Cache::IsReadOnly(), ncbi::grid::netcache::search::fields::key, CBDB_Cache::m_CacheAttrDB, CBDB_Cache::m_LocalTimer, CBDB_Cache::m_LockTimeout, CBDB_Cache::m_LockVector, CBDB_Cache::m_MaxTimeout, CBDB_Cache::m_MaxTTL_prolong, CBDB_Cache::m_Path, CBDB_Cache::m_Timeout, CBDB_Cache::m_VersionFlag, min(), CBDB_Cache::Purge(), ncbi::grid::netcache::search::fields::subkey, and dtl::version.

Referenced by CBDB_Cache::GetWriteStream().

◆ GetWriteSync() ◆ GlobalStatistics() ◆ HasBlobs()

Check if any BLOB exists (any version)

Implements ICache.

Definition at line 2369 of file bdb_blobcache.cpp.

References eBDB_Ok, CBDB_FileCursor::eEQ, CBDB_FileCursor::eGE, CBDB_FileCursor::FetchFirst(), CBDB_FileCursor::From, ncbi::grid::netcache::search::fields::key, SCache_AttrDB::key, CBDB_Cache::m_CacheAttrDB, CBDB_Cache::m_DB_Lock, CBDB_FileCursor::SetCondition(), CBDB_RawFile::SetTransaction(), ncbi::grid::netcache::search::fields::subkey, SCache_AttrDB::version, dtl::version, and CBDB_Cache::x_CheckTimeStampExpired().

◆ Init() [1/2] void SBDB_CacheUnitStatistics::Init ( void  )

Definition at line 617 of file bdb_blobcache.cpp.

References SBDB_CacheUnitStatistics::blob_size_hist, SBDB_CacheUnitStatistics::blob_size_max_total, SBDB_CacheUnitStatistics::blobs_db, SBDB_CacheUnitStatistics::blobs_expl_deleted_total, SBDB_CacheUnitStatistics::blobs_never_read_total, SBDB_CacheUnitStatistics::blobs_overflow_total, SBDB_CacheUnitStatistics::blobs_purge_deleted_total, SBDB_CacheUnitStatistics::blobs_read_total, SBDB_CacheUnitStatistics::blobs_size_db, SBDB_CacheUnitStatistics::blobs_size_total, SBDB_CacheUnitStatistics::blobs_stored_total, SBDB_CacheUnitStatistics::blobs_updates_total, SBDB_CacheUnitStatistics::err_blob_get, SBDB_CacheUnitStatistics::err_blob_over_quota, SBDB_CacheUnitStatistics::err_blob_put, SBDB_CacheUnitStatistics::err_communication, SBDB_CacheUnitStatistics::err_internal, SBDB_CacheUnitStatistics::err_no_blob, SBDB_CacheUnitStatistics::err_protocol, SBDB_CacheUnitStatistics::InitHistorgam(), and SBDB_CacheUnitStatistics::time_access.

Referenced by SBDB_CacheStatistics::Init(), and SBDB_CacheUnitStatistics::SBDB_CacheUnitStatistics().

◆ Init() [2/2] void SBDB_CacheStatistics::Init ( void  ) ◆ InitHistorgam() ◆ InitStatistics() void CBDB_Cache::InitStatistics ( ) ◆ IsJoinedEnv() bool CBDB_Cache::IsJoinedEnv ( ) inline ◆ IsLocked() [1/2] ◆ IsLocked() [2/2] bool CBDB_Cache::IsLocked ( unsigned  blob_id ) ◆ IsOpen() virtual bool CBDB_Cache::IsOpen ( ) const inlinevirtual ◆ IsReadOnly() bool CBDB_Cache::IsReadOnly ( ) const inline ◆ IsSaveStatistics() bool CBDB_Cache::IsSaveStatistics ( void  ) const inline

Definition at line 513 of file bdb_blobcache.hpp.

References CBDB_Cache::m_SaveStatistics.

Referenced by CBDB_Cache::DropBlob(), CBDB_Cache::GetBlobAccess(), CBDB_Cache::GetReadStream(), CBDB_Cache::Purge(), CBDB_Cache::Read(), CBDB_Cache::RegisterCommError(), CBDB_Cache::RegisterInternalError(), CBDB_Cache::RegisterNoBlobError(), CBDB_Cache::RegisterProtocolError(), CBDB_Cache::Remove(), CBDB_CacheIWriter::Write(), CBDB_Cache::x_Store(), and CBDB_CacheIWriter::~CBDB_CacheIWriter().

◆ KillBlob()

Definition at line 1763 of file bdb_blobcache.cpp.

References CBDB_Transaction::Commit(), CBDB_Transaction::eEnvDefault, CBDB_Transaction::eNoAssociation, ncbi::grid::netcache::search::fields::key, CBDB_Cache::m_BLOB_SplitStore, CBDB_Cache::m_DB_Lock, CBDB_Cache::m_Env, CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::SetTransaction(), ncbi::grid::netcache::search::fields::subkey, dtl::version, and CBDB_Cache::x_DropBlob().

Referenced by CBDB_CacheIWriter::Flush(), CBDB_CacheIWriter::Write(), CBDB_Cache::x_Store(), CBDB_CacheIWriter::x_WriteOverflow(), and CBDB_CacheIWriter::~CBDB_CacheIWriter().

◆ Lock() void CBDB_Cache::Lock ( void  ) ◆ NCBI_BDB_ICacheEntryPoint() ◆ NCBI_EntryPoint_xcache_bdb() ◆ Open()

Open local cache instance (read-write access) If cache does not exists it is created.

Parameters
cache_path Path to cache cache_name Cache instance name lm Locking mode, protection against using the cache from multiple applications cache_ram_size Berkeley DB memory cache settings log_mem_size Size of in memory transaction log
See also
OpenReadOnly

Definition at line 1233 of file bdb_blobcache.cpp.

References _ASSERT, CDirEntry::AddTrailingPathSeparator(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::AssignCoordinates(), BDB_RecoverEnv(), SCache_AttrDB::blob_id, SCache_IdIDX::blob_id, CBDB_Cache::Close(), CDir::Create(), eBDB_Ok, CBDB_FileCursor::eFirst, CDir::eIgnoreRecursive, CBDB_Cache::eNoTrans, CBDB_RawFile::eReadOnly, CBDB_RawFile::eReadWriteCreate, ERR_POST, ERR_POST_X, CBDB_Env::eRunRecovery, CBDB_Env::eThreaded, CBDB_Transaction::eTransASync, CBDB_Transaction::eTransSync, CBDB_Cache::eUseTrans, CBDB_Cache::eWriteSync, CFile::Exists(), CDir::Exists(), CBDB_File::Fetch(), CBDB_FileCursor::Fetch(), ICache::fPurgeOnStartup, CDir::GetEntries(), CDirEntry::GetPath(), CCurrentProcess::GetPid(), CBDB_FieldString::GetString(), CBDB_Cache::GetTimeout(), CBDB_Cache::GetWriteSync(), Info(), CBDB_FileCursor::InitMultiFetch(), set< Key, Compare >::insert(), CBDB_File::Insert(), int, CBDB_ErrnoException::IsRecovery(), CBDB_Env::IsTransactional(), CBDB_Env::JoinEnv(), kBDBCacheStartedFileName, ncbi::grid::netcache::search::fields::key, SCache_AttrDB::key, SCache_IdIDX::key, LOG_POST_X, CBDB_Cache::m_BatchSleep, CBDB_Cache::m_BLOB_SplitStore, CBDB_Cache::m_BlobIdCounter, CBDB_Cache::m_CacheAttrDB, CBDB_Cache::m_CacheAttrDB_RO1, CBDB_Cache::m_CacheAttrDB_RO2, CBDB_Cache::m_CacheIdIDX, CBDB_Cache::m_CacheIdIDX_RO, CBDB_Cache::m_CheckPointInterval, CBDB_Cache::m_Closed, CBDB_Cache::m_DB_Lock, CBDB_Cache::m_Env, CBDB_Cache::m_InitIfDirty, CBDB_Cache::m_JoinedEnv, CBDB_Cache::m_LastTimeLineCheck, CBDB_Cache::m_LogDir, CBDB_Cache::m_LogSizeMax, CBDB_Cache::m_Name, CBDB_Cache::m_NextExpTime, CBDB_Cache::m_Path, CBDB_Cache::m_PurgeBatchSize, CBDB_Cache::m_PurgeThreadDelay, CBDB_Cache::m_ReadOnly, CBDB_Cache::m_RoundRobinVolumes, CBDB_Cache::m_RunPurgeThread, CBDB_Cache::m_TimeLine, CBDB_Cache::m_Timeout, CBDB_Cache::m_TimeStampFlag, CDirEntry::MakePath(), max(), NStr::NumericToString(), CBDB_File::Open(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::Open(), CBDB_Env::OpenErrFile(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::OpenProjections(), CBDB_Env::OpenWithLocks(), CBDB_Env::OpenWithTrans(), CBDB_Cache::Purge(), CDirEntry::Remove(), CDir::Remove(), CAtomicCounter::Set(), CBDB_Env::SetCacheSize(), CBDB_Env::SetCheckPointKB(), CBDB_FileCursor::SetCondition(), CBDB_RawFile::SetEnv(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::SetEnv(), CBDB_Env::SetLockTimeout(), CBDB_Env::SetLogAutoRemove(), CBDB_Env::SetLogBSize(), CBDB_Env::SetLogDir(), CBDB_Env::SetLogFileMax(), CBDB_Env::SetLogInMemory(), CBDB_Env::SetMaxLocks(), CBDB_RawFile::SetTransaction(), CBDB_Env::SetTransactionSync(), CBDB_Env::SetTransactionTimeout(), SCache_AttrDB::split_id, CBDB_Cache::StartPurgeThread(), string, ncbi::grid::netcache::search::fields::subkey, SCache_AttrDB::subkey, SCache_IdIDX::subkey, SCache_AttrDB::version, SCache_IdIDX::version, dtl::version, SCache_AttrDB::volume_id, Warning(), CFileWriter::Write(), and CBDB_Cache::x_PidLock().

Referenced by BDB_ConfigureCache(), and CSplitCacheApp::SetupCache().

◆ OpenReadOnly()

Open local cache in read-only mode.

This is truely passive mode of operations. All modification calls are ignored, no statistics is going to be collected, no timestamps. PID locking is also not available.

See also
Open

Definition at line 1590 of file bdb_blobcache.cpp.

References CDirEntry::AddTrailingPathSeparator(), CBDB_Cache::Close(), CBDB_RawFile::eReadOnly, Info(), LOG_POST_X, CBDB_Cache::m_BLOB_SplitStore, CBDB_Cache::m_CacheAttrDB, CBDB_Cache::m_DB_Lock, CBDB_Cache::m_Name, CBDB_Cache::m_Path, CBDB_Cache::m_ReadOnly, CBDB_File::Open(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::Open(), and string.

◆ operator<() ◆ operator=() [1/2] ◆ operator=() [2/2] ◆ PrintStatistics() [1/2] void SBDB_CacheUnitStatistics::PrintStatistics ( CNcbiOstreamout ) const

Definition at line 769 of file bdb_blobcache.cpp.

References SBDB_CacheUnitStatistics::blob_size_hist, SBDB_CacheUnitStatistics::blob_size_max_total, SBDB_CacheUnitStatistics::blobs_db, SBDB_CacheUnitStatistics::blobs_expl_deleted_total, SBDB_CacheUnitStatistics::blobs_never_read_total, SBDB_CacheUnitStatistics::blobs_overflow_total, SBDB_CacheUnitStatistics::blobs_purge_deleted_total, SBDB_CacheUnitStatistics::blobs_read_total, SBDB_CacheUnitStatistics::blobs_size_db, SBDB_CacheUnitStatistics::blobs_stored_total, SBDB_CacheUnitStatistics::blobs_updates_total, map_checker< Container >::empty(), map_checker< Container >::end(), SBDB_CacheUnitStatistics::err_blob_get, SBDB_CacheUnitStatistics::err_blob_over_quota, SBDB_CacheUnitStatistics::err_blob_put, SBDB_CacheUnitStatistics::err_communication, SBDB_CacheUnitStatistics::err_internal, SBDB_CacheUnitStatistics::err_no_blob, SBDB_CacheUnitStatistics::err_protocol, SBDB_TimeAccessStatistics::get_count, SBDB_TimeAccessStatistics::hour, ITERATE, out(), SBDB_TimeAccessStatistics::put_count, and SBDB_CacheUnitStatistics::time_access.

Referenced by SBDB_CacheStatistics::PrintStatistics().

◆ PrintStatistics() [2/2] void SBDB_CacheStatistics::PrintStatistics ( CNcbiOstreamout ) const ◆ Purge() [1/2]

Delete BLOBs with access time older than specified.

Function finds all BLOB versions with the specified key and removes the old instances.

Parameters
key BLOB key subkey BLOB identification subkey access_timeout Time in seconds. All objects older than this are deleted.

Implements ICache.

Definition at line 4239 of file bdb_blobcache.cpp.

References SBDB_CacheStatistics::AddNeverRead(), SBDB_CacheStatistics::AddPurgeDelete(), SCache_AttrDB::blob_id, CBDB_Transaction::Commit(), eBDB_Ok, CBDB_Transaction::eEnvDefault, CBDB_FileCursor::eEQ, CBDB_Transaction::eNoAssociation, CBDB_FileCursor::Fetch(), CBDB_FileCursor::From, CBDB_Cache::GetTimeout(), if(), int, CBDB_Cache::IsReadOnly(), CBDB_Cache::IsSaveStatistics(), ITERATE, ncbi::grid::netcache::search::fields::key, SCache_AttrDB::key, CBDB_Cache::m_BLOB_SplitStore, CBDB_Cache::m_CacheAttrDB, CBDB_Cache::m_DB_Lock, CBDB_Cache::m_Env, CBDB_Cache::m_MaxTimeout, CBDB_Cache::m_Statistics, max(), SCache_AttrDB::overflow, SCache_AttrDB::owner_name, SCache_AttrDB::read_count, CBDB_FileCursor::SetCondition(), CBDB_RawFile::SetTransaction(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::SetTransaction(), ncbi::grid::netcache::search::fields::subkey, SCache_AttrDB::subkey, SCache_AttrDB::time_stamp, CBDB_FieldString::ToString(), SCache_AttrDB::ttl, SCache_AttrDB::version, dtl::version, CBDB_Cache::x_DropBlob(), CBDB_Cache::x_TruncateDB(), and CBDB_Cache::x_UpdateOwnerStatOnDelete().

◆ Purge() [2/2] void CBDB_Cache::Purge ( time_t  access_timeout ) virtual

Delete all BLOBs older than specified.

Parameters
access_timeout Time in seconds. All objects older than this are deleted.

Implements ICache.

Definition at line 3865 of file bdb_blobcache.cpp.

References SBDB_CacheStatistics::AddNeverRead(), CTimeLine< BV >::AddObject(), SBDB_CacheStatistics::AddPurgeDelete(), CTime::AsString(), SCache_AttrDB::blob_id, SBDB_CacheUnitStatistics::blobs_db, CBDB_Env::CleanLog(), CBDB_Transaction::Commit(), bm::bvector< Alloc >::count(), CBDB_RawFile::CountRecs(), delta(), CBDB_Cache::DropBlobWithExpCheck(), eBDB_Ok, CBDB_FileCursor::eGE, CBDB_Transaction::eNoAssociation, CTimeLine< BV >::EnumerateObjects(), ERR_POST_X, Error(), CBDB_Transaction::eTransASync, CBDB_Cache::EvaluateTimeLine(), fabs, CBDB_FileCursor::Fetch(), CBDB_Env::ForceTransactionCheckpoint(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::FreeUnusedMem(), CLockVector< BV >::FreeUnusedMem(), CBDB_FileCursor::From, CTimeLine< BV >::GetDiscrFactor(), GetFastLocalTime(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::GetIdVector(), CBDB_Cache::GetPurgeBatchSize(), SBDB_CacheStatistics::GlobalStatistics(), i, Info(), IServer_Monitor::IsActive(), CBDB_Cache::IsReadOnly(), CBDB_ErrnoException::IsRecovery(), CBDB_Cache::IsSaveStatistics(), ncbi::grid::netcache::search::fields::key, SCache_AttrDB::key, SCacheDescr::key, LOG_POST_X, CBDB_Cache::m_BatchSleep, CBDB_Cache::m_BLOB_SplitStore, CBDB_Cache::m_CacheAttrDB_RO2, CBDB_Cache::m_CARO2_Lock, CBDB_Cache::m_CleanLogOnPurge, CBDB_Cache::m_DB_Lock, CBDB_Cache::m_Env, CBDB_Cache::m_LockVector, CBDB_Cache::m_Monitor, CBDB_Cache::m_NextExpTime, CBDB_Cache::m_PurgeCount, CBDB_Cache::m_PurgeNowRunning, CBDB_Cache::m_PurgeStopSignal, CBDB_Cache::m_PurgeThreadDelay, CBDB_Cache::m_Statistics, CBDB_Cache::m_TimeLine, CBDB_Cache::m_TimeLine_Lock, msg(), SCache_AttrDB::overflow, SCache_AttrDB::owner_name, precision, SCache_AttrDB::read_count, CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::Save(), IServer_Monitor::Send(), CBDB_FileCursor::SetCondition(), CPurgeFlagGuard::SetFlag(), CBDB_RawFile::SetTransaction(), NStr::SizetToString(), ncbi::grid::netcache::search::fields::subkey, SCache_AttrDB::subkey, SCacheDescr::subkey, CBDB_FieldString::ToString(), CSemaphore::TryWait(), NStr::UIntToString(), SCache_AttrDB::version, SCacheDescr::version, dtl::version, Warning(), CBDB_Cache::x_CheckTimeStampExpired(), CBDB_Cache::x_TruncateDB(), and CBDB_Cache::x_UpdateOwnerStatOnDelete().

Referenced by CBDB_Cache::GetWriteStream(), CBDB_Cache::Open(), CSplitCacheApp::SetupCache(), and CBDB_Cache::x_Store().

◆ Read()

Fetch the BLOB.

Parameters
key BLOB identification key subkey BLOB identification subkey version BLOB version buf pointer on destination buffer size buffer size in bytes (chars)
Returns
FALSE if BLOB doesn't exist or expired
Note
Throws an exception if provided memory buffer is insufficient to read the BLOB

Implements ICache.

Definition at line 2429 of file bdb_blobcache.cpp.

References _ASSERT, SBDB_CacheStatistics::AddRead(), SCache_AttrDB::blob_id, buf, CBDB_Transaction::Commit(), eBDB_Ok, CBDB_FileCursor::eEQ, CBDB_Transaction::eNoAssociation, CBDB_FileCursor::eReadModifyUpdate, CBDB_RawFile::eReallocForbidden, CBDB_Transaction::eTransASync, ICache::fCheckExpirationAlways, CBDB_FileCursor::Fetch(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::Fetch(), CBDB_FileCursor::From, ICache::fTimeStampOnRead, CBDB_Cache::GetBlobId(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::GetCoordinates(), CFastLocalTime::GetLocalTimezone(), CBDB_Cache::GetName(), in(), CBDB_Cache::IsSaveStatistics(), ncbi::grid::netcache::search::fields::key, CBDB_Cache::m_BLOB_SplitStore, CBDB_Cache::m_CacheAttrDB, CBDB_Cache::m_DB_Lock, CBDB_Cache::m_Env, CBDB_Cache::m_LocalTimer, CBDB_Cache::m_LockTimeout, CBDB_Cache::m_LockVector, CBDB_Cache::m_Path, CBDB_Cache::m_Statistics, CBDB_Cache::m_TimeStampFlag, SCache_AttrDB::max_time, SCache_AttrDB::overflow, SCache_AttrDB::owner_name, SCache_AttrDB::read_count, s_MakeOverflowFileName(), CBDB_FileCursor::SetCondition(), CBDB_RawFile::SetTransaction(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::SetTransaction(), SCache_AttrDB::split_id, ncbi::grid::netcache::search::fields::subkey, SCache_AttrDB::time_stamp, CBDB_FieldString::ToString(), CBDB_FileCursor::Update(), dtl::version, SCache_AttrDB::volume_id, and CBDB_Cache::x_CheckTimeStampExpired().

◆ RegisterCommError() ◆ RegisterInternalError() ◆ RegisterNoBlobError() ◆ RegisterOverflow()

Register BLOB object as overflow file.

Definition at line 1868 of file bdb_blobcache.cpp.

References SCache_AttrDB::blob_id, SCache_IdIDX::blob_id, CBDB_Transaction::Commit(), CBDB_Cache::ComputeMaxTime(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::Delete(), eBDB_Ok, CBDB_Transaction::eEnvDefault, CBDB_FileCursor::eEQ, CBDB_Transaction::eNoAssociation, CBDB_FileCursor::eReadModifyUpdate, ERR_POST_X, Error(), CBDB_RawFile::eThrowOnError, CBDB_FileCursor::Fetch(), CBDB_FileCursor::From, CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::GetCoordinates(), CBDB_Cache::GetNextBlobId(), CBDB_File::Insert(), ncbi::grid::netcache::search::fields::key, SCache_AttrDB::key, SCache_IdIDX::key, CBDB_Cache::m_BLOB_SplitStore, CBDB_Cache::m_CacheAttrDB, CBDB_Cache::m_CacheIdIDX, CBDB_Cache::m_DB_Lock, CBDB_Cache::m_Env, SCache_AttrDB::max_time, SCache_AttrDB::overflow, SCache_AttrDB::owner_name, SCache_AttrDB::read_count, CBDB_FileCursor::SetCondition(), CBDB_RawFile::SetTransaction(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::SetTransaction(), SCache_AttrDB::split_id, ncbi::grid::netcache::search::fields::subkey, SCache_AttrDB::subkey, SCache_IdIDX::subkey, SCache_AttrDB::time_stamp, SCache_AttrDB::ttl, SCache_AttrDB::upd_count, CBDB_FileCursor::Update(), SCache_AttrDB::version, SCache_IdIDX::version, dtl::version, and SCache_AttrDB::volume_id.

Referenced by CBDB_CacheIWriter::~CBDB_CacheIWriter().

◆ RegisterProtocolError() ◆ Remove() [1/2]

Definition at line 3272 of file bdb_blobcache.cpp.

References SBDB_CacheStatistics::AddExplDelete(), SBDB_CacheStatistics::AddNeverRead(), SCache_AttrDB::blob_id, CBDB_Transaction::Commit(), eBDB_Ok, CBDB_Transaction::eEnvDefault, CBDB_FileCursor::eEQ, CBDB_Transaction::eNoAssociation, CBDB_FileCursor::Fetch(), CBDB_FileCursor::From, CBDB_Cache::IsReadOnly(), CBDB_Cache::IsSaveStatistics(), ITERATE, ncbi::grid::netcache::search::fields::key, CBDB_Cache::m_BLOB_SplitStore, CBDB_Cache::m_CacheAttrDB, CBDB_Cache::m_DB_Lock, CBDB_Cache::m_Env, CBDB_Cache::m_Statistics, CBDB_Cache::m_TimeLine, CBDB_Cache::m_TimeLine_Lock, SCache_AttrDB::overflow, SCache_AttrDB::owner_name, SCache_AttrDB::read_count, CTimeLine< BV >::RemoveObject(), CBDB_FileCursor::SetCondition(), CBDB_RawFile::SetTransaction(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::SetTransaction(), ncbi::grid::netcache::search::fields::subkey, SCache_AttrDB::subkey, CBDB_FieldString::ToString(), SCache_AttrDB::version, dtl::version, CBDB_Cache::x_DropBlob(), and CBDB_Cache::x_UpdateOwnerStatOnDelete().

◆ Remove() [2/2]

Remove specific cache entry.

Parameters
key BLOB identification key subkey BLOB identification subkey version BLOB version

Implements ICache.

Definition at line 3346 of file bdb_blobcache.cpp.

References SBDB_CacheStatistics::AddExplDelete(), SBDB_CacheStatistics::AddNeverRead(), SCache_AttrDB::blob_id, CBDB_Transaction::Commit(), eBDB_Ok, CBDB_Transaction::eEnvDefault, CBDB_FileCursor::eEQ, CBDB_Transaction::eNoAssociation, CBDB_FileCursor::Fetch(), CBDB_FileCursor::From, CBDB_Cache::IsReadOnly(), CBDB_Cache::IsSaveStatistics(), ITERATE, ncbi::grid::netcache::search::fields::key, CBDB_Cache::m_BLOB_SplitStore, CBDB_Cache::m_CacheAttrDB, CBDB_Cache::m_DB_Lock, CBDB_Cache::m_Env, CBDB_Cache::m_Statistics, CBDB_Cache::m_TimeLine, CBDB_Cache::m_TimeLine_Lock, SCache_AttrDB::overflow, SCache_AttrDB::owner_name, SCache_AttrDB::read_count, CTimeLine< BV >::RemoveObject(), CBDB_FileCursor::SetCondition(), CBDB_RawFile::SetTransaction(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::SetTransaction(), ncbi::grid::netcache::search::fields::subkey, CBDB_FieldString::ToString(), dtl::version, CBDB_Cache::x_DropBlob(), and CBDB_Cache::x_UpdateOwnerStatOnDelete().

◆ RunPurgeThread() void CBDB_Cache::RunPurgeThread ( unsigned  purge_delay = 30 ) ◆ SameCacheParams()

Implements ICache.

Definition at line 5219 of file bdb_blobcache.cpp.

References CDirEntry::AddTrailingPathSeparator(), CTreeNode< TValue, TKeyGetterP >::FindNode(), CTreeNode< TValue, TKeyGetterP >::GetValue(), kBDBCacheDriverName, kCFParam_name, kCFParam_path, kEmptyStr, CBDB_Cache::m_Name, and CBDB_Cache::m_Path.

◆ SBDB_CacheStatistics() ◆ SBDB_CacheUnitStatistics() SBDB_CacheUnitStatistics::SBDB_CacheUnitStatistics ( ) ◆ SBDB_TimeAccessStatistics() SBDB_TimeAccessStatistics::SBDB_TimeAccessStatistics ( unsigned  d, unsigned  hr, unsigned  put, unsigned  get  ) inline

Definition at line 150 of file bdb_blobcache.hpp.

◆ SCache_AttrDB() SCache_AttrDB::SCache_AttrDB ( ) inline

Definition at line 89 of file bdb_blobcache.hpp.

References CBDB_File::BindData(), CBDB_File::BindKey(), SCache_AttrDB::blob_id, CBDB_File::DisableNull(), SCache_AttrDB::key, SCache_AttrDB::max_time, SCache_AttrDB::overflow, SCache_AttrDB::owner_name, SCache_AttrDB::read_count, SCache_AttrDB::split_id, SCache_AttrDB::subkey, SCache_AttrDB::time_stamp, SCache_AttrDB::ttl, SCache_AttrDB::upd_count, SCache_AttrDB::version, and SCache_AttrDB::volume_id.

◆ SCache_IdIDX() SCache_IdIDX::SCache_IdIDX ( ) inline ◆ SetBatchSleep() void CBDB_Cache::SetBatchSleep ( unsigned  sleep ) ◆ SetBlobVersionAsCurrent()

Set current valid version for a BLOB.

Parameters
[in] key BLOB identification key [in] subkey BLOB identification subkey [in] version BLOB version which must be considered valid from now on
Note
Throw exception in case of transient errors.
There is an important special case: if the underlying storage is inherently incapable of storing BLOB version info without storing the BLOB itself, and there is currently no blob with the specified key/subkey/version present in the cache, then this function will just do nothing, and it will not throw exception.
See also
GetReadStream()

Implements ICache.

Definition at line 2881 of file bdb_blobcache.cpp.

References NCBI_USER_THROW.

◆ SetCheckpoint() void CBDB_Cache::SetCheckpoint ( unsigned int  bytes ) inline ◆ SetCheckpointDelay() void CBDB_Cache::SetCheckpointDelay ( unsigned int  delay ) inline ◆ SetFlags() void CBDB_Cache::SetFlags ( TFlags  flags ) virtual ◆ SetInitIfDirty() void CBDB_Cache::SetInitIfDirty ( bool  value ) inline ◆ SetLogDir() ◆ SetLogFileMax() void CBDB_Cache::SetLogFileMax ( unsigned  fl_size ) inline ◆ SetMaxBlobSize() void CBDB_Cache::SetMaxBlobSize ( unsigned  max_size ) inline ◆ SetMempTrickle() void CBDB_Cache::SetMempTrickle ( unsigned  memp_trickle ) inline ◆ SetMonitor()

Set monitor (class does NOT take ownership)

Monitor should be set at right after construction, before using cache. (Especially important in MT environment)

Definition at line 406 of file bdb_blobcache.hpp.

References CBDB_Cache::m_Monitor.

◆ SetOverflowLimit() void CBDB_Cache::SetOverflowLimit ( unsigned  limit ) ◆ SetPurgeBatchSize() void CBDB_Cache::SetPurgeBatchSize ( unsigned  batch_size ) ◆ SetReadUpdateLimit() void CBDB_Cache::SetReadUpdateLimit ( unsigned  ) inline

Set update attribute limit (0 by default)

When cache is configured to update BLOB time stamps on read it can cause delays because it needs to initiate a transaction every time you read. This method configures a delayed update. Cache keeps all updates until it reaches the limit and saves it all in one transaction.

Definition at line 419 of file bdb_blobcache.hpp.

Referenced by CSplitCacheApp::SetupCache().

◆ SetRR_Volumes() void CBDB_Cache::SetRR_Volumes ( unsigned  rrv ) inline ◆ SetSaveStatistics() void CBDB_Cache::SetSaveStatistics ( bool  save ) inline ◆ SetTimeStampPolicy() void CBDB_Cache::SetTimeStampPolicy ( TTimeStampFlags  policy, unsigned int  timeout, unsigned int  max_timeout = 0  ) virtual ◆ SetTTL_Prolongation() void CBDB_Cache::SetTTL_Prolongation ( unsigned  ttl_prolong ) ◆ SetVersionRetention() ◆ SetWriteSync() ◆ StartPurgeThread() void CBDB_Cache::StartPurgeThread ( )

Start background thread.

Definition at line 1545 of file bdb_blobcache.cpp.

References CBDB_Cache_OnAppExit::AddOnExitCallback(), CBDB_Env::eBackground_Checkpoint, CBDB_Env::eBackground_DeadLockDetect, CBDB_Env::eBackground_MempTrickle, ERR_POST_X, flags, Info(), LOG_POST_X, CBDB_Cache::m_CheckPointDelay, CBDB_Cache::m_Env, CBDB_Cache::m_JoinedEnv, CBDB_Cache::m_MempTrickle, CBDB_Cache::m_PurgeThread, CBDB_Cache::m_PurgeThreadDelay, CBDB_Cache::m_RunPurgeThread, CBDB_Cache::m_StopThreadFlag, CRef< C, Locker >::Reset(), CThread::Run(), CBDB_Env::RunBackgroundWriter(), CBDB_Env::TransactionCheckpoint(), and Warning().

Referenced by CBDB_Cache::Open().

◆ StopPurge() void CBDB_Cache::StopPurge ( ) ◆ StopPurgeThread() void CBDB_Cache::StopPurgeThread ( )

Stop background thread.

Definition at line 1575 of file bdb_blobcache.cpp.

References CRef< C, Locker >::Empty(), Info(), CThread::Join(), LOG_POST_X, CBDB_Cache::m_PurgeThread, CBDB_Cache::m_StopThreadFlag, CThreadNonStop::RequestStop(), CRef< C, Locker >::Reset(), and CBDB_Cache::StopPurge().

Referenced by CBDB_Cache::Close(), and CBDB_Cache_OnAppExit::operator()().

◆ Store() [1/2] ◆ Store() [2/2] ◆ Unlock() void CBDB_Cache::Unlock ( void  ) ◆ Verify()

Run verification of the cache database.

Parameters
cache_path Path to cache cache_name Cache instance name err_file Name of the error file When NULL errors are dumped to stderr

Definition at line 4348 of file bdb_blobcache.cpp.

References CDirEntry::AddTrailingPathSeparator(), CBDB_Cache::Close(), ERR_POST_X, CBDB_Env::ForceRemove(), CBDB_Cache::m_CacheAttrDB, CBDB_Cache::m_Env, CBDB_Cache::m_Path, CBDB_Env::Open(), CBDB_Env::OpenErrFile(), CBDB_Env::Remove(), CBDB_Env::SetCacheSize(), CBDB_RawFile::SetEnv(), string, and CBDB_File::Verify().

Referenced by CBDB_CacheVerifyApp::Run().

◆ WriteOverflow() ◆ x_AddErrGetPut() void SBDB_CacheUnitStatistics::x_AddErrGetPut ( EErrGetPut  operation ) private ◆ x_CheckTimeStampExpired() bool CBDB_Cache::x_CheckTimeStampExpired ( SCache_AttrDBattr_db, time_t  curr, time_t *  exp_time = 0  ) private

Definition at line 4426 of file bdb_blobcache.cpp.

References CBDB_Cache::GetTimeout(), int, CBDB_Cache::m_MaxTimeout, max(), SCache_AttrDB::time_stamp, and SCache_AttrDB::ttl.

Referenced by CBDB_Cache::DropBlobWithExpCheck(), CBDB_Cache::EvaluateTimeLine(), CBDB_Cache::GetBlobAccess(), CBDB_Cache::GetReadStream(), CBDB_Cache::GetSizeEx(), CBDB_Cache::HasBlobs(), CBDB_Cache::Purge(), and CBDB_Cache::Read().

◆ x_Close() void CBDB_Cache::x_Close ( void  ) private ◆ x_ComputeExpTime() time_t CBDB_Cache::x_ComputeExpTime ( int  time_stamp, unsigned  ttl, int  timeout  ) private ◆ x_CreateOverflowReader() ◆ x_DropBlob()

Definition at line 4792 of file bdb_blobcache.cpp.

References SCache_IdIDX::blob_id, CBDB_File::Delete(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::Delete(), eBDB_Ok, CBDB_FileCursor::eEQ, CBDB_RawFile::eThrowOnError, CBDB_FileCursor::Fetch(), CBDB_FileCursor::From, CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::GetCoordinates(), CBDB_Cache::IsReadOnly(), ncbi::grid::netcache::search::fields::key, SCache_AttrDB::key, CBDB_Cache::m_BLOB_SplitStore, CBDB_Cache::m_CacheAttrDB, CBDB_Cache::m_CacheIdIDX, CBDB_FileCursor::SetCondition(), CBDB_RawFile::SetTransaction(), SCache_AttrDB::split_id, ncbi::grid::netcache::search::fields::subkey, SCache_AttrDB::subkey, SCache_AttrDB::version, dtl::version, SCache_AttrDB::volume_id, and CBDB_Cache::x_DropOverflow().

Referenced by CBDB_Cache::KillBlob(), CBDB_Cache::Purge(), and CBDB_Cache::Remove().

◆ x_DropOverflow() [1/2] void CBDB_Cache::x_DropOverflow ( const stringfile_path ) private ◆ x_DropOverflow() [2/2]

Definition at line 4612 of file bdb_blobcache.cpp.

References ERR_POST_X, CBDB_Cache::GetName(), ncbi::grid::netcache::search::fields::key, CBDB_Cache::m_Path, s_MakeOverflowFileName(), ncbi::grid::netcache::search::fields::subkey, and dtl::version.

Referenced by CBDB_Cache::DropBlob(), CBDB_Cache::DropBlobWithExpCheck(), CBDB_Cache::WriteOverflow(), CBDB_Cache::x_DropBlob(), and CBDB_Cache::x_Store().

◆ x_FetchBlobAttributes() ◆ x_PerformCheckPointNoLock() void CBDB_Cache::x_PerformCheckPointNoLock ( unsigned  bytes_written ) private ◆ x_PidLock() ◆ x_RetrieveBlobAttributes() ◆ x_Store()

Definition at line 1985 of file bdb_blobcache.cpp.

References _ASSERT, SBDB_CacheStatistics::AddBlobQuotaError(), CTimeLine< BV >::AddObject(), SBDB_CacheStatistics::AddStore(), BDB_THROW, SCache_AttrDB::blob_id, CBDB_Cache::BlobCheckIn(), CBDB_Transaction::Commit(), CBDB_Cache::ComputeMaxTime(), data, CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::Delete(), eBDB_Ok, CBDB_Cache::eBlobCheckIn_Create, CBDB_Cache::eBlobCheckIn_Found, CBDB_Cache::EBlobCheckIn_NotFound, ICache::eDropAll, ICache::eDropOlder, CBDB_Transaction::eEnvDefault, CBDB_FileCursor::eEQ, CBDB_Transaction::eNoAssociation, CBDB_FileCursor::eReadModifyUpdate, ERR_POST_X, Error(), CBDB_RawFile::eThrowOnError, CBDB_FileCursor::Fetch(), CBDB_FileCursor::From, CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::GetCoordinates(), CLockVectorGuard< TLockVect >::GetId(), CFastLocalTime::GetLocalTimezone(), CBDB_Cache::GetMaxBlobSize(), CBDB_Cache::GetName(), CBDB_Cache::GetOverflowLimit(), CBDB_Cache::GetTimeout(), IServer_Monitor::IsActive(), CBDB_Cache::IsReadOnly(), CBDB_Cache::IsSaveStatistics(), ncbi::grid::netcache::search::fields::key, CBDB_Cache::KillBlob(), CBDB_Cache::m_BLOB_SplitStore, CBDB_Cache::m_CacheAttrDB, CBDB_Cache::m_DB_Lock, CBDB_Cache::m_Env, CBDB_Cache::m_LocalTimer, CBDB_Cache::m_LockTimeout, CBDB_Cache::m_LockVector, CBDB_Cache::m_MaxTimeout, CBDB_Cache::m_MaxTTL_prolong, CBDB_Cache::m_Monitor, CBDB_Cache::m_Path, CBDB_Cache::m_Statistics, CBDB_Cache::m_TimeLine, CBDB_Cache::m_TimeLine_Lock, CBDB_Cache::m_Timeout, CBDB_Cache::m_VersionFlag, SCache_AttrDB::max_time, min(), msg(), out(), SCache_AttrDB::overflow, SCache_AttrDB::owner_name, CBDB_Cache::Purge(), s_MakeOverflowFileName(), IServer_Monitor::Send(), CBDB_FileCursor::SetCondition(), CBDB_RawFile::SetTransaction(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::SetTransaction(), ncbi::grid::netcache::search::fields::size, NStr::SizetToString(), SCache_AttrDB::split_id, ncbi::grid::netcache::search::fields::subkey, SCache_AttrDB::time_stamp, trunc, SCache_AttrDB::ttl, NStr::UIntToString(), SCache_AttrDB::upd_count, CBDB_FileCursor::Update(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::UpdateInsert(), dtl::version, SCache_AttrDB::volume_id, CBDB_Cache::WriteOverflow(), CBDB_Cache::x_ComputeExpTime(), and CBDB_Cache::x_DropOverflow().

Referenced by CBDB_CacheIWriter::Flush(), CBDB_Cache::Store(), and CBDB_CacheIWriter::~CBDB_CacheIWriter().

◆ x_TruncateDB() void CBDB_Cache::x_TruncateDB ( ) private

Definition at line 4514 of file bdb_blobcache.cpp.

References SCache_AttrDB::blob_id, CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::Delete(), eBDB_Ok, CBDB_FileCursor::eFirst, CDir::Exists(), CBDB_FileCursor::Fetch(), CDir::GetEntries(), CBDB_Cache::GetName(), Info(), CBDB_Cache::IsReadOnly(), ITERATE, LOG_POST_X, CBDB_Cache::m_BLOB_SplitStore, CBDB_Cache::m_CacheAttrDB, CBDB_Cache::m_Path, mask, CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::Save(), CBDB_FileCursor::SetCondition(), CBDB_BlobSplitStore< TBV, TObjDeMux, TL >::SetTransaction(), SCache_AttrDB::split_id, CBDB_RawFile::Truncate(), and SCache_AttrDB::volume_id.

Referenced by CBDB_Cache::Purge().

◆ x_UpdateAccessTime()

Transactional update of access time attributes.

Definition at line 4460 of file bdb_blobcache.cpp.

References _ASSERT, eBDB_Ok, CBDB_Cache::eBlobRead, CBDB_Cache::eBlobStore, CBDB_Cache::eBlobUpdate, CBDB_FileCursor::eEQ, CBDB_FileCursor::eReadModifyUpdate, CBDB_FileCursor::Fetch(), CBDB_FileCursor::From, CBDB_Cache::IsReadOnly(), ncbi::grid::netcache::search::fields::key, CBDB_Cache::m_CacheAttrDB, SCache_AttrDB::max_time, SCache_AttrDB::read_count, CBDB_FileCursor::SetCondition(), SCache_AttrDB::time_stamp, SCache_AttrDB::upd_count, CBDB_FileCursor::Update(), and dtl::version.

Referenced by CBDB_Cache::x_UpdateReadAccessTime().

◆ x_UpdateOwnerStatOnDelete() void CBDB_Cache::x_UpdateOwnerStatOnDelete ( const stringowner, bool  expl_delete  ) private ◆ x_UpdateReadAccessTime() ◆ ~CBDB_Cache() CBDB_Cache::~CBDB_Cache ( ) virtual ◆ ~CBDB_CacheHolder() CBDB_CacheHolder::~CBDB_CacheHolder ( ) ◆ blob_id [1/2]

BLOB counter.

Definition at line 83 of file bdb_blobcache.hpp.

Referenced by CBDB_Cache::BlobCheckIn(), CBDB_Cache::DropBlob(), CBDB_Cache::DropBlobWithExpCheck(), CBDB_Cache::EvaluateTimeLine(), CBDB_Cache::GetBlobId(), CBDB_Cache::GetReadStream(), CBDB_Cache::Open(), CBDB_Cache::Purge(), CBDB_Cache::Read(), CBDB_Cache::RegisterOverflow(), CBDB_Cache::Remove(), SCache_AttrDB::SCache_AttrDB(), CBDB_Cache::x_RetrieveBlobAttributes(), CBDB_Cache::x_Store(), and CBDB_Cache::x_TruncateDB().

◆ blob_id [2/2] ◆ blob_size_hist ◆ blob_size_max_total unsigned SBDB_CacheUnitStatistics::blob_size_max_total ◆ blobs_db unsigned SBDB_CacheUnitStatistics::blobs_db ◆ blobs_expl_deleted_total unsigned SBDB_CacheUnitStatistics::blobs_expl_deleted_total ◆ blobs_never_read_total unsigned SBDB_CacheUnitStatistics::blobs_never_read_total ◆ blobs_overflow_total unsigned SBDB_CacheUnitStatistics::blobs_overflow_total ◆ blobs_purge_deleted_total unsigned SBDB_CacheUnitStatistics::blobs_purge_deleted_total ◆ blobs_read_total unsigned SBDB_CacheUnitStatistics::blobs_read_total ◆ blobs_size_db double SBDB_CacheUnitStatistics::blobs_size_db ◆ blobs_size_total double SBDB_CacheUnitStatistics::blobs_size_total ◆ blobs_stored_total unsigned SBDB_CacheUnitStatistics::blobs_stored_total ◆ blobs_updates_total unsigned SBDB_CacheUnitStatistics::blobs_updates_total ◆ day unsigned SBDB_TimeAccessStatistics::day ◆ err_blob_get unsigned SBDB_CacheUnitStatistics::err_blob_get ◆ err_blob_over_quota unsigned SBDB_CacheUnitStatistics::err_blob_over_quota ◆ err_blob_put unsigned SBDB_CacheUnitStatistics::err_blob_put ◆ err_communication unsigned SBDB_CacheUnitStatistics::err_communication ◆ err_internal unsigned SBDB_CacheUnitStatistics::err_internal ◆ err_no_blob unsigned SBDB_CacheUnitStatistics::err_no_blob ◆ err_protocol unsigned SBDB_CacheUnitStatistics::err_protocol ◆ get_count unsigned SBDB_TimeAccessStatistics::get_count ◆ hour unsigned SBDB_TimeAccessStatistics::hour ◆ kBDBCacheDriverName const char* kBDBCacheDriverName extern ◆ key [1/3]

Definition at line 74 of file bdb_blobcache.hpp.

Referenced by CBDB_Cache::BlobCheckIn(), CBDB_Cache::DropBlobWithExpCheck(), CBDB_Cache::GetAccessTime(), CBDB_Cache::GetBlobId(), CBDB_Cache::HasBlobs(), CBDB_Cache::Open(), CBDB_Cache::Purge(), CBDB_Cache::RegisterOverflow(), SCache_AttrDB::SCache_AttrDB(), CBDB_Cache::x_DropBlob(), and CBDB_Cache::x_FetchBlobAttributes().

◆ key [2/3] ◆ key [3/3] string CBDB_Cache::CacheKey::key ◆ m_BatchSleep unsigned CBDB_Cache::m_BatchSleep private ◆ m_BLOB_SplitStore

Cache BLOB storage.

Definition at line 914 of file bdb_blobcache.hpp.

Referenced by CBDB_Cache::Close(), CBDB_Cache::DropBlob(), CBDB_Cache::DropBlobWithExpCheck(), CBDB_Cache::GetBlobAccess(), CBDB_Cache::GetReadStream(), CBDB_Cache::GetSizeEx(), CBDB_Cache::IsOpen(), CBDB_Cache::KillBlob(), CBDB_Cache::Open(), CBDB_Cache::OpenReadOnly(), CBDB_Cache::Purge(), CBDB_Cache::Read(), CBDB_Cache::RegisterOverflow(), CBDB_Cache::Remove(), CBDB_Cache::x_DropBlob(), CBDB_Cache::x_Store(), and CBDB_Cache::x_TruncateDB().

◆ m_BlobCache ICache* CBDB_CacheHolder::m_BlobCache private ◆ m_BlobIdCounter ◆ m_CacheAttrDB

Cache attributes database.

Definition at line 915 of file bdb_blobcache.hpp.

Referenced by CBDB_Cache::BlobCheckIn(), CBDB_Cache::Close(), CBDB_Cache::DropBlob(), CBDB_Cache::DropBlobWithExpCheck(), CBDB_Cache::GetAccessTime(), CBDB_Cache::GetBlobAccess(), CBDB_Cache::GetBlobOwner(), CBDB_Cache::GetReadStream(), CBDB_Cache::GetSizeEx(), CBDB_Cache::GetWriteStream(), CBDB_Cache::HasBlobs(), CBDB_Cache::Open(), CBDB_Cache::OpenReadOnly(), CBDB_Cache::Purge(), CBDB_Cache::Read(), CBDB_Cache::RegisterOverflow(), CBDB_Cache::Remove(), CBDB_Cache::Verify(), CBDB_Cache::x_Close(), CBDB_Cache::x_DropBlob(), CBDB_Cache::x_FetchBlobAttributes(), CBDB_Cache::x_RetrieveBlobAttributes(), CBDB_Cache::x_Store(), CBDB_Cache::x_TruncateDB(), and CBDB_Cache::x_UpdateAccessTime().

◆ m_CacheAttrDB_RO1 ◆ m_CacheAttrDB_RO2 ◆ m_CacheIdIDX ◆ m_CacheIdIDX_RO ◆ m_CARO1_Lock ◆ m_CARO2_Lock ◆ m_CheckPointDelay unsigned CBDB_Cache::m_CheckPointDelay private ◆ m_CheckPointInterval unsigned CBDB_Cache::m_CheckPointInterval private ◆ m_CleanLogOnPurge unsigned CBDB_Cache::m_CleanLogOnPurge private ◆ m_Closed bool CBDB_Cache::m_Closed private ◆ m_DB_Lock

Database lock.

Definition at line 917 of file bdb_blobcache.hpp.

Referenced by CBDB_Cache::BlobCheckIn(), CBDB_Cache::DropBlob(), CBDB_Cache::DropBlobWithExpCheck(), CBDB_Cache::GetAccessTime(), CBDB_Cache::GetBatchSleep(), CBDB_Cache::GetBlobAccess(), CBDB_Cache::GetBlobOwner(), CBDB_Cache::GetPurgeBatchSize(), CBDB_Cache::GetReadStream(), CBDB_Cache::GetSizeEx(), CBDB_Cache::GetStatistics(), CBDB_Cache::HasBlobs(), CBDB_Cache::InitStatistics(), CBDB_Cache::KillBlob(), CBDB_Cache::Lock(), CBDB_Cache::Open(), CBDB_Cache::OpenReadOnly(), CBDB_Cache::Purge(), CBDB_Cache::Read(), CBDB_Cache::RegisterCommError(), CBDB_Cache::RegisterInternalError(), CBDB_Cache::RegisterNoBlobError(), CBDB_Cache::RegisterOverflow(), CBDB_Cache::RegisterProtocolError(), CBDB_Cache::Remove(), CBDB_Cache::SetBatchSleep(), CBDB_Cache::SetPurgeBatchSize(), CBDB_Cache::SetTimeStampPolicy(), CBDB_Cache::SetVersionRetention(), CBDB_Cache::StopPurge(), CBDB_Cache::Unlock(), CBDB_CacheIWriter::Write(), CBDB_Cache::x_Store(), and CBDB_CacheIWriter::~CBDB_CacheIWriter().

◆ m_Env

Common environment for cache DBs.

Definition at line 912 of file bdb_blobcache.hpp.

Referenced by CBDB_Cache::BlobCheckIn(), CBDB_Cache::CleanLog(), CBDB_Cache::Close(), CBDB_Cache::DropBlob(), CBDB_Cache::EvaluateTimeLine(), CBDB_Cache::GetBlobAccess(), CBDB_Cache::GetEnv(), CBDB_Cache::GetReadStream(), CBDB_Cache::KillBlob(), CBDB_Cache::Open(), CBDB_Cache::Purge(), CBDB_Cache::Read(), CBDB_Cache::RegisterOverflow(), CBDB_Cache::Remove(), CBDB_Cache::StartPurgeThread(), CBDB_Cache::Verify(), CBDB_Cache::x_Close(), CBDB_Cache::x_PerformCheckPointNoLock(), and CBDB_Cache::x_Store().

◆ m_GC_Deleted ◆ m_GlobalStat

Definition at line 281 of file bdb_blobcache.hpp.

Referenced by SBDB_CacheStatistics::AddBlobQuotaError(), SBDB_CacheStatistics::AddCommError(), SBDB_CacheStatistics::AddExplDelete(), SBDB_CacheStatistics::AddInternalError(), SBDB_CacheStatistics::AddNeverRead(), SBDB_CacheStatistics::AddNoBlobError(), SBDB_CacheStatistics::AddProtocolError(), SBDB_CacheStatistics::AddPurgeDelete(), SBDB_CacheStatistics::AddRead(), SBDB_CacheStatistics::AddStore(), SBDB_CacheStatistics::ConvertToRegistry(), SBDB_CacheStatistics::GlobalStatistics(), SBDB_CacheStatistics::Init(), and SBDB_CacheStatistics::PrintStatistics().

◆ m_IdCache ICache* CBDB_CacheHolder::m_IdCache private ◆ m_IDIDX_Lock_RO ◆ m_InitIfDirty bool CBDB_Cache::m_InitIfDirty private ◆ m_JoinedEnv bool CBDB_Cache::m_JoinedEnv private ◆ m_LastTimeLineCheck time_t CBDB_Cache::m_LastTimeLineCheck private ◆ m_LocalTimer ◆ m_LockTimeout unsigned CBDB_Cache::m_LockTimeout private ◆ m_LockVector ◆ m_LogDir ◆ m_LogSizeMax unsigned CBDB_Cache::m_LogSizeMax private ◆ m_MaxBlobSize unsigned CBDB_Cache::m_MaxBlobSize private ◆ m_MaxTimeout unsigned CBDB_Cache::m_MaxTimeout private ◆ m_MaxTTL_prolong unsigned CBDB_Cache::m_MaxTTL_prolong private ◆ m_MempTrickle unsigned CBDB_Cache::m_MempTrickle private ◆ m_Monitor ◆ m_Name ◆ m_NextExpTime time_t CBDB_Cache::m_NextExpTime private ◆ m_OverflowLimit unsigned CBDB_Cache::m_OverflowLimit private ◆ m_OwnerStatMap

Definition at line 282 of file bdb_blobcache.hpp.

Referenced by SBDB_CacheStatistics::AddBlobQuotaError(), SBDB_CacheStatistics::AddCommError(), SBDB_CacheStatistics::AddExplDelete(), SBDB_CacheStatistics::AddInternalError(), SBDB_CacheStatistics::AddNeverRead(), SBDB_CacheStatistics::AddNoBlobError(), SBDB_CacheStatistics::AddProtocolError(), SBDB_CacheStatistics::AddPurgeDelete(), SBDB_CacheStatistics::AddRead(), SBDB_CacheStatistics::AddStore(), SBDB_CacheStatistics::ConvertToRegistry(), SBDB_CacheStatistics::Init(), and SBDB_CacheStatistics::PrintStatistics().

◆ m_Path

Path to storage.

Definition at line 903 of file bdb_blobcache.hpp.

Referenced by CBDB_Cache::Close(), CBDB_Cache::GetCacheName(), CBDB_Cache::GetSizeEx(), CBDB_Cache::GetWriteStream(), CBDB_Cache::Open(), CBDB_Cache::OpenReadOnly(), CBDB_Cache::Read(), CBDB_Cache::SameCacheParams(), CBDB_Cache::Verify(), CBDB_Cache::x_CreateOverflowReader(), CBDB_Cache::x_DropOverflow(), CBDB_Cache::x_PidLock(), CBDB_Cache::x_Store(), and CBDB_Cache::x_TruncateDB().

◆ m_PidGuard ◆ m_PurgeBatchSize unsigned CBDB_Cache::m_PurgeBatchSize private ◆ m_PurgeCount unsigned CBDB_Cache::m_PurgeCount private ◆ m_PurgeNowRunning bool CBDB_Cache::m_PurgeNowRunning private ◆ m_PurgeStopSignal ◆ m_PurgeThread ◆ m_PurgeThreadDelay unsigned CBDB_Cache::m_PurgeThreadDelay private ◆ m_ReadOnly bool CBDB_Cache::m_ReadOnly private ◆ m_RoundRobinVolumes unsigned CBDB_Cache::m_RoundRobinVolumes private ◆ m_RunPurgeThread bool CBDB_Cache::m_RunPurgeThread private ◆ m_SaveStatistics bool CBDB_Cache::m_SaveStatistics private ◆ m_Statistics

Stat counters.

Definition at line 968 of file bdb_blobcache.hpp.

Referenced by CBDB_Cache::DropBlob(), CBDB_Cache::GetBlobAccess(), CBDB_Cache::GetReadStream(), CBDB_Cache::GetStatistics(), CBDB_Cache::InitStatistics(), CBDB_Cache::Purge(), CBDB_Cache::Read(), CBDB_Cache::RegisterCommError(), CBDB_Cache::RegisterInternalError(), CBDB_Cache::RegisterNoBlobError(), CBDB_Cache::RegisterProtocolError(), CBDB_Cache::Remove(), CBDB_CacheIWriter::Write(), CBDB_Cache::x_Store(), and CBDB_CacheIWriter::~CBDB_CacheIWriter().

◆ m_StopThreadFlag shared_ptr<bool> CBDB_Cache::m_StopThreadFlag private ◆ m_TimeLine ◆ m_TimeLine_Lock ◆ m_Timeout unsigned CBDB_Cache::m_Timeout private ◆ m_TimeStampFlag ◆ m_VersionFlag ◆ m_WSync ◆ max_time ◆ overflow

overflow flag

Definition at line 78 of file bdb_blobcache.hpp.

Referenced by CBDB_Cache::BlobCheckIn(), CBDB_Cache::DropBlob(), CBDB_Cache::DropBlobWithExpCheck(), CBDB_Cache::EvaluateTimeLine(), CBDB_Cache::GetBlobAccess(), CBDB_Cache::GetReadStream(), CBDB_Cache::GetSizeEx(), CBDB_Cache::Purge(), CBDB_Cache::Read(), CBDB_Cache::RegisterOverflow(), CBDB_Cache::Remove(), SCache_AttrDB::SCache_AttrDB(), CBDB_Cache::x_RetrieveBlobAttributes(), and CBDB_Cache::x_Store().

◆ owner_name

owner's name

Definition at line 87 of file bdb_blobcache.hpp.

Referenced by CBDB_Cache::BlobCheckIn(), CBDB_Cache::DropBlob(), CBDB_Cache::GetBlobAccess(), CBDB_Cache::GetBlobOwner(), CBDB_Cache::GetReadStream(), CBDB_Cache::Purge(), CBDB_Cache::Read(), CBDB_Cache::RegisterOverflow(), CBDB_Cache::Remove(), SCache_AttrDB::SCache_AttrDB(), and CBDB_Cache::x_Store().

◆ put_count unsigned SBDB_TimeAccessStatistics::put_count ◆ read_count ◆ split_id

demux coord[1]

Definition at line 85 of file bdb_blobcache.hpp.

Referenced by CBDB_Cache::BlobCheckIn(), CBDB_Cache::DropBlob(), CBDB_Cache::DropBlobWithExpCheck(), CBDB_Cache::GetBlobAccess(), CBDB_Cache::GetReadStream(), CBDB_Cache::Open(), CBDB_Cache::Read(), CBDB_Cache::RegisterOverflow(), SCache_AttrDB::SCache_AttrDB(), CBDB_Cache::x_DropBlob(), CBDB_Cache::x_RetrieveBlobAttributes(), CBDB_Cache::x_Store(), and CBDB_Cache::x_TruncateDB().

◆ subkey [1/3]

Definition at line 76 of file bdb_blobcache.hpp.

Referenced by CBDB_Cache::BlobCheckIn(), CBDB_Cache::DropBlobWithExpCheck(), CBDB_Cache::GetAccessTime(), CBDB_Cache::GetBlobId(), CBDB_Cache::Open(), CBDB_Cache::Purge(), CBDB_Cache::RegisterOverflow(), CBDB_Cache::Remove(), SCache_AttrDB::SCache_AttrDB(), CBDB_Cache::x_DropBlob(), and CBDB_Cache::x_FetchBlobAttributes().

◆ subkey [2/3] ◆ subkey [3/3] string CBDB_Cache::CacheKey::subkey ◆ time_access ◆ time_stamp

access timestamp

Definition at line 77 of file bdb_blobcache.hpp.

Referenced by CBDB_Cache::BlobCheckIn(), CBDB_Cache::GetAccessTime(), CBDB_Cache::GetBlobAccess(), CBDB_Cache::GetReadStream(), CBDB_Cache::Purge(), CBDB_Cache::Read(), CBDB_Cache::RegisterOverflow(), SCache_AttrDB::SCache_AttrDB(), CBDB_Cache::x_CheckTimeStampExpired(), CBDB_Cache::x_Store(), and CBDB_Cache::x_UpdateAccessTime().

◆ ttl ◆ upd_count ◆ version [1/3]

Definition at line 75 of file bdb_blobcache.hpp.

Referenced by CBDB_Cache::BlobCheckIn(), CBDB_Cache::DropBlobWithExpCheck(), CBDB_Cache::GetAccessTime(), CBDB_Cache::GetBlobId(), CBDB_Cache::HasBlobs(), CBDB_Cache::Open(), CBDB_Cache::Purge(), CBDB_Cache::RegisterOverflow(), CBDB_Cache::Remove(), SCache_AttrDB::SCache_AttrDB(), CBDB_Cache::x_DropBlob(), and CBDB_Cache::x_FetchBlobAttributes().

◆ version [2/3] ◆ version [3/3] int CBDB_Cache::CacheKey::version ◆ volume_id

demux coord[0]

Definition at line 84 of file bdb_blobcache.hpp.

Referenced by CBDB_Cache::BlobCheckIn(), CBDB_Cache::DropBlob(), CBDB_Cache::DropBlobWithExpCheck(), CBDB_Cache::GetBlobAccess(), CBDB_Cache::GetReadStream(), CBDB_Cache::Open(), CBDB_Cache::Read(), CBDB_Cache::RegisterOverflow(), SCache_AttrDB::SCache_AttrDB(), CBDB_Cache::x_DropBlob(), CBDB_Cache::x_RetrieveBlobAttributes(), CBDB_Cache::x_Store(), and CBDB_Cache::x_TruncateDB().

◆ CBDB_Cache_OnAppExit ◆ CBDB_CacheIReader ◆ CBDB_CacheIWriter ◆ CCacheTransaction

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4