Understanding the Event Mechanism

From InterBase
Jump to: navigation, search

Go Up to Working with Events


The InterBase event mechanism consists of four parts:

  • The InterBase engine that maintains an event queue and notifies applications when an event occurs.
  • Event parameter buffers set up by an application where it can receive notification of events.
  • An application that registers interest in one or more specified, named events and either waits for notification to occur (synchronous event), or passes a pointer to an AST function that handles notifications so that application processing can continue in the meantime (asynchronous event).
  • A trigger or stored procedure that notifies the engine that a specific, named event has occurred. Notification is called posting.

The InterBase event mechanism enables applications to respond to actions and database changes made by other, concurrently running applications without the need for those applications to communicate directly with one another, and without incurring the expense of CPU time required for periodic polling to determine if an event has occurred.

For information about creating triggers and stored procedures that post events, see the Data Definition Guide.

Topics