sdeCauseEvent

sdeCauseEvent(eventType: Integer;
              immediate: Boolean;
              userInfo:  Any);

The sdeCauseEvent method of the Object class is used for inter-system event notification in a Synchronized Database Environment (SDE).

Calling the sdeCauseEvent method on a secondary database system notifies subscribers of a user event on that secondary system as well as on the primary database server.

This method combines the actions of the Object class causeEvent and sdsCauseEvent methods, in that subscribers are notified of user events on the local system as well as on SDS secondary or primary systems, where applicable. For example, when used by an application running in an SDS primary system, the sdeCauseEvent method notifies subscribers of user events on the primary database as well as on all attached secondary databases.

In contrast, the causeEvent method would notify subscribers of a user event only on the primary database system and the sdsCauseEvent method only on the secondary database systems.

The parameters for the sdeCauseEvent method are listed in the following table.

Parameter Description
eventType Integer in the range User_Base_Event through User_Max_Event that represents the event being caused.
immediate Boolean value specifying the timing of the event; false indicates that notifications occur at the end of transaction and true indicates that the notification is sent immediately. If the client is not within a begin/commit transaction cycle and this parameter is set to false, the notification waits for the next commit on that client.
  On a primary database, subscribers are notified only on the secondaries if the target object is persistent, the value of the immediate parameter is false, and the process is currently in transaction state. On a secondary database system, subscribers are notified on the primary database system only if the target object is persistent. The value of the immediate parameter is immaterial. However, subscribers are always notified immediately on the primary database system, even when the value of the immediate parameter is false, to defer notification on the secondary system.
userInfo A value of any primitive type value (for example, a String or an Integer) or persistent object reference that is passed to the userNotification or userNotify event handlers when the event is notified. (Notifications containing string and binary data of up to 48K bytes can be sent across the network.)

The following table lists the UserEvents category global constants for notification events.

Global Constant Integer Value
User_Base_Event 16
User_Max_Event Max_Integer (#7FFFFFFF, equates to 2147483647)

You can define your own constants to represent event types in the range User_Base_Event through Max_Integer.

The actions of the sdeCauseEvent method are summarized in the following table, which lists the contexts in which the event is caused.

Database Role Transient Target Object Persistent Target Object, Immediate Persistent Target Object, Deferred, in Transaction State Persistent Target Object, Deferred, not in Transaction State
Undefined Process only Local system Local system Local system
Primary Process only Primary system Primary system and secondary Primary system only systems
Secondary Process only Primary system and secondary system Secondary system and immediately on the primary system Secondary system and immediately on the primary system