import com.sleepycat.db.*;

       public DbLock()
            throws DbException;

       public DbLock(DbLock that)
            throws DbException;

       public DbLock(int lockid);
            throws DbException;

       public native void put(DbLockTab locktab)
            throws DbException;

       public native int get_lock_id()
            throws DbException;

       public native void set_lock_id(int lockid)
            throws DbException;


       The  DB  library  is  a  family of classes that provides a
       modular programming interface to transactions and  record-
       oriented  file  access.   The library includes support for
       transactions, locking, logging and file page  caching,  as
       well  as  various  indexed  access  methods.   Many of the
       classes (e.g., the file page  caching  class)  are  useful
       independent of the other DB classes, although some classes
       are explicitly based on other classes (e.g.,  transactions
       and  logging).   For  a  general  description  of  the  DB
       package, see db_intro(3).

       This manual page describes the  specific  details  of  the
       locking   interface.    The   DbLock   class  is  used  in
       conjunction with DbLockTab(3) to  provide  general-purpose
       locking.   While  designed  to  work  with  the  other  Db
       classes, these classes are also useful  for  more  general
       locking  purposes.  Locks can be shared between processes.
       In most cases, when  multiple  threads  or  processes  are
       using  locking,  the  deadlock  detector,  db_deadlock(1),
       should be run.

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

       The   DbLock.get_lock_id   method   gets   the  underlying
       representation of the lock id.  Direct manipulation of the
       underlying representation is not recommended.

       The   DbLock.set_lock_id   method   sets   the  underlying
       representation of the lock id.  Direct manipulation of the
       underlying  representation  is  not  recommended.  Rather,
       DbLockTab.get should be  used  to  initialize  locks  (see
       DbLockTab(3)),  and  the  copy  constructor can be used to
       create new DbLock objects from existing ones.


       The DbLock.put method may fail and throw a  DbException(3)
       for  any  of the errors specified for the following DB and
       library functions: DbLock.detect(3), fcntl(2), fflush(3),
       lseek(2), memcpy(3), memset(3), mmap(2), munmap(2),
       strerror(3), and write(2).

       In addition, the DbLock.put method may fail  and  throw  a
       DbException(3)  encapsulating  an  errno for the following

            An attempt was made to release lock held  by  another

            An invalid flag value or parameter was specified.


       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 db_recover can
       be run.


       db_archive(1), db_checkpoint(1), db_deadlock(1), db_dump(1),
       db_load(1), db_recover(1), db_stat(1), db_intro(3),
       db_internal(3), db_thread(3), Db(3), Dbc(3), DbEnv(3),
       DbException(3), DbInfo(3), DbLock(3), DbLockTab(3), DbLog(3),
       DbLsn(3), DbMpool(3), Dbt(3), DbTxn(3), DbTxnMgr(3)

Man(1) output converted with man2html