DbMpoolFile::get API Ref

#include <db_cxx.h>

int DbMpoolFile::get(db_pgno_t *pgnoaddr, DbTxn *txnid, u_int32_t flags, void **pagep);


Description: DbMpoolFile::get

The DbMpoolFile::get method returns pages from the cache.

All pages returned by DbMpoolFile::get will be retained (that is, pinned), in the pool until a subsequent call to DbMpoolFile::put.

The returned page is size_t type aligned.

Fully or partially created pages have all their bytes set to a nul byte, unless the DbMpoolFile::set_clear_len method was called to specify other behavior before the file was opened.

The DbMpoolFile::get method will either return DB_PAGE_NOTFOUND or throw an exception that encapsulates DB_PAGE_NOTFOUND if the requested page does not exist and DB_MPOOL_CREATE was not set. Unless otherwise specified, the DbMpoolFile::get 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.

Parameters
flags pagep pgnoaddr txnid

Errors

The DbMpoolFile::get method may fail and throw DbException, encapsulating one of the following non-zero errors, or return one of the following non-zero errors:


EACCES

EAGAIN

EINVAL

DB_LOCK_DEADLOCK

If the cache is full, and no more pages will fit in the pool, the DbMpoolFile::get method will fail and either return ENOMEM or throw a DbMemoryException.



Class DbEnv, DbMpoolFile
See Also Memory Pools and Related Methods

APIRef

Copyright (c) 1996,2008 Oracle. All rights reserved.