Berkeley DB Reference Version 5.3.33

DB_ENV->set_event_notify()

#include <db.h>

int
DB_ENV->set_event_notify(DB_ENV *dbenv,
    void (*db_event_fcn)(DB_ENV *dbenv, u_int32_t event, 
    void *event_info));  

The DB_ENV->set_event_notify() method configures a callback function which is called to notify the process of specific Berkeley DB events.

Note

Berkeley DB is not re-entrant. Callback functions should not attempt to make library calls (for example, to release locks or close open handles). Re-entering Berkeley DB is not guaranteed to work correctly, and the results are undefined.

The DB_ENV->set_event_notify() method configures operations performed using the specified DB_ENV handle, not all operations performed on the underlying database environment.

The DB_ENV->set_event_notify() method may be called at any time during the life of the application.

The DB_ENV->set_event_notify() method returns a non-zero error value on failure and 0 on success.

Parameters

db_event_fcn

The db_event_fcn parameter is the application's event notification function. The function takes three parameters:

Class

DB_ENV

See Also

Database Environments and Related Methods