DbMpoolFile |
#include <db_cxx.h>class DbMpoolFile { public: DB_MPOOLFILE *DbMpoolFile::get_DB_MPOOLFILE(); const DB_MPOOLFILE *DbMpoolFile::get_const_DB_MPOOLFILE() const; ... };
The memory pool interfaces for the Berkeley DB database environment are methods of the DbEnv handle. The DbEnv memory pool methods and the DbMpoolFile class provide general-purpose, page-oriented buffer management of files. Although designed to work with the other Db classes, they are also useful for more general purposes. The memory pools are referred to in this document as simply pools.
Pools may be shared between processes. Pools are usually filled by pages from one or more files. Pages in the pool are replaced in LRU (least-recently-used) order, with each new page replacing the page that has been unused the longest. Pages retrieved from the pool using DbMpoolFile::get are pinned in the pool until they are returned to the control of the buffer pool using the DbMpoolFile::put method.
The DbMpoolFile object is the handle for a file in the memory pool. The handle is not free-threaded. Once the DbMpoolFile::close method is called, the handle may not be accessed again, regardless of that method's return.
Each DbMpoolFile object has an associated DB_MPOOLFILE structure, which is used by the underlying implementation of Berkeley DB and its C-language API. The DbMpoolFile::get_DB_MPOOLFILE method returns a pointer to this struct. Given a const DbMpoolFile object, DbMpoolFile::get_const_DB_MPOOLFILE returns a const pointer to the same struct.
These methods may be useful for Berkeley DB applications including both C and C++ language software. It should not be necessary to use these calls in a purely C++ application.
Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.