2
<!--Copyright 1997-2002 by Sleepycat Software, Inc.-->
3
<!--All rights reserved.-->
4
<!--See the file LICENSE for redistribution information.-->
7
<title>Berkeley DB: DbEnv.set_tas_spins</title>
8
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
9
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
12
<a name="2"><!--meow--></a>
13
<table width="100%"><tr valign=top>
15
<h1>DbEnv.set_tas_spins</h1>
18
<a href="../api_java/c_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
23
import com.sleepycat.db.*;
26
DbEnv.set_tas_spins(u_int32_t tas_spins);
30
<p>Specify that test-and-set mutexes should spin <b>tas_spins</b> times
31
without blocking. The value defaults to 1 on uniprocessor systems and
32
to 50 times the number of processors on multiprocessor systems.
33
<p>The DbEnv.set_tas_spins method configures operations performed using the specified
34
<a href="../api_java/env_class.html">DbEnv</a> handle, not all operations performed on the underlying
36
<p>The DbEnv.set_tas_spins interface may be called at any time during the life of
38
<p>The DbEnv.set_tas_spins method throws an exception that encapsulates a non-zero error value on
40
<p>The database environment's test-and-set spin count may also be set using the environment's
41
<b>DB_CONFIG</b> file. The syntax of the entry in that file is a
42
single line with the string "set_tas_spins", one or more whitespace characters,
43
and the number of spins. Because the <b>DB_CONFIG</b> file is read when the database
44
environment is opened, it will silently overrule configuration done
47
<p>The DbEnv.set_tas_spins method may fail and throw an exception encapsulating a non-zero error for the following conditions:
49
<p><dt>EINVAL<dd>An invalid flag value or parameter was specified.
51
<p>The DbEnv.set_tas_spins method may fail and throw an exception for errors specified for other Berkeley DB and C library or system methods.
52
If a catastrophic error has occurred, the DbEnv.set_tas_spins method may fail and
53
throw a <a href="../api_java/runrec_class.html">DbRunRecoveryException</a>,
54
in which case all subsequent Berkeley DB calls will fail in the same way.
56
<a href="../api_java/env_class.html">DbEnv</a>
58
<a href="../api_java/env_list.html">Database Environments and Related Methods</a>
60
<table width="100%"><tr><td><br></td><td align=right>
61
<a href="../api_java/c_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
63
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>