If a lock cannot be granted because the requested lock conflicts with an
existing lock, return immediately instead of waiting for the lock to
become available.
The obj argument is an untyped byte string that specifies the
object to be locked or released.
A lock was requested that could not be immediately granted and the
flags parameter was set to DB_LOCK_NOWAIT.
Otherwise, the DbEnv.lock_get method throws an exception that encapsulates a non-zero error value on
failure.
Errors
The DbEnv.lock_get method may fail and throw an exception encapsulating a non-zero error for the following conditions:
EINVAL
An invalid flag value or parameter was specified.
ENOMEM
The maximum number of locks has been reached.
If the operation was selected to resolve a deadlock, the
DbEnv.lock_get method will fail and
throw a DbDeadlockException exception.
The DbEnv.lock_get method may fail and throw an exception for errors specified for other Berkeley DB and C library or system methods.
If a catastrophic error has occurred, the DbEnv.lock_get method may fail and throw
a DbRunRecoveryException, in which case all subsequent Berkeley DB calls
will fail in the same way.