import com.sleepycat.db.*;public void detect(int flags, int atype) throws DbException;
The DbLockTab.detect method runs one iteration of the deadlock detector. The deadlock detector traverses the lock table, and for each deadlock it finds, marks one of the participating transactions for abort.
The flags value is specified by logically OR'ing together one or more of the following values:
The atype parameter specifies which transaction to abort in the case of deadlock. It must be set to one of values described for the lk_detect field of the DbEnv object.
The DbLockTab.detect method is the underlying method used by the db_deadlock utility. See the db_deadlock utility source code for an example of using DbLockTab.detect in a POSIX 1003.1 environment.
The DbLockTab.detect method throws an exception that encapsulates an errno on failure.
The DbLockTab.detect 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), free(3), fsync(3), getpid(3), lseek(3), malloc(3), memcpy(3), memset(3), mmap(3), munmap(3), shmat(3), shmdt(3), sprintf(3), strerror(3), vfprintf(3), vsnprintf(3), and write(3).