Lock and Unlock Functions
TIBCO BusinessEvents provides lock and unlock functions.
Lock Function
Cluster.DataGrid.Lock(String key, long timeout, boolean LocalOnly)
If you want to acquire the lock only within the agent, set LocalOnly to true. Set the LocalOnly parameter to false to acquire a cluster wide lock. For example if you are only concerned about the preprocessor threads in one agent, you can use a local lock. The worker thread that calls the lock() function is the only thread that gets blocked.
Unlock Function
All the locks acquired during event processing are released automatically after all post RTC actions, cache operations (and database writes in the case of cache-aside mode) are done.
The format of the unlock function is as follows:
Cluster.DataGrid.UnLock(String key, boolean LocalOnly)
You can use the corresponding UnLock() function for cases where the automatic unlocking does not meet your needs.