src/objtools/data_loaders/genbank/cache/reader_cache.cpp File Reference

#include <ncbi_pch.hpp>
#include <objtools/data_loaders/genbank/cache/reader_cache.hpp>
#include <objtools/data_loaders/genbank/cache/reader_cache_entry.hpp>
#include <objtools/data_loaders/genbank/cache/reader_cache_params.h>
#include <objtools/data_loaders/genbank/readers.hpp>
#include <objtools/data_loaders/genbank/dispatcher.hpp>
#include <objtools/data_loaders/genbank/request_result.hpp>
#include <objtools/data_loaders/genbank/gbloader.hpp>
#include <corelib/ncbitime.hpp>
#include <corelib/rwstream.hpp>
#include <corelib/plugin_manager_store.hpp>
#include <util/cache/icache.hpp>
#include <objmgr/objmgr_exception.hpp>
#include <objmgr/impl/tse_split_info.hpp>
#include <objmgr/impl/tse_chunk_info.hpp>
#include <objmgr/annot_selector.hpp>
#include <serial/objistrasnb.hpp>
#include <serial/serial.hpp>
#include <objects/seqloc/Seq_id.hpp>

Include dependency graph for reader_cache.cpp:

Go to the source code of this file.

Classes

struct  SPluginParams
struct  SPluginParams::SDefaultValue
class  CCacheReaderCF

Defines

#define FIX_BAD_ID2S_REPLY_DATA   1

Functions

static bool IsDisabledCache (const SCacheInfo::TParams *params)
static SCacheInfo::TParamsGetDriverParams (SCacheInfo::TParams *params)
static SCacheInfo::TParamsGetCacheParamsCopy (const SCacheInfo::TParams *src_params, const char *section_name)
SCacheInfo::TParamsGetCacheParams (const SCacheInfo::TParams *src_params, SCacheInfo::EReaderOrWriter reader_or_writer, SCacheInfo::EIdOrBlob id_or_blob)
void NCBI_EntryPoint_CacheReader (CPluginManager< CReader >::TDriverInfoList &info_list, CPluginManager< CReader >::EEntryPointRequest method)
void NCBI_EntryPoint_xreader_cache (CPluginManager< CReader >::TDriverInfoList &info_list, CPluginManager< CReader >::EEntryPointRequest method)
void GenBankReaders_Register_Cache (void)

Variables

static const size_t kHashLimit = 100
char m_Buffer [4096]
ICache::SBlobAccessDescr m_Descr
const char * m_Ptr
size_t m_Size
static const SPluginParams::SDefaultValue s_DefaultParams []
static const SPluginParams::SDefaultValue s_DefaultIdParams []
static const SPluginParams::SDefaultValue s_DefaultBlobParams []
static const SPluginParams::SDefaultValue s_DefaultReaderParams []
static const SPluginParams::SDefaultValue s_DefaultWriterParams []


Define Documentation

#define FIX_BAD_ID2S_REPLY_DATA   1
 

Definition at line 54 of file reader_cache.cpp.


Function Documentation

void GenBankReaders_Register_Cache void   ) 
 

Definition at line 1004 of file reader_cache.cpp.

References NCBI_EntryPoint_CacheReader().

Referenced by CGBDataLoader::x_GetReaderManager().

SCacheInfo::TParams* GetCacheParams const SCacheInfo::TParams src_params,
SCacheInfo::EReaderOrWriter  reader_or_writer,
SCacheInfo::EIdOrBlob  id_or_blob
 

Definition at line 828 of file reader_cache.cpp.

References SCacheInfo::eIdCache, auto_ptr< X >::get(), GetCacheParamsCopy(), NCBI_GBLOADER_READER_CACHE_PARAM_BLOB_SECTION, and NCBI_GBLOADER_READER_CACHE_PARAM_ID_SECTION.

Referenced by SCacheInfo::CreateCache(), CCacheReader::InitializeCache(), and CCacheWriter::InitializeCache().

static SCacheInfo::TParams* GetCacheParamsCopy const SCacheInfo::TParams src_params,
const char *  section_name
[static]
 

Definition at line 775 of file reader_cache.cpp.

References SPluginParams::FindSubNode(), and IsDisabledCache().

Referenced by GetCacheParams().

static SCacheInfo::TParams* GetDriverParams SCacheInfo::TParams params  )  [static]
 

Definition at line 763 of file reader_cache.cpp.

References NCBI_GBLOADER_READER_CACHE_PARAM_DRIVER, SPluginParams::SetDefaultValue(), and SPluginParams::SetSubSection().

static bool IsDisabledCache const SCacheInfo::TParams params  )  [static]
 

Definition at line 747 of file reader_cache.cpp.

References SPluginParams::FindSubNode(), and NCBI_GBLOADER_READER_CACHE_PARAM_DRIVER.

Referenced by GetCacheParamsCopy().

void NCBI_EntryPoint_CacheReader CPluginManager< CReader >::TDriverInfoList &  info_list,
CPluginManager< CReader >::EEntryPointRequest  method
 

Definition at line 987 of file reader_cache.cpp.

References CHostEntryPointImpl< TClassFactory >::NCBI_EntryPointImpl().

void NCBI_EntryPoint_xreader_cache CPluginManager< CReader >::TDriverInfoList &  info_list,
CPluginManager< CReader >::EEntryPointRequest  method
 

Definition at line 996 of file reader_cache.cpp.

References NCBI_EntryPoint_CacheReader().


Variable Documentation

const size_t kHashLimit = 100 [static]
 

Definition at line 91 of file reader_cache.cpp.

char m_Buffer[4096]
 

Definition at line 302 of file reader_cache.cpp.

Referenced by CSimpleBufferT< T, ResizeStrategy >::data(), CBDB_CacheIWriter::Flush(), CSimpleBufferT< T, ResizeStrategy >::operator[](), CDBAPI_CacheIReader::Read(), CSimpleBufferT< T, ResizeStrategy >::reserve(), CSimpleBufferT< T, ResizeStrategy >::reserve_mem(), CSimpleBufferT< T, ResizeStrategy >::resize(), CSimpleBufferT< T, ResizeStrategy >::resize_mem(), CSimpleBufferT< T, ResizeStrategy >::swap(), CBDB_CacheIWriter::Write(), CSimpleBufferT< T, ResizeStrategy >::x_Deallocate(), CDBAPI_CacheIWriter::x_SaveBlob(), CBDB_BvSplitDictStore< Key, Dictionary, BvStore, BV >::x_SerializeBitVector(), and CDBAPI_CacheIReader::~CDBAPI_CacheIReader().

ICache::SBlobAccessDescr m_Descr
 

Definition at line 303 of file reader_cache.cpp.

Referenced by BEGIN_NAMED_BASE_CLASS_INFO(), and CAppJobTask::CAppJobTask().

const char* m_Ptr
 

Definition at line 304 of file reader_cache.cpp.

Referenced by CHitFilter< THit >::SHitEnd::operator<(), AutoArray< CS_INT >::Swap(), and AutoPtr< CNcbiOstrstream >::Swap().

size_t m_Size
 

Definition at line 305 of file reader_cache.cpp.

Referenced by SChunkInfo::Add(), CGBRequestStatistics::AddTimeSize(), CTextItem::CalcSize(), CAmbigDataBuilder::Check(), CExpandGlyph::Draw(), CAmbigDataBuilder::GetAmbig(), CGBRequestStatistics::GetSize(), CSimpleBufferT< T, ResizeStrategy >::operator[](), CSimpleBufferT< T, ResizeStrategy >::reserve(), CSimpleBufferT< T, ResizeStrategy >::resize(), CSimpleBufferT< T, ResizeStrategy >::resize_mem(), CSimpleBufferT< T, ResizeStrategy >::size(), CSimpleBufferT< T, ResizeStrategy >::swap(), and CSimpleBufferT< T, ResizeStrategy >::x_Deallocate().

const SPluginParams::SDefaultValue s_DefaultBlobParams[] [static]
 

Initial value:

 {
    { "name", "blobs" },
    { "timeout", "432000" }, 
    { "timestamp", "onread expire_not_used"  },
    { 0, 0 }
}

Definition at line 812 of file reader_cache.cpp.

const SPluginParams::SDefaultValue s_DefaultIdParams[] [static]
 

Initial value:

 {
    { "name", "ids" },
    { "timeout", "172800" }, 
    { "timestamp", "subkey check_expiration"  },
    { "page_size", "small" },
    { 0, 0}
}

Definition at line 805 of file reader_cache.cpp.

const SPluginParams::SDefaultValue s_DefaultParams[] [static]
 

Initial value:

 {
    { "path", ".genbank_cache" },
    { "keep_versions", "all" },
    { "write_sync", "no" },
    { "mem_size", "20M" },
    { "log_file_max", "20M" },
    { "purge_batch_sleep", "500" }, 
    { "purge_thread_delay", "3600" }, 
    { "purge_clean_log", "16" },
    { 0, 0 }
}

Definition at line 794 of file reader_cache.cpp.

const SPluginParams::SDefaultValue s_DefaultReaderParams[] [static]
 

Initial value:

 {
    { "purge_thread", "yes" },
    { 0, 0 }
}

Definition at line 818 of file reader_cache.cpp.

const SPluginParams::SDefaultValue s_DefaultWriterParams[] [static]
 

Initial value:

 {
    { "purge_thread", "no" },
    { 0, 0 }
}

Definition at line 822 of file reader_cache.cpp.


Generated on Mon Dec 7 09:27:28 2009 for NCBI C++ ToolKit by  doxygen 1.4.6
Modified on Mon Dec 07 16:22:07 2009 by modify_doxy.py rev. 173732