NCBI C++ ToolKit
Public Member Functions | Private Attributes | List of all members
CColumnarVcfCache Class Reference

Search Toolkit Book for CColumnarVcfCache

#include <gui/widgets/loaders/columnar_vcf_cache.hpp>

+ Inheritance diagram for CColumnarVcfCache:
+ Collaboration diagram for CColumnarVcfCache:

Public Member Functions

 CColumnarVcfCache (const std::string &netcache_key)
 
 CColumnarVcfCache (const std::string &url, const std::string &seq_id, const std::string &last_modified)
 
string GetSeqId () const
 
- Public Member Functions inherited from CDataCrawlerCache
 CDataCrawlerCache ()=default
 Default constructor. More...
 
ECacheState GetState () const
 Gets the state of the cache object. More...
 
ECacheState SetState (ECacheState desired_state)
 Changes the state of the cache object. More...
 
size_t GetReadSize () const
 Returns size of existing BLOB data. More...
 
std::unique_ptr< CNcbiIstreamGetReadStream ()
 Returns stream interface to read BLOB data. More...
 
std::unique_ptr< CNcbiOstreamGetWriteStream ()
 Returns stream interface to write BLOB data. More...
 
void Remove ()
 Removes the cache entry. More...
 
const std::stringGetKey () const
 Returns the NetCache key of the BLOB. More...
 
const std::string GetCompoundKey () const
 Returns the compound NetCache key of the BLOB. More...
 
virtual ~CDataCrawlerCache ()
 Destructor. More...
 

Protected Member Functions

CDataCrawlerCache overridables
virtual CNetICacheClient x_InitBlobCache ()
 Creates the BLOB NetCache instance. More...
 
virtual CNetICacheClient x_InitSyncCache ()
 Creates the sync NetCache instance. More...
 
virtual std::string x_GetCacheKey ()
 Generates the cache key. More...
 
- Protected Member Functions inherited from CDataCrawlerCache
void x_Initialize ()
 Initializes the cache instances. More...
 
std::string x_GetCacheKey (ECacheType type)
 Generates the cache key for a given type. More...
 
void x_StartHeartbeat ()
 Starts the heartbeat (thread to keep the sybc object alive) More...
 
void x_StopHeartbeat ()
 Stops the heartbeat (thread to keep the sybc object alive) More...
 
void x_Heartbeat ()
 The heartbeat thread function. More...
 
CNetICacheClient x_InitICache (const std::string &cache, const std::string &service, const std::string &db)
 Creates a NetCache instance. More...
 
ECacheState x_ReadState () const
 Reads the state of the sync object. More...
 
void x_WriteState (ECacheState state, unsigned int ttl=300)
 Writes a new state to the sync object. More...
 

Private Attributes

std::string m_Url
 
std::string m_SeqId
 
std::string m_LastModified
 
std::string m_NCKey
 

Additional Inherited Members

- Public Types inherited from CDataCrawlerCache
enum  ECacheState { eState_None , eState_InProgress , eState_NotAccessible , eState_Created }
 Cache object states. More...
 
- Protected Types inherited from CDataCrawlerCache
enum  ECacheType { eCache_Blob , eCache_Sync }
 Types of cache objects. More...
 
- Protected Attributes inherited from CDataCrawlerCache
bool m_isImmutableKey {false}
 do not try to shorten or otherwise modify the root cache key More...
 

Detailed Description

Definition at line 45 of file columnar_vcf_cache.hpp.

Constructor & Destructor Documentation

◆ CColumnarVcfCache() [1/2]

CColumnarVcfCache::CColumnarVcfCache ( const std::string netcache_key)

◆ CColumnarVcfCache() [2/2]

CColumnarVcfCache::CColumnarVcfCache ( const std::string url,
const std::string seq_id,
const std::string last_modified 
)

Member Function Documentation

◆ GetSeqId()

string CColumnarVcfCache::GetSeqId ( ) const
inline

Definition at line 50 of file columnar_vcf_cache.hpp.

References m_SeqId.

◆ x_GetCacheKey()

string CColumnarVcfCache::x_GetCacheKey ( )
protectedvirtual

Generates the cache key.

Returns
String, holding the cache key.

Implements CDataCrawlerCache.

Definition at line 98 of file columnar_vcf_cache.cpp.

References ncbi::grid::netcache::search::fields::key, m_LastModified, m_NCKey, m_SeqId, m_Url, and CVCFVariantsBase::s_GetCurrentVersion().

◆ x_InitBlobCache()

CNetICacheClient CColumnarVcfCache::x_InitBlobCache ( )
protectedvirtual

Creates the BLOB NetCache instance.

Returns
The NetCache instance.

Implements CDataCrawlerCache.

Definition at line 88 of file columnar_vcf_cache.cpp.

References kVcfCacheBlob, and CDataCrawlerCache::x_InitICache().

◆ x_InitSyncCache()

CNetICacheClient CColumnarVcfCache::x_InitSyncCache ( )
protectedvirtual

Creates the sync NetCache instance.

Returns
The NetCache instance.

Implements CDataCrawlerCache.

Definition at line 93 of file columnar_vcf_cache.cpp.

References kVcfCacheSync, and CDataCrawlerCache::x_InitICache().

Member Data Documentation

◆ m_LastModified

std::string CColumnarVcfCache::m_LastModified
private

Definition at line 63 of file columnar_vcf_cache.hpp.

Referenced by x_GetCacheKey().

◆ m_NCKey

std::string CColumnarVcfCache::m_NCKey
private

Definition at line 64 of file columnar_vcf_cache.hpp.

Referenced by CColumnarVcfCache(), and x_GetCacheKey().

◆ m_SeqId

std::string CColumnarVcfCache::m_SeqId
private

Definition at line 62 of file columnar_vcf_cache.hpp.

Referenced by CColumnarVcfCache(), GetSeqId(), and x_GetCacheKey().

◆ m_Url

std::string CColumnarVcfCache::m_Url
private

Definition at line 61 of file columnar_vcf_cache.hpp.

Referenced by x_GetCacheKey().


The documentation for this class was generated from the following files:
Modified on Fri Jun 07 13:31:47 2024 by modify_doxy.py rev. 669887