DB_MPOOLFILE->put()
#include <db.h>
int
DB_MPOOLFILE->put(DB_MPOOLFILE *mpf,
void *pgaddr, DB_CACHE_PRIORITY priority, u_int32_t flags); The DB_MPOOLFILE->put() method returns a reference to a page in the cache, setting the priority of the page as specified by the priority parameter.
The DB_MPOOLFILE->put() method returns a non-zero error value on failure and 0 on success.
Parameters
pgaddr
The pgaddr parameter is the address of the page to be returned to the cache. The pgaddr parameter must be a value previously returned by the DB_MPOOLFILE->get() method.
priority
Set the page's priority as follows:
DB_PRIORITY_UNCHANGEDThe priority is unchanged.
DB_PRIORITY_VERY_LOWThe lowest priority: pages are the most likely to be discarded.
DB_PRIORITY_LOWThe next lowest priority.
DB_PRIORITY_DEFAULTThe default priority.
DB_PRIORITY_HIGHThe next highest priority.
DB_PRIORITY_VERY_HIGHThe highest priority: pages are the least likely to be discarded.
flags
The flags parameter is currently unused, and must be set to 0.
Errors
The DB_MPOOLFILE->put() method may fail and return one of the following non-zero errors:
EINVAL
An invalid flag value or parameter was specified.