### DbMpoolFile::set_flags |

`

###

    #include <db_cxx.h>

    int
    DbMpoolFile::set_flags(u_int32_t flags, bool onoff);

    int
    DbMpoolFile::get_flags(u_int32_t *flagsp);

### Description: DbMpoolFile::set_flags

Configure a file in the cache.

To set the flags for a particular database, call the DbMpoolFile::set_flags method using the DbMpoolFile handle stored in the mpf field of the Db handle.

The DbMpoolFile::set_flags 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
  The flags parameter must be set by bitwise inclusively OR'ing together one or more of the following values:
  DB_MPOOL_NOFILE
    If set, no backing temporary file will be opened for in-memory databases, even if they expand to fill the entire cache. Attempts to create new file pages after the cache has been filled will fail.

    The DB_MPOOL_NOFILE flag may be used to configure Berkeley DB at any time during the life of the application.

  DB_MPOOL_UNLINK
    If set, remove the file when the last reference to it is closed.

    The DB_MPOOL_UNLINK flag may be used to configure Berkeley DB at any time during the life of the application.

onoff
  If onoff is false, the specified flags are cleared; otherwise they are set.

### Description: DbMpoolFile::get_flags

The DbMpoolFile::get_flags method returns the flags.

The DbMpoolFile::get_flags method may be called at any time during the life of the application.

The DbMpoolFile::get_flags 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

flagsp
  The DbMpoolFile::get_flags method returns the flags in flagsp.

### Class

DbEnv, DbMpoolFile

### See Also

Memory Pools and Related Methods`

Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.