<!--$Id: txn_set_timeout.so,v 10.22 2006/12/16 13:52:36 bostic Exp $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB_TXN->set_timeout</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB_TXN->set_timeout</b>
</td>
<td align=right>
<a href="../../db4-devel-4.7.25/api_c/api_core.html"><img src="../../db4-devel-4.7.25/images/api.gif" alt="API"></a>
<a href="../../db4-devel-4.7.25/ref/toc.html"><img src="../../db4-devel-4.7.25/images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include <db.h>
<p>
u_int32_t
DB_TXN->set_timeout(DB_TXN *tid, db_timeout_t timeout, u_int32_t flags);
</pre></b>
<hr size=1 noshade>
<b>Description: DB_TXN->set_timeout</b>
<p>The DB_TXN->set_timeout method sets timeout values for locks or
transactions for the specified transaction.</p>
<p>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 timeout is for any single lock request.
In the case of DB_SET_TXN_TIMEOUT, the timeout is for the life
of the transaction. 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.</p>
<p>Timeout values may be specified for the database environment as a whole.
See <a href="../../db4-devel-4.7.25/api_c/env_set_timeout.html">DB_ENV->set_timeout</a> and for more information.</p>
<p>The DB_TXN->set_timeout method configures operations performed on the underlying
transaction, not only operations performed using the specified
<a href="../../db4-devel-4.7.25/api_c/txn_class.html">DB_TXN</a> handle.</p>
<p>The DB_TXN->set_timeout method may be called at any time during the life of the
application.</p>
<p>The DB_TXN->set_timeout method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
<b>flags</b><ul compact><li>The <b>flags</b> parameter must be set to one of the following values:
<br>
<b><a name="DB_SET_LOCK_TIMEOUT">DB_SET_LOCK_TIMEOUT</a></b><ul compact><li>Set the timeout value for locks in this transaction.</ul>
<b><a name="DB_SET_TXN_TIMEOUT">DB_SET_TXN_TIMEOUT</a></b><ul compact><li>Set the timeout value for this transaction.</ul>
<br></ul>
<b>timeout</b><ul compact><li>The <b>timeout</b> parameter is specified as an unsigned 32-bit number
of microseconds, limiting the maximum timeout to roughly 71 minutes. A
value of 0 disables timeouts for the transaction.</ul>
<br>
<br><b>Errors</b>
<p>The DB_TXN->set_timeout method
may fail and return one of the following non-zero errors:</p>
<br>
<b>EINVAL</b><ul compact><li>An
invalid flag value or parameter was specified.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../../db4-devel-4.7.25/api_c/env_class.html">DB_ENV</a>, <a href="../../db4-devel-4.7.25/api_c/txn_class.html">DB_TXN</a>
<br><b>See Also</b>
<a href="../../db4-devel-4.7.25/api_c/txn_list.html">Transaction Subsystem and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../../db4-devel-4.7.25/api_c/api_core.html"><img src="../../db4-devel-4.7.25/images/api.gif" alt="API"></a><a href="../../db4-devel-4.7.25/ref/toc.html"><img src="../../db4-devel-4.7.25/images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>
Copyright 2K16 - 2K18 Indonesian Hacker Rulez