Event Handling

The replication system is capable of reporting a great many events to which your code might need to respond. To track and respond to these events, you implement a callback whose function it is to respond to events that happen within the DB library.

Note that this callback is usable for events beyond those required for replication purposes. In this section, however, we only discuss some of the replication-specific events.

The callback is required to determine which event has been passed to it, and then take action depending on the event.

Some of the more commonly handled replication events are described below. For a complete list of events, see the DB_ENV->set_event_notify() method in the Berkeley DB C API Reference Guide.

For an example of how to use this callback, see Determining State