39 #define NCBI_USE_ERRCODE_X SQLITE3_Cache
91 LOG_POST(
Warning <<
"created sqlite3 cache driver, but no params provided");
95 const string& tree_id = params->
GetKey();
98 <<
"ICache class factory: Top level Id does not match driver name."
100 <<
" parameters ignored." );
102 return drv.release();
108 if (
sizeof(
void*) == 8) {
109 string dir, base, ext;
124 const string& cache_age_str =
126 unsigned cache_age = 0;
134 cache_age = 5 * (24*60*60);
137 drv->SetTimeStampPolicy(0 , cache_age);
140 return drv.release();
Class factory for SQLITE3 BLOB cache.
CSimpleClassFactoryImpl< ICache, CSQLITE3_Cache > TParent
virtual ICache * CreateInstance(const string &driver=kEmptyStr, CVersionInfo version=NCBI_INTERFACE_VERSION(ICache), const TPluginManagerParamTree *params=0) const
Create instance of TDriver.
SQLITE3 cache implementation.
Template class helps to implement one driver class factory.
definition of a Culling tree
BLOB cache read/write/maintenance interface.
The NCBI C++ standard methods for dealing with std::string.
void SQLITE3_Register_Cache(void)
Register NCBI_EntryPoint_SQLITE3_BlobCache.
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
void Warning(CExceptionArgs_Base &args)
static string DeleteTrailingPathSeparator(const string &path)
Delete trailing path separator, if any.
static string MakePath(const string &dir=kEmptyStr, const string &base=kEmptyStr, const string &ext=kEmptyStr)
Assemble a path from basic components.
static void SplitPath(const string &path, string *dir=0, string *base=0, string *ext=0)
Split a path string into its basic components.
static void NCBI_EntryPointImpl(TDriverInfoList &info_list, EEntryPointRequest method)
Entry point implementation.
#define NCBI_INTERFACE_VERSION(iface)
Macro to construct CVersionInfo class using interface name (relies on CInterfaceVersion class)
list< SDriverInfo > TDriverInfoList
List of driver information.
EEntryPointRequest
Actions performed by the entry point.
string GetParam(const TPluginManagerParamTree *params, const string ¶m_name, bool mandatory, const string &default_value) const
Utility function to get an element of parameter tree Throws an exception when mandatory parameter is ...
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static int CompareNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive compare of a substring with another string.
static unsigned int StringToUInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to unsigned int.
static string & ReplaceInPlace(string &src, const string &search, const string &replace, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0)
Replace occurrences of a substring within a string.
const TKeyType & GetKey(void) const
use only n Cassandra database for the lookups</td > n</tr > n< tr > n< td > yes</td > n< td > do not use tables BIOSEQ_INFO and BLOB_PROP in the Cassandra database
double value_type
The numeric datatype used by the parser.
Magic spell ;-) needed for some weird compilers... very empiric.
Helper classes and templates to implement plugins.
#define NCBI_SQLITE3_CACHE_EXPORT
void NCBI_EntryPoint_SQLITE3_BlobCache(CPluginManager< ICache >::TDriverInfoList &info_list, CPluginManager< ICache >::EEntryPointRequest method)
static const char * kCFParam_cache_age
const string kSQLITE3_BlobCacheDriverName("sqlite3")
void NCBI_EntryPoint_xcache_sqlite3(CPluginManager< ICache >::TDriverInfoList &info_list, CPluginManager< ICache >::EEntryPointRequest method)
static const char * kCFParam_database