The type parameter specifies the type of the lock operation. The types of lock that can be specified in the type parameter are listed in the following table.
Constant | Value | Description |
---|---|---|
UNLOCKED | 0 | Result of a jomGetObject operation |
SHARED_LOCK | 1 | Shared lock |
RESERVED_LOCK | 2 | Reserve lock |
EXCLUSIVE_LOCK | 3 | Exclusive lock |
More than one shared lock can coexist for the object at any time but only one exclusive lock is allowed. Additionally, a reserve lock can coexist with any number of shared locks but is incompatible with another reserve lock or with an exclusive lock.
If the object to be locked is already locked in an incompatible manner by another process, a lock exception may be raised. For details, see the invokeHandler parameter, later in this section.