getLocks(locks: LockArray input; maxEntries: Integer);
The getLocks method of the System class populates the array specified in the locks parameter with transient instances of the current persistent object locks held by all the processes in the system.
The parameters of the getLocks method are listed in the following table.
Parameter | Specifies the … |
---|---|
locks | Locks array that is to be populated with the lock instances |
maxEntries | Maximum number of lock instances that are to be included in the array |
The following example shows the use of the getLocks method:
vars lock : Lock; lockArray : LockArray; begin create lockArray transient; system.getLocks(lockArray, 40); foreach lock in lockArray do //access the lock entry properties write lock.requestedBy.String; write lock.target.String; endforeach; epilog lockArray.purge; delete lockArray; end;