|Modifier and Type||Method and Description|
Tells whether lock requests should time out immediately if the lock cannot be granted at once, even if
public static final NoLockOwner INSTANCE
public boolean noWait()
C_LockFactory.TIMED_WAITwas specified in the lock request.
Normally, this method should return
false, but in some very
special cases it could be appropriate to return
example is when a stored prepared statement (SPS) is compiled and stored
in a system table. In order to prevent exclusive locks in the system
table from being held until the transaction that triggered the
compilation is finished, the SPS will be compiled in a nested
transaction that is committed and releases all locks upon completion.
There is however a risk that the transaction that triggered the
compilation is holding locks that the nested transaction needs, in
which case the nested transaction will time out. The timeout will be
detected by the calling code, and the operation will be retried in the
parent transaction. To avoid long waits in the cases where the nested
transaction runs into a lock conflict with its parent, the nested
LockOwner instance could return
thereby making it possible to detect lock conflicts instantly.