head 1.2; access; symbols RPM_4_2_1:1.1.1.4 RPM_4_2:1.1.1.4 RPM_4_1_1:1.1.1.4 RPM_4_1:1.1.1.3 RPM_4_0_5:1.1.1.2 RPM_4_0_4:1.1.1.1 RPM:1.1.1; locks; strict; comment @# @; 1.2 date 2008.01.02.09.53.00; author rse; state dead; branches; next 1.1; commitid z4cpSiAhOCXk5PLs; 1.1 date 2002.01.08.00.30.09; author rse; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2002.01.08.00.30.09; author rse; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 2003.01.18.13.48.58; author rse; state Exp; branches; next 1.1.1.3; 1.1.1.3 date 2002.01.17.20.11.42; author rse; state Exp; branches; next 1.1.1.4; 1.1.1.4 date 2003.01.18.14.04.57; author rse; state Exp; branches; next ; desc @@ 1.2 log @remove the ancient RPM 4.2.1 source tree copy @ text @ Berkeley DB: DB_TXN->set_timeout

DB_TXN->set_timeout

APIRef

#include <db.h>

u_int32_t DB_TXN->set_timeout(DB_TXN *tid, db_timeout_t timeout, u_int32_t flags);

Description

The DB_TXN->set_timeout function sets timeout values for locks or transactions for the specified transaction. The timeout value is currently specified as an unsigned 32-bit number of microseconds, limiting the maximum timeout to roughly 71 minutes.

The flags value must be set to one of the following values:

DB_SET_LOCK_TIMEOUT
Set the timeout value for locks in this transaction.

DB_SET_TXN_TIMEOUT
Set the timeout value for this transaction.

Timeouts are checked whenever a thread of control blocks on a lock or when deadlock detection is performed. (In the case of DB_SET_LOCK_TIMEOUT, the lock is one requested explicitly through the Lock subsystem interfaces. In the case of DB_SET_TXN_TIMEOUT, the lock is one requested on behalf of a transaction. In either case, it may be a lock requested by the database access methods underlying the application.) As timeouts are only checked when the lock request first blocks or when deadlock detection is performed, the accuracy of the timeout depends on how often deadlock detection is performed.

Timeout values may be specified for the database environment as a whole. See DB_ENV->set_timeout and for more information.

The DB_TXN->set_timeout function returns a non-zero error value on failure and 0 on success.

Errors

The DB_TXN->set_timeout function may fail and return a non-zero error for the following conditions:

EINVAL
An invalid flag value or parameter was specified.

The DB_TXN->set_timeout function may fail and return a non-zero error for errors specified for other Berkeley DB and C library or system functions. If a catastrophic error has occurred, the DB_TXN->set_timeout function may fail and return DB_RUNRECOVERY, in which case all subsequent Berkeley DB calls will fail in the same way.

See Also

DB_ENV->set_tx_max, DB_ENV->set_tx_recover, DB_ENV->set_tx_timestamp, DB_TXN->abort, DB_ENV->txn_begin, DB_ENV->txn_checkpoint, DB_TXN->commit, DB_TXN->discard, DB_TXN->id, DB_TXN->prepare, DB_ENV->txn_recover, DB_TXN->set_timeout and DB_ENV->txn_stat.

APIRef

Copyright Sleepycat Software @ 1.1 log @Initial revision @ text @@ 1.1.1.1 log @Import: RPM 4.0.4 @ text @@ 1.1.1.2 log @Import: RPM 4.0.5 @ text @d1 2 a2 2 a3 1 d28 1 a28 1

The DB_TXN->set_timeout method sets timeout values for locks or d49 1 a49 6

The DB_TXN->set_timeout method configures operations performed on the underlying transaction, not only operations performed using the specified DB_TXN handle.

The DB_TXN->set_timeout interface may be called at any time during the life of the application.

The DB_TXN->set_timeout method returns a non-zero error value on failure and 0 on success. d51 1 a51 1

The DB_TXN->set_timeout method may fail and return a non-zero error for the following conditions: d55 4 a58 6

The DB_TXN->set_timeout method may fail and return a non-zero error for errors specified for other Berkeley DB and C library or system functions. If a catastrophic error has occurred, the DB_TXN->set_timeout method may fail and return DB_RUNRECOVERY, in which case all subsequent Berkeley DB calls will fail in the same way.

Class

DB_ENV, DB_TXN d60 14 a73 1 Transaction Subsystem and Related Methods @ 1.1.1.3 log @Import: RPM 4.1 @ text @d1 2 a2 2 d4 1 d29 1 a29 1

The DB_TXN->set_timeout function sets timeout values for locks or d50 6 a55 1

The DB_TXN->set_timeout function returns a non-zero error value on failure and 0 on success. d57 1 a57 1

The DB_TXN->set_timeout function may fail and return a non-zero error for the following conditions: d61 6 a66 4

The DB_TXN->set_timeout function may fail and return a non-zero error for errors specified for other Berkeley DB and C library or system functions. If a catastrophic error has occurred, the DB_TXN->set_timeout function may fail and return DB_RUNRECOVERY, in which case all subsequent Berkeley DB calls will fail in the same way. d68 1 a68 14 DB_ENV->set_tx_max, DB_ENV->set_tx_recover, DB_ENV->set_tx_timestamp, DB_TXN->abort, DB_ENV->txn_begin, DB_ENV->txn_checkpoint, DB_TXN->commit, DB_TXN->discard, DB_TXN->id, DB_TXN->prepare, DB_ENV->txn_recover, DB_TXN->set_timeout and DB_ENV->txn_stat. @ 1.1.1.4 log @Import: RPM 4.1.1 @ text @d1 2 a2 2 a3 1 d28 1 a28 1

The DB_TXN->set_timeout method sets timeout values for locks or d49 1 a49 6

The DB_TXN->set_timeout method configures operations performed on the underlying transaction, not only operations performed using the specified DB_TXN handle.

The DB_TXN->set_timeout interface may be called at any time during the life of the application.

The DB_TXN->set_timeout method returns a non-zero error value on failure and 0 on success. d51 1 a51 1

The DB_TXN->set_timeout method may fail and return a non-zero error for the following conditions: d55 4 a58 6

The DB_TXN->set_timeout method may fail and return a non-zero error for errors specified for other Berkeley DB and C library or system functions. If a catastrophic error has occurred, the DB_TXN->set_timeout method may fail and return DB_RUNRECOVERY, in which case all subsequent Berkeley DB calls will fail in the same way.

Class

DB_ENV, DB_TXN d60 14 a73 1 Transaction Subsystem and Related Methods @