#include <db_cxx.h>
DbTxn::set_priority(u_int32_t priority);

The DbTxn::set_priority() method sets the priority for the transaction. The deadlock detector will reject lock requests from lower priority transactions before those from higher priority transactions.

By default, all transactions are created with a priority of 100.

The DbTxn::set_priority() method may be called at any time during the life of the transaction.

The DbTxn::set_priority() method either returns a non-zero error value or throws an exception that encapsulates a non-zero error value on failure, and returns 0 on success.



The priority parameter must be a value between 0 and 2^32-1.


The DbTxn::set_priority() method may fail and throw a DbException exception, encapsulating one of the following non-zero errors, or return one of the following non-zero errors:


An invalid flag value or parameter was specified.


DbEnv, DbTxn

See Also

Transaction Subsystem and Related Methods