kind

Type: Character[1]

The read-only kind property of the Lock class is set to the kind of node lock for stable objects. (For details, see "Stable Objects" under "Cache Concurrency", in Chapter 6 of the JADE Developer’s Reference.)

The character values correspond to the Lock class constants listed in the following table.

Constant Character Value Description
Kind_Local '01' Applies to stable objects and represents a shared, transient duration lock that has an associated node lock (Kind_Node) entry in the database server lock tables. There is no individual lock entry for the process in the database server lock tables (unless the process is a server application).
Kind_Node '02' Applies to stable objects and represents a shared, transient duration lock that can be held by one or more processes on the node associated with the node lock. The associated background process of the node is used as the locking process. A node lock is released when an exclusive lock request is received or the object is removed from the node’s cache and there are no processes on the associated node that have the object locked with local locks.
Kind_Normal '00' Represents a lock held by a process. It is released when the process unlocks the object.

Kind_Local locks are present only on the local node on which the lock request was issued.

You can use the lockedBy property to determine the node associated with a Kind_Node, as it contains a reference to the background process of the associated node.

The code fragment in the following example shows the use of the kind property.

foreach lock in locksArray do
    if lock.kind = lock.Kind_Node then
        write "Exclusive lock request pending";
        write lock.lockedBy.String;
    endif;
endforeach;