Product Information > JADE Encyclopaedia of Classes – Volume 2 > Chapter 1 - System Classes > getObjectLockProcesses

getObjectLockProcesses

getObjectLockProcesses(locktarget: Object;
                       processes:  ProcessDict input;
                       maxEntries: Integer);

The getObjectLockProcesses method of the System class populates the dictionary specified in the processes parameter with all processes that have locks on the object referenced by the locktarget parameter.

The parameters of the getObjectLockProcesses method are listed in the following table.

Parameter Description
locktarget Specifies the object whose locks are to be obtained.
processes Specifies the process dictionary that is to be populated with processes that have locks on the object referenced by the locktarget parameter.
maxEntries Specifies the maximum number of object lock process instances to include in the dictionary.

This method is not available on a Compact JADE node, where it would result in a 1068 - Feature not available exception.

The following example shows the use of the getObjectLockProcesses method.

writeWhoHasTheLocks(target: Object);
vars
    process     : Process;
    processDict : ProcessDict;
begin
    create processDict transient;
    system.getObjectLockProcesses(target, processDict, 10);
    foreach process in processDict do
        write process.userCode;
    endforeach;
epilog
    delete processDict;
end;