Berkeley DB Reference Guide: Programmer Notes
Description: Berkeley DB: An embedded database programmatic toolkit.
Keywords: embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++

### Berkeley DB Reference Guide: Programmer Notes |

# Run-time configuration

There are a few interfaces that support run-time configuration of Berkeley DB. First is a group of interfaces that allow applications to intercept Berkeley DB requests for underlying library or system call functionality:

>     DBENV->set_func_close
>     DBENV->set_func_dirfree
>     DBENV->set_func_dirlist
>     DBENV->set_func_exists
>     DBENV->set_func_free
>     DBENV->set_func_fsync
>     DBENV->set_func_ioinfo
>     DBENV->set_func_malloc
>     DBENV->set_func_map
>     DBENV->set_func_open
>     DBENV->set_func_read
>     DBENV->set_func_realloc
>     DBENV->set_func_seek
>     DBENV->set_func_sleep
>     DBENV->set_func_unlink
>     DBENV->set_func_unmap
>     DBENV->set_func_write
>     DBENV->set_func_yield

These interfaces are only available from the Berkeley DB C language API.

In addition, there are a few interfaces that allow applications to re-configure, on an application-wide or environment wide basis, Berkeley DB behaviors.

>     DBENV->set_mutexlocks
>     DBENV->set_pageyield
>     DBENV->set_region_init
>     DBENV->set_tas_spins

These interfaces are only available from the Berkeley DB C and C++ language APIs.

A not-uncommon problem for applications is the new API in Solaris 2.6 for manipulating large files. As this API was not part of Solaris 2.5, it is difficult to create a single binary that takes advantage of the large file functionality in Solaris 2.6 but which still runs on Solaris 2.5. Example code that supports this is included.

Copyright Sleepycat Software