head 1.2; access; symbols RPM_4_2_1:1.1.1.5 RPM_4_2:1.1.1.5 RPM_4_1_1:1.1.1.5 RPM_4_1:1.1.1.4 RPM_4_0_5:1.1.1.3 RPM_4_0_4:1.1.1.2 RPM_4_0_3:1.1.1.1 RPM:1.1.1; locks; strict; comment @# @; 1.2 date 2008.01.02.09.53.59; author rse; state dead; branches; next 1.1; commitid z4cpSiAhOCXk5PLs; 1.1 date 2001.07.23.20.45.37; author rse; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2001.07.23.20.45.37; author rse; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 2002.01.08.00.30.10; author rse; state Exp; branches; next 1.1.1.3; 1.1.1.3 date 2003.01.18.13.49.00; author rse; state Exp; branches; next 1.1.1.4; 1.1.1.4 date 2001.12.06.00.08.12; author rse; state Exp; branches; next 1.1.1.5; 1.1.1.5 date 2003.01.18.14.04.59; author rse; state Exp; branches; next ; desc @@ 1.2 log @remove the ancient RPM 4.2.1 source tree copy @ text @
DbEnv.lock_get |
![]() ![]() |
import com.sleepycat.db.*;public DbLock lock_get(int locker, int flags, Dbt obj, int lock_mode) throws DbException;
The DbEnv.lock_get method acquires a lock from the lock table, returning information about it in a DbLock object.
The locker argument specified to DbEnv.lock_get is an unsigned 32-bit integer quantity. It represents the entity requesting or releasing the lock.
The flags value must be set to 0 or the following value:
The obj argument is an untyped byte string that specifies the object to be locked or released. Applications using the locking subsystem directly while also doing locking via the Berkeley DB access methods must take care not to inadvertently lock objects that happen to be equal to the unique file IDs used to lock files. See Access method locking conventions for more information.
The mode argument is used as an index into the environment's lock conflict matrix. When using the default lock conflict matrix, mode must be set to one of the following values:
See DbEnv.set_lk_conflicts and Standard Lock Modes for more information on the lock conflict matrix.
If a lock is requested that cannot be immediately granted, and the flags parameter was set to Db.DB_LOCK_NOWAIT, the DbEnv.lock_get method may throw an exception encapsulating Db.DB_LOCK_NOTGRANTED.
Otherwise, the DbEnv.lock_get method throws an exception that encapsulates a non-zero error value on failure.
The DbEnv.lock_get method may fail and throw an exception encapsulating a non-zero error for the following conditions:
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.
![]() ![]() |
Copyright Sleepycat Software
@
1.1
log
@Initial revision
@
text
@d1 1
a1 1
@
1.1.1.1
log
@Import: RPM 4.0.3
@
text
@@
1.1.1.2
log
@Import: RPM 4.0.4
@
text
@d1 1
a1 1
d17 1
a17 1
d24 3
a26 2
public DbLock lock_get(int locker, int flags, Dbt obj, int lock_mode)
throws DbException;
d87 1
d94 1
a94 2
DbEnv.lock_id_free,
DbEnv.lock_put,
d99 1
a99 1
@
1.1.1.3
log
@Import: RPM 4.0.5
@
text
@d1 2
a2 2
a3 1
d38 2
a39 3
existing lock,
throw a DbLockNotGrantedException immediately instead of waiting
for the lock to become available.
d52 5
a56 5
Otherwise, the DbEnv.lock_get method throws an exception that encapsulates a non-zero error value on d78 3 a80 3 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. d82 1 a82 1 DbEnv, DbLock d84 12 a95 1 Locking Subsystem and Related Methods @ 1.1.1.4 log @Import: RPM 4.1 @ text @d1 2 a2 2 d4 1 d39 3 a41 2 existing lock, return immediately instead of waiting for the lock to become available. d54 5 a58 5
If a lock is requested that cannot be immediately granted, and the flags parameter was set to Db.DB_LOCK_NOWAIT, the DbEnv.lock_get method may throw an exception encapsulating Db.DB_LOCK_NOTGRANTED.
Otherwise, the DbEnv.lock_get method throws an exception that encapsulates a non-zero error value on d76 3 a78 3 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. d80 1 a80 1 DbEnv, DbLock d82 1 a82 12 DbEnv.set_lk_conflicts, DbEnv.set_lk_detect, DbEnv.set_lk_max_lockers, DbEnv.set_lk_max_locks, DbEnv.set_lk_max_objects, DbEnv.lock_detect, DbEnv.lock_get, DbEnv.lock_id, DbEnv.lock_id_free, DbEnv.lock_put, and DbEnv.lock_stat. @ 1.1.1.5 log @Import: RPM 4.1.1 @ text @d1 2 a2 2 a3 1 d38 2 a39 3 existing lock, throw a DbLockNotGrantedException immediately instead of waiting for the lock to become available. d52 5 a56 5
Otherwise, the DbEnv.lock_get method throws an exception that encapsulates a non-zero error value on d78 3 a80 3 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. d82 1 a82 1 DbEnv, DbLock d84 12 a95 1 Locking Subsystem and Related Methods @