DB_ENV->get_timeout()

#include <db.h>

int
DB_ENV->get_timeout(DB_ENV *dbenv, db_timeout_t *timeoutp, 
    u_int32_t flag);  

The DB_ENV->get_timeout() method returns a value, in microseconds, representing either lock or transaction timeouts. These values are set using the DB_ENV->set_timeout() method.

The DB_ENV->get_timeout() method may be called at any time during the life of the application.

The DB_ENV->get_timeout() method returns a non-zero error value on failure and 0 on success.

Parameters

flag

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

  • DB_SET_LOCK_TIMEOUT

    Return the timeout value for locks in this database environment.

  • DB_SET_TXN_TIMEOUT

    Return the timeout value for transactions in this database environment.

timeoutp

The timeoutp parameter references memory into which the timeout value of the specified flag parameter is copied.

Class

DB_ENV

See Also

Database Environments and Related Methods, DB_ENV->set_timeout()