DbEnv::memp_sync |
#include <db_cxx.h>int DbEnv::memp_sync(DbLsn *lsn);
The DbEnv::memp_sync method flushes modified pages in the cache to their backing files.
Pages in the pool that cannot be immediately written back to disk (for example, pages that are currently in use by another thread of control) are waited for and written to disk as soon as it is possible to do so.
To support the DbEnv::memp_sync functionality, it is necessary that the pool functions know the location of the log sequence number on the page for each file type. This location should be specified when the file is opened using the DbMpoolFile::set_lsn_offset method. It is not required that the log sequence number be aligned on the page in any way.
The DbEnv::memp_sync method either returns a non-zero error value or throws an exception that encapsulates a non-zero error value on failure, and returns 0 on success.
All modified pages with a a log sequence number (DbLsn) less than the lsn parameter are written to disk. If lsn is NULL, all modified pages in the pool are written to disk.
The DbEnv::memp_sync method may fail and throw DbException, encapsulating one of the following non-zero errors, or return one of the following non-zero errors:
Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.