<
typenameKey>
138 template<
classBV,
classTL=CFastMutex>
1463.0 * 1024.0 * 1024.0 * 1024.0,
156 template<
typenameKey,
218 template<
typenameKey>
227 template<
typenameKey>
236 template<
typenameKey>
249 template<
typenameKey>
255m_MaxUid =
max(m_MaxUid,
val);
256 returnUpdateInsert();
260 template<
typenameKey>
268 template<
typenameKey>
276 template<
typenameKey>
285 template<
typenameKey>
295 template<
typenameKey>
319 template<
typenameKey,
typenameDictionary,
typenameStore>
323, m_Store(new Store(demux_path))
328 template<
typenameKey,
typenameDictionary,
typenameStore>
333: m_Dict(&generator, own),
339 template<
typenameKey,
typenameDictionary,
typenameStore>
346 template<
typenameKey,
typenameDictionary,
typenameStore>
350 returnm_Store->
GetEnv();
354 template<
typenameKey,
typenameDictionary,
typenameStore>
362 template<
typenameKey,
typenameDictionary,
typenameStore>
366m_Dict->SetEnv(
env);
367m_Store->SetEnv(
env);
371 template<
typenameKey,
typenameDictionary,
typenameStore>
396 template<
typenameKey,
typenameDictionary,
typenameStore>
402 if( !m_Dict->IsOpen() && !m_Filename.empty() ) {
403m_Dict->Open(m_Filename +
".dict", m_OpenMode);
409 template<
typenameKey,
typenameDictionary,
typenameStore>
415 if( !m_Store->IsOpen() && !m_Filename.empty() ) {
416m_Store->Open(m_Filename, m_OpenMode);
422 template<
typenameKey,
typenameDictionary,
typenameStore>
427 TKeyIdkey_id = x_GetOpenDict().GetKey(
key);
428 returnReadById(key_id,
data);
432 template<
typenameKey,
typenameDictionary,
typenameStore>
437 returnx_GetOpenStore().ReadRealloc(key_id,
data);
441 template<
typenameKey,
typenameDictionary,
typenameStore>
450 template<
typenameKey,
typenameDictionary,
typenameStore>
456 TKeyIdkey_id = x_GetOpenDict().PutKey(
key);
457 returnUpdateInsert(key_id,
data,
size);
461 template<
typenameKey,
typenameDictionary,
typenameStore>
467 returnUpdateInsert(key_id,
data,
size);
471 template<
typenameKey,
typenameDictionary,
typenameStore>
476 returnUpdateInsert(key_id, &
data[0],
data.size());
480 template<
typenameKey,
typenameDictionary,
typenameStore>
486 returnx_GetOpenStore().UpdateInsert(uid,
data,
size);
490 template<
typenameKey,
typenameDictionary,
typenameStore>
496 returnx_GetOpenStore().Delete(
id, on_error, trans);
Wrapper around Berkeley DB environment structure.
BDB library split BLOB store.
Split demux which can save and load state into a file Stateful (persistent) class.
CBDB_BlobDictStore(const CBDB_BlobDictStore< Key, Dictionary, Store > &)
forbidden
const string & GetFileName() const
EBDB_ErrCode Write(const Key &key, const CBDB_RawFile::TBuffer &data)
EBDB_ErrCode Delete(unsigned id, CBDB_RawFile::EIgnoreError on_error=CBDB_RawFile::eThrowOnError, CBDB_Transaction *trans=0)
Delete the underlying blob.
TDictionary & x_GetOpenDict()
EBDB_ErrCode WriteById(TKeyId key_id, const void *data, size_t size)
virtual ~CBDB_BlobDictStore()
EBDB_ErrCode Read(const Key &key, CBDB_RawFile::TBuffer &data)
CBDB_BlobDictStore(const string &demux_path=kEmptyStr)
EBDB_ErrCode Write(const Key &key, const void *data, size_t size)
CBDB_BlobDictStore(Dictionary &dict, Store &store, EOwnership own=eNoOwnership)
CBDB_RawFile::EOpenMode m_OpenMode
EBDB_ErrCode ReadById(TKeyId key, CBDB_RawFile::TBuffer &data)
EBDB_ErrCode WriteById(TKeyId key_id, const CBDB_RawFile::TBuffer &data)
AutoPtr< TStore > m_Store
Dictionary & GetDictionary()
void SetEnv(CBDB_Env &env)
CBDB_BlobDictStore< Key, Dictionary, Store > & operator=(const CBDB_BlobDictStore< Key, Dictionary, Store > &)
TStore & x_GetOpenStore()
AutoPtr< TDictionary > m_Dict
EBDB_ErrCode UpdateInsert(Uint4 uid, const void *data, size_t size)
void Open(const string &fname, CBDB_RawFile::EOpenMode mode)
void Open(const string &, CBDB_RawFile::EOpenMode)
void SetEnv(CBDB_Env &env)
no-ops for compatibility
Uint4 GetKey(const Int4 &key)
Uint4 PutKey(const Int4 &key)
void SetEnv(CBDB_Env &env)
no-ops for compatibility
Uint4 GetKey(const Uint4 &key)
Uint4 PutKey(const Uint4 &key)
void Open(const string &, CBDB_RawFile::EOpenMode)
Templatized candidate for dictionaries This template defines the basic interface that must be support...
TKeyId GetKey(const TKey &key)
SBDB_TypeTraits< Uint4 >::TFieldType m_Uid
data
EBDB_ErrCode Read(TKeyId *val)
read the current key's value
SBDB_TypeTraits< Key >::TFieldType m_Key
key
EBDB_ErrCode Read(const TKey &key, TKeyId *val)
read a particular key's value
Key GetCurrentKey() const
retrieve the current key
EBDB_ErrCode Write(const TKey &key, TKeyId val)
write a key/value pair to the store
TKeyId GetCurrentUid() const
TKeyId PutKey(const TKey &key)
BLOB storage based on single unsigned integer key Supports BLOB volumes and different base page size ...
BDB environment object a collection including support for some or all of caching, locking,...
CBDB_BlobSplitStore< BV, CBDB_BlobDeMuxPersistent, TL > TParent
CBDB_PersistentSplitStore(const string &demux_path)
Reallocable memory buffer (no memory copy overhead) Mimics vector<>, without the overhead of explicit...
@ eNoOwnership
No ownership is assumed.
EOpenMode
BDB file open mode.
void BindKey(const char *field_name, CBDB_Field *key_field, size_t buf_size=0)
void BindData(const char *field_name, CBDB_Field *data_field, size_t buf_size=0, ENullable is_null=eNullable)
EBDB_ErrCode
BDB Return codes.
DB_ENV * GetEnv()
Return underlying DB_ENV structure pointer for low level access.
void Read(CObjectIStream &in, TObjectPtr object, const CTypeRef &type)
void Write(CObjectOStream &out, TConstObjectPtr object, const CTypeRef &type)
int32_t Int4
4-byte (32-bit) signed integer
uint32_t Uint4
4-byte (32-bit) unsigned integer
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
enum ENcbiOwnership EOwnership
Ownership relations between objects.
const struct ncbi::grid::netcache::search::fields::SIZE size
const struct ncbi::grid::netcache::search::fields::KEY key
static CSafeStatic< map< string, string > > Dictionary
Type trait classes for finding the correct BDB field type automagically.
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