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

NameTypeDescription
destinationUriStringAS Destination URI
eventSimpleEventThe event to be locked
optionsObjectOptional lock wait time in milliseconds

Returns

TypeDescription
SimpleEvent or Object[N][2]The locked event