AS.lockEvent()
Signature
Object lockEvent(String destinationUri, SimpleEvent event, Object... options)
Domain
ACTION, CONDITION, QUERY, BUI
Description
Locks the event associated with a key event value. If lock operation is a success, matching tuple is returned (or null if no match is found), and lock must be released subsequently. If lock operation fails (e.g. due to specified timeout) then an exception is thrown with 'LOCKED (entry_lock_timeout)' message, which must be handled by the caller.
Parameters
Name | Type | Description |
destinationUri | String | AS Destination URI |
event | SimpleEvent | The event to be locked |
options | Object | Optional lock wait time in milliseconds |
Returns
Type | Description |
SimpleEvent or Object[N][2] | The locked event |