Berkeley DB: DbLock.put
Полезная информация

DbLock.put


import com.sleepycat.db.*;

public native void put(DbLockTab locktab) throws DbException;

Description

The DbLock.put method releases a lock, previously obtained from the specified DbLockTab using DbLockTab.get.

If a process dies while holding locks, those locks remain held and are never released. In this case, all processes should exit as quickly as possible, so that database recovery can be run.

Errors

If a fatal error occurs in Berkeley DB, the DbLock.put method may fail and throw a DbRunRecoveryException, at which point all subsequent database calls will also fail in the same way.

The DbLock.put method may fail and throw an exception for any of the errors specified for the following Berkeley DB and C library functions: abort(3), fcntl(3), fflush(3), fprintf(3), fsync(3), getpid(3), DbLockTab.detect, lseek(3), memcpy(3), memset(3), mmap(3), munmap(3), shmat(3), shmdt(3), strerror(3), vfprintf(3), vsnprintf(3), and write(3).

In addition, the DbLock.put method may fail and throw an exception encapsulating errno for the following conditions:

EACCES
An attempt was made to release lock held by another locker.

EINVAL
An invalid flag value or parameter was specified.

Class

DbLock

See Also

DbLock.put