Files
Yasuhiro KIMURA 9678929700 Update to 18.1.40
2020-07-24 01:10:28 +09:00

2504 lines
139 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (11.0.7) on Mon Jun 01 06:40:53 PDT 2020 -->
<title>Database (Oracle - Berkeley DB Java API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="date" content="2020-06-01">
<link rel="stylesheet" type="text/css" href="../../../style.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
<script type="text/javascript" src="../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../jquery/jquery-3.4.1.js"></script>
<script type="text/javascript" src="../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Database (Oracle - Berkeley DB Java API)";
}
}
catch(err) {
}
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":9,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":9,"i31":10,"i32":9,"i33":10,"i34":10,"i35":10,"i36":9,"i37":9,"i38":9,"i39":10,"i40":10,"i41":9,"i42":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Database.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><b>Berkeley DB</b><br><font size="-1"> version 18.1.40</font></div>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">com.sleepycat.db</a></div>
<h2 title="Class Database" class="title">Class Database</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>com.sleepycat.db.Database</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><code><a href="SecondaryDatabase.html" title="class in com.sleepycat.db">SecondaryDatabase</a></code></dd>
</dl>
<hr>
<pre>public class <span class="typeNameLabel">Database</span>
extends java.lang.Object</pre>
<div class="block">Creates a database handle for a single Berkeley DB database.
A Berkeley DB database provides a mechanism for organizing key-data pairs
of information. From the perspective of some database systems, a Berkeley DB database
could be thought of as a single table within a larger database.
<p>
For most database activities, you must open the handle using the
open method. When you are done
with them, handles must be closed using the close method.
<p>
It is possible to create databases such that they are organized within a
database environment. Environments are optional for simple Berkeley DB applications
that do not use transactions, recovery, replication or any other advanced features.
For simple Berkeley DB applications, environments still offer some advantages.
For example, they provide some organizational benefits on-disk (all databases
are located on disk relative to the environment). Also, if you are using
multiple databases, then environments allow your databases to share a
common in-memory cache, which makes for more efficient usage of your hardware's resources.
See <a href="Environment.html" title="class in com.sleepycat.db"><code>Environment</code></a>
for information on using database environments.
<p>
Database handles are free-threaded unless opened in an environment
that is not free-threaded.
<p>
Database attributes are specified in the <a href="DatabaseConfig.html" title="class in com.sleepycat.db"><code>DatabaseConfig</code></a> class.
<p>
To open an existing database with default attributes:
<blockquote><pre>
Environment env = new Environment(home, null);
Database myDatabase = env.openDatabase(null, "mydatabase", null);
</pre></blockquote>
To create a transactional database that supports duplicates:
<blockquote><pre>
DatabaseConfig dbConfig = new DatabaseConfig();
dbConfig.setTransactional(true);
dbConfig.setAllowCreate(true);
dbConfig.setSortedDuplicates(true);
Database newlyCreateDb = env.openDatabase(txn, "mydatabase", dbConfig);
</pre></blockquote></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#Database-java.lang.String-java.lang.String-com.sleepycat.db.DatabaseConfig-">Database</a></span>&#8203;(java.lang.String&nbsp;filename,
java.lang.String&nbsp;databaseName,
<a href="DatabaseConfig.html" title="class in com.sleepycat.db">DatabaseConfig</a>&nbsp;config)</code></th>
<td class="colLast">
<div class="block">Open a database.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#append-com.sleepycat.db.Transaction-com.sleepycat.db.DatabaseEntry-com.sleepycat.db.DatabaseEntry-">append</a></span>&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;key,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;data)</code></th>
<td class="colLast">
<div class="block">
Append the key/data pair to the end of the database.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#close--">close</a></span>()</code></th>
<td class="colLast">
<div class="block">Flush any cached database information to disk, close any open cursors,
free allocated resources, close underlying files, and discard the database handle.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#close-boolean-">close</a></span>&#8203;(boolean&nbsp;noSync)</code></th>
<td class="colLast">
<div class="block">Flush any cached database information to disk, close any open cursors,
free allocated resources, close underlying files, and discard the database handle.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="CompactStats.html" title="class in com.sleepycat.db">CompactStats</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#compact-com.sleepycat.db.Transaction-com.sleepycat.db.DatabaseEntry-com.sleepycat.db.DatabaseEntry-com.sleepycat.db.DatabaseEntry-com.sleepycat.db.CompactConfig-">compact</a></span>&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;start,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;stop,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;end,
<a href="CompactConfig.html" title="class in com.sleepycat.db">CompactConfig</a>&nbsp;config)</code></th>
<td class="colLast">
<div class="block">Compact a Btree or Recno database or returns unused Btree,
Hash or Recno database pages to the underlying filesystem.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#consume-com.sleepycat.db.Transaction-com.sleepycat.db.DatabaseEntry-com.sleepycat.db.DatabaseEntry-boolean-">consume</a></span>&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;key,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;data,
boolean&nbsp;wait)</code></th>
<td class="colLast">
<div class="block">Return the record number and data from the available record closest to
the head of the queue, and delete the record.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#convert-java.lang.String-boolean-com.sleepycat.db.DatabaseConfig-">convert</a></span>&#8203;(java.lang.String&nbsp;fileName,
boolean&nbsp;useBigEndian,
<a href="DatabaseConfig.html" title="class in com.sleepycat.db">DatabaseConfig</a>&nbsp;config)</code></th>
<td class="colLast">
<div class="block">Convert the byte order of all the databases included in the specified file.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#delete-com.sleepycat.db.Transaction-com.sleepycat.db.DatabaseEntry-">delete</a></span>&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;key)</code></th>
<td class="colLast">
<div class="block">Remove key/data pairs from the database.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#deleteMultiple-com.sleepycat.db.Transaction-com.sleepycat.db.MultipleEntry-">deleteMultiple</a></span>&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="MultipleEntry.html" title="class in com.sleepycat.db">MultipleEntry</a>&nbsp;keys)</code></th>
<td class="colLast">
<div class="block">Remove key/data pairs from the database.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#deleteMultipleKey-com.sleepycat.db.Transaction-com.sleepycat.db.MultipleEntry-">deleteMultipleKey</a></span>&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="MultipleEntry.html" title="class in com.sleepycat.db">MultipleEntry</a>&nbsp;keys)</code></th>
<td class="colLast">
<div class="block">Remove key/data pairs from the database.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#exists-com.sleepycat.db.Transaction-com.sleepycat.db.DatabaseEntry-">exists</a></span>&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;key)</code></th>
<td class="colLast">
<div class="block">Checks if the specified key appears in the database.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code><a href="OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#get-com.sleepycat.db.Transaction-com.sleepycat.db.DatabaseEntry-com.sleepycat.db.DatabaseEntry-com.sleepycat.db.LockMode-">get</a></span>&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;key,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;data,
<a href="LockMode.html" title="class in com.sleepycat.db">LockMode</a>&nbsp;lockMode)</code></th>
<td class="colLast">
<div class="block">Retrieves the key/data pair with the given key from the database.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code><a href="CacheFile.html" title="class in com.sleepycat.db">CacheFile</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCacheFile--">getCacheFile</a></span>()</code></th>
<td class="colLast">
<div class="block">Return the handle for the cache file underlying the database.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code><a href="DatabaseConfig.html" title="class in com.sleepycat.db">DatabaseConfig</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getConfig--">getConfig</a></span>()</code></th>
<td class="colLast">
<div class="block">Return this Database object's configuration.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getDatabaseFile--">getDatabaseFile</a></span>()</code></th>
<td class="colLast">
<div class="block">Return the database's underlying file name.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getDatabaseName--">getDatabaseName</a></span>()</code></th>
<td class="colLast">
<div class="block">Return the database name.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code><a href="Environment.html" title="class in com.sleepycat.db">Environment</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getEnvironment--">getEnvironment</a></span>()</code></th>
<td class="colLast">
<div class="block">Return the <a href="Environment.html" title="class in com.sleepycat.db"><code>Environment</code></a> handle for the database environment
underlying the <a href="Database.html" title="class in com.sleepycat.db"><code>Database</code></a>.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code><a href="KeyRange.html" title="class in com.sleepycat.db">KeyRange</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getKeyRange-com.sleepycat.db.Transaction-com.sleepycat.db.DatabaseEntry-">getKeyRange</a></span>&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;key)</code></th>
<td class="colLast">
<div class="block">Return an estimate of the proportion of keys in the database less
than, equal to, and greater than the specified key.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code><a href="OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSearchBoth-com.sleepycat.db.Transaction-com.sleepycat.db.DatabaseEntry-com.sleepycat.db.DatabaseEntry-com.sleepycat.db.LockMode-">getSearchBoth</a></span>&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;key,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;data,
<a href="LockMode.html" title="class in com.sleepycat.db">LockMode</a>&nbsp;lockMode)</code></th>
<td class="colLast">
<div class="block">Retrieves the key/data pair with the given key and data value, that is, both
the key and data items must match.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code><a href="OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSearchRecordNumber-com.sleepycat.db.Transaction-com.sleepycat.db.DatabaseEntry-com.sleepycat.db.DatabaseEntry-com.sleepycat.db.LockMode-">getSearchRecordNumber</a></span>&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;key,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;data,
<a href="LockMode.html" title="class in com.sleepycat.db">LockMode</a>&nbsp;lockMode)</code></th>
<td class="colLast">
<div class="block">Retrieves the key/data pair associated with the specific numbered record of the database.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code><a href="Database.html" title="class in com.sleepycat.db">Database</a>[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSlices--">getSlices</a></span>()</code></th>
<td class="colLast">
<div class="block">
Get the Database handles of the underlying slices of the database.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code><a href="DatabaseStats.html" title="class in com.sleepycat.db">DatabaseStats</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getStats-com.sleepycat.db.Transaction-com.sleepycat.db.StatsConfig-">getStats</a></span>&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="StatsConfig.html" title="class in com.sleepycat.db">StatsConfig</a>&nbsp;config)</code></th>
<td class="colLast">
<div class="block">Return database statistics.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code><a href="JoinCursor.html" title="class in com.sleepycat.db">JoinCursor</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#join-com.sleepycat.db.Cursor:A-com.sleepycat.db.JoinConfig-">join</a></span>&#8203;(<a href="Cursor.html" title="class in com.sleepycat.db">Cursor</a>[]&nbsp;cursors,
<a href="JoinConfig.html" title="class in com.sleepycat.db">JoinConfig</a>&nbsp;config)</code></th>
<td class="colLast">
<div class="block">Creates a specialized join cursor for use in performing equality or
natural joins on secondary indices.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code><a href="Cursor.html" title="class in com.sleepycat.db">Cursor</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#openCursor-com.sleepycat.db.Transaction-com.sleepycat.db.CursorConfig-">openCursor</a></span>&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="CursorConfig.html" title="class in com.sleepycat.db">CursorConfig</a>&nbsp;config)</code></th>
<td class="colLast">
<div class="block">Return a cursor into the database.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code><a href="Sequence.html" title="class in com.sleepycat.db">Sequence</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#openSequence-com.sleepycat.db.Transaction-com.sleepycat.db.DatabaseEntry-com.sleepycat.db.SequenceConfig-">openSequence</a></span>&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;key,
<a href="SequenceConfig.html" title="class in com.sleepycat.db">SequenceConfig</a>&nbsp;config)</code></th>
<td class="colLast">
<div class="block">Open a sequence represented by the key in the database.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#printStats-com.sleepycat.db.StatsConfig-">printStats</a></span>&#8203;(<a href="StatsConfig.html" title="class in com.sleepycat.db">StatsConfig</a>&nbsp;config)</code></th>
<td class="colLast">
<div class="block">Print database statistics to a specified output channel (see the
setMsgfile() method for more information), or passed to an application
callback function (see the setMsgcall() method for more information).</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code><a href="OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#put-com.sleepycat.db.Transaction-com.sleepycat.db.DatabaseEntry-com.sleepycat.db.DatabaseEntry-">put</a></span>&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;key,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;data)</code></th>
<td class="colLast">
<div class="block">
Store the key/data pair into the database.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code><a href="OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#putMultiple-com.sleepycat.db.Transaction-com.sleepycat.db.MultipleEntry-com.sleepycat.db.MultipleEntry-boolean-">putMultiple</a></span>&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="MultipleEntry.html" title="class in com.sleepycat.db">MultipleEntry</a>&nbsp;key,
<a href="MultipleEntry.html" title="class in com.sleepycat.db">MultipleEntry</a>&nbsp;data,
boolean&nbsp;overwrite)</code></th>
<td class="colLast">
<div class="block">
Store a set of key/data pairs into the database.</div>
</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code><a href="OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#putMultipleKey-com.sleepycat.db.Transaction-com.sleepycat.db.MultipleEntry-boolean-">putMultipleKey</a></span>&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="MultipleEntry.html" title="class in com.sleepycat.db">MultipleEntry</a>&nbsp;key,
boolean&nbsp;overwrite)</code></th>
<td class="colLast">
<div class="block">
Store a set of key/data pairs into the database.</div>
</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code><a href="OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#putNoDupData-com.sleepycat.db.Transaction-com.sleepycat.db.DatabaseEntry-com.sleepycat.db.DatabaseEntry-">putNoDupData</a></span>&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;key,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;data)</code></th>
<td class="colLast">
<div class="block">
Store the key/data pair into the database if it does not already appear
in the database.</div>
</td>
</tr>
<tr id="i29" class="rowColor">
<td class="colFirst"><code><a href="OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#putNoOverwrite-com.sleepycat.db.Transaction-com.sleepycat.db.DatabaseEntry-com.sleepycat.db.DatabaseEntry-">putNoOverwrite</a></span>&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;key,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;data)</code></th>
<td class="colLast">
<div class="block">
Store the key/data pair into the database if the key does not already
appear in the database.</div>
</td>
</tr>
<tr id="i30" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#remove-java.lang.String-java.lang.String-com.sleepycat.db.DatabaseConfig-">remove</a></span>&#8203;(java.lang.String&nbsp;fileName,
java.lang.String&nbsp;databaseName,
<a href="DatabaseConfig.html" title="class in com.sleepycat.db">DatabaseConfig</a>&nbsp;config)</code></th>
<td class="colLast">
<div class="block">
Remove the database specified by the file and database parameters.</div>
</td>
</tr>
<tr id="i31" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#removeSequence-com.sleepycat.db.Transaction-com.sleepycat.db.DatabaseEntry-com.sleepycat.db.SequenceConfig-">removeSequence</a></span>&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;key,
<a href="SequenceConfig.html" title="class in com.sleepycat.db">SequenceConfig</a>&nbsp;config)</code></th>
<td class="colLast">
<div class="block">Remove the sequence from the database.</div>
</td>
</tr>
<tr id="i32" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rename-java.lang.String-java.lang.String-java.lang.String-com.sleepycat.db.DatabaseConfig-">rename</a></span>&#8203;(java.lang.String&nbsp;fileName,
java.lang.String&nbsp;oldDatabaseName,
java.lang.String&nbsp;newDatabaseName,
<a href="DatabaseConfig.html" title="class in com.sleepycat.db">DatabaseConfig</a>&nbsp;config)</code></th>
<td class="colLast">
<div class="block">
Rename a database specified by the file and database parameters.</div>
</td>
</tr>
<tr id="i33" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setConfig-com.sleepycat.db.DatabaseConfig-">setConfig</a></span>&#8203;(<a href="DatabaseConfig.html" title="class in com.sleepycat.db">DatabaseConfig</a>&nbsp;config)</code></th>
<td class="colLast">
<div class="block">Change the settings in an existing database handle.</div>
</td>
</tr>
<tr id="i34" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setMsgfile-java.io.File-">setMsgfile</a></span>&#8203;(java.io.File&nbsp;file)</code></th>
<td class="colLast">
<div class="block">Sets the path of a file to store statistical information.</div>
</td>
</tr>
<tr id="i35" class="rowColor">
<td class="colFirst"><code><a href="Database.html" title="class in com.sleepycat.db">Database</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sliceLookup-com.sleepycat.db.DatabaseEntry-">sliceLookup</a></span>&#8203;(<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;key)</code></th>
<td class="colLast">
<div class="block">
Get the Database handle of the slice that contains the given key.</div>
</td>
</tr>
<tr id="i36" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sortMultipleKeyAndData-com.sleepycat.db.MultipleDataEntry-com.sleepycat.db.MultipleDataEntry-">sortMultipleKeyAndData</a></span>&#8203;(<a href="MultipleDataEntry.html" title="class in com.sleepycat.db">MultipleDataEntry</a>&nbsp;keys,
<a href="MultipleDataEntry.html" title="class in com.sleepycat.db">MultipleDataEntry</a>&nbsp;datas)</code></th>
<td class="colLast">
<div class="block">Sorts two DatabaseEntry objects with multiple key and data pairs.</div>
</td>
</tr>
<tr id="i37" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sortMultipleKeyData-com.sleepycat.db.MultipleKeyDataEntry-">sortMultipleKeyData</a></span>&#8203;(<a href="MultipleKeyDataEntry.html" title="class in com.sleepycat.db">MultipleKeyDataEntry</a>&nbsp;entries)</code></th>
<td class="colLast">
<div class="block">Sorts a DatabaseEntry with multiple matching key/data pairs.</div>
</td>
</tr>
<tr id="i38" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sortMultipleKeyOrData-com.sleepycat.db.MultipleDataEntry-">sortMultipleKeyOrData</a></span>&#8203;(<a href="MultipleDataEntry.html" title="class in com.sleepycat.db">MultipleDataEntry</a>&nbsp;entries)</code></th>
<td class="colLast">
<div class="block">Sorts a DatabaseEntry with multiple key or data pairs.</div>
</td>
</tr>
<tr id="i39" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sync--">sync</a></span>()</code></th>
<td class="colLast">
<div class="block">Flush any cached information to disk.</div>
</td>
</tr>
<tr id="i40" class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#truncate-com.sleepycat.db.Transaction-boolean-">truncate</a></span>&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
boolean&nbsp;countRecords)</code></th>
<td class="colLast">
<div class="block">Empty the database, discarding all records it contains.</div>
</td>
</tr>
<tr id="i41" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#upgrade-java.lang.String-com.sleepycat.db.DatabaseConfig-">upgrade</a></span>&#8203;(java.lang.String&nbsp;fileName,
<a href="DatabaseConfig.html" title="class in com.sleepycat.db">DatabaseConfig</a>&nbsp;config)</code></th>
<td class="colLast">
<div class="block">Upgrade all of the databases included in the specified file.</div>
</td>
</tr>
<tr id="i42" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#verify-java.lang.String-java.lang.String-java.io.PrintStream-com.sleepycat.db.VerifyConfig-com.sleepycat.db.DatabaseConfig-">verify</a></span>&#8203;(java.lang.String&nbsp;fileName,
java.lang.String&nbsp;databaseName,
java.io.PrintStream&nbsp;dumpStream,
<a href="VerifyConfig.html" title="class in com.sleepycat.db">VerifyConfig</a>&nbsp;verifyConfig,
<a href="DatabaseConfig.html" title="class in com.sleepycat.db">DatabaseConfig</a>&nbsp;dbConfig)</code></th>
<td class="colLast">
<div class="block">Return if all of the databases in a file are uncorrupted.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="Database-java.lang.String-java.lang.String-com.sleepycat.db.DatabaseConfig-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Database</h4>
<pre>public&nbsp;Database&#8203;(java.lang.String&nbsp;filename,
java.lang.String&nbsp;databaseName,
<a href="DatabaseConfig.html" title="class in com.sleepycat.db">DatabaseConfig</a>&nbsp;config)
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a>,
java.io.FileNotFoundException</pre>
<div class="block">Open a database.
<p>
The database is represented by the file and database parameters.
<p>
The currently supported database file formats (or <em>access
methods</em>) are Btree, Hash, Queue, and Recno. The Btree format is a
representation of a sorted, balanced tree structure. The Hash format
is an extensible, dynamic hashing scheme. The Queue format supports
fast access to fixed-length records accessed sequentially or by logical
record number. The Recno format supports fixed- or variable-length
records, accessed sequentially or by logical record number, and
optionally backed by a flat text file.
<p>
Storage and retrieval are based on key/data pairs; see <a href="DatabaseEntry.html" title="class in com.sleepycat.db"><code>DatabaseEntry</code></a>
for more information.
<p>
Opening a database is a relatively expensive operation, and maintaining
a set of open databases will normally be preferable to repeatedly
opening and closing the database for each new query.
<p>
In-memory databases never intended to be preserved on disk may be
created by setting both the fileName and databaseName parameters to
null. Note that in-memory databases can only ever be shared by sharing
the single database handle that created them, in circumstances where
doing so is safe. The environment variable <code>TMPDIR</code> may
be used as a directory in which to create temporary backing files.
<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>filename</code> - The name of an underlying file that will be used to back the database.
On Windows platforms, this argument will be interpreted as a UTF-8
string, which is equivalent to ASCII for Latin characters.
<p></dd>
<dd><code>databaseName</code> - An optional parameter that allows applications to have multiple
databases in a single file. Although no databaseName parameter needs
to be specified, it is an error to attempt to open a second database in
a physical file that was not initially created using a databaseName
parameter. Further, the databaseName parameter is not supported by the
Queue format.
<p></dd>
<dd><code>config</code> - The database open attributes. If null, default attributes are used.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
<dd><code>java.io.FileNotFoundException</code> - if the database file does not exist</dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="close-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;close&#8203;(boolean&nbsp;noSync)
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Flush any cached database information to disk, close any open cursors,
free allocated resources, close underlying files, and discard the database handle.
<p>
Although closing a database handle will close any open cursors, it is
recommended that applications explicitly close all their <a href="Cursor.html" title="class in com.sleepycat.db"><code>Cursor</code></a>
handles before closing the database. The reason why is that when the cursor
is explicitly closed, the memory allocated for it is reclaimed; however,
this will not happen if you close a database while cursors are still open.
The same rule, for the same reasons, hold true for
<a href="Transaction.html" title="class in com.sleepycat.db"><code>Transaction</code></a> handles.
Make sure you close all your transaction handles before closing your database handle.
<p>
Because key/data pairs are cached in memory, failing to sync the file
with the <a href="#close-boolean-"><code>Database.close</code></a> or <a href="#sync--"><code>Database.sync</code></a> methods
may result in inconsistent or lost information.
So, to ensure that any data cached in main memory are reflected
in the underlying file system, applications should make a point to
always either close database handles or sync their data to disk.
<p>
When multiple threads are using the <a href="Database.html" title="class in com.sleepycat.db"><code>Database</code></a> handle
concurrently, only a single thread may call this method.
<p>
The database handle may not be accessed again after this method is
called, regardless of the method's success or failure.
<p>
When called on a database that is the primary database for a secondary
index, the primary database should be closed only after all secondary
indices which reference it have been closed.
If you do not close the database handle explicitly,
it will be closed when the environment handle that owns the database handle is closed.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>noSync</code> - Do not flush cached information to disk. The noSync parameter is a
dangerous option. It should be set only if the application is doing
logging (with transactions) so that the database is recoverable after a
system or application crash, or if the database is always generated from
scratch after any system or application crash.
<b>
It is important to understand that flushing cached information to disk
only minimizes the window of opportunity for corrupted data.
</b>
Although unlikely, it is possible for database corruption to happen if
a system or application crash occurs while writing data to the database.
To ensure that database corruption never occurs, applications must
either: use transactions and logging with automatic recovery; use
logging and application-specific recovery; or edit a copy of the
database, and once all applications using the database have successfully
called this method, atomically replace the original database with the
updated copy.
<p>
Note that this flag only works when the database has been opened using an environment.
<p></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
</dl>
</li>
</ul>
<a name="close--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;close()
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Flush any cached database information to disk, close any open cursors,
free allocated resources, close underlying files, and discard the database handle.
<p>
Although closing a database handle will close any open cursors, it is
recommended that applications explicitly close all their <a href="Cursor.html" title="class in com.sleepycat.db"><code>Cursor</code></a>
handles before closing the database. The reason why is that when the cursor
is explicitly closed, the memory allocated for it is reclaimed; however,
this will not happen if you close a database while cursors are still open.
The same rule, for the same reasons, hold true for
<a href="Transaction.html" title="class in com.sleepycat.db"><code>Transaction</code></a> handles.
Make sure you close all your transaction handles before closing your database handle.
<p>
Because key/data pairs are cached in memory, failing to sync the file
with the <a href="#close-boolean-"><code>Database.close</code></a> or <a href="#sync--"><code>Database.sync</code></a> methods
may result in inconsistent or lost information.
So, to ensure that any data cached in main memory are reflected
in the underlying file system, applications should make a point to
always either close database handles or sync their data to disk.
<p>
When multiple threads are using the <a href="Database.html" title="class in com.sleepycat.db"><code>Database</code></a> handle
concurrently, only a single thread may call this method.
<p>
The database handle may not be accessed again after this method is
called, regardless of the method's success or failure.
<p>
When called on a database that is the primary database for a secondary
index, the primary database should be closed only after all secondary
indices which reference it have been closed.
If you do not close the database handle explicitly,
it will be closed when the environment handle that owns the database handle is closed.
<p></div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
</dl>
</li>
</ul>
<a name="compact-com.sleepycat.db.Transaction-com.sleepycat.db.DatabaseEntry-com.sleepycat.db.DatabaseEntry-com.sleepycat.db.DatabaseEntry-com.sleepycat.db.CompactConfig-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>compact</h4>
<pre class="methodSignature">public&nbsp;<a href="CompactStats.html" title="class in com.sleepycat.db">CompactStats</a>&nbsp;compact&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;start,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;stop,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;end,
<a href="CompactConfig.html" title="class in com.sleepycat.db">CompactConfig</a>&nbsp;config)
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Compact a Btree or Recno database or returns unused Btree,
Hash or Recno database pages to the underlying filesystem.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>txn</code> - If the operation is part of an application-specified transaction, the txnid
parameter is a transaction handle returned from <a href="Environment.html#beginTransaction-com.sleepycat.db.Transaction-com.sleepycat.db.TransactionConfig-"><code>Environment.beginTransaction(com.sleepycat.db.Transaction, com.sleepycat.db.TransactionConfig)</code></a>, otherwise <code>NULL</code>.
<p>
If a transaction handle is supplied to this method, then the operation is performed
using that transaction. In this event, large sections of the tree may be
locked during the course of the transaction.
<p>
If no transaction handle is specified, but the operation occurs in a transactional
database, the operation will be implicitly transaction protected using multiple
transactions. These transactions will be periodically committed to avoid locking
large sections of the tree. Any deadlocks encountered cause the compaction operation
to be retried from the point of the last transaction commit.</dd>
<dd><code>start</code> - If not <code>null</code>, the <code>start</code> parameter is the starting
point for compaction in a Btree or Recno database. Compaction will start
at the smallest key greater than or equal to the specified key. If
<code>null</code>, compaction will start at the beginning of the database.</dd>
<dd><code>stop</code> - If not <code>null</code>, the <code>stop</code> parameter is the stopping
point for compaction in a Btree or Recno database. Compaction will stop at
the page with the smallest key greater than the specified key. If
<code>null</code>, compaction will stop at the end of the database.</dd>
<dd><code>end</code> - If not <code>null</code>, the <code>end</code> parameter will be filled in
with the key marking the end of the compaction operation in a Btree or
Recno database. It is generally the first key of the page where processing
stopped.</dd>
<dd><code>config</code> - The compaction operation attributes. If null, default attributes are used.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>compaction operation statistics</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
</dl>
</li>
</ul>
<a name="openCursor-com.sleepycat.db.Transaction-com.sleepycat.db.CursorConfig-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>openCursor</h4>
<pre class="methodSignature">public&nbsp;<a href="Cursor.html" title="class in com.sleepycat.db">Cursor</a>&nbsp;openCursor&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="CursorConfig.html" title="class in com.sleepycat.db">CursorConfig</a>&nbsp;config)
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Return a cursor into the database.
<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>txn</code> - To use a cursor for writing to a transactional database, an explicit
transaction must be specified. For read-only access to a transactional
database, the transaction may be null. For a non-transactional database,
the transaction must be null.
<p>
To transaction-protect cursor operations, cursors must be opened and closed
within the context of a transaction, and the txn parameter specifies the
transaction context in which the cursor will be used.
<p></dd>
<dd><code>config</code> - The cursor attributes. If null, default attributes are used.
<p></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A database cursor.
<p></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
</dl>
</li>
</ul>
<a name="openSequence-com.sleepycat.db.Transaction-com.sleepycat.db.DatabaseEntry-com.sleepycat.db.SequenceConfig-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>openSequence</h4>
<pre class="methodSignature">public&nbsp;<a href="Sequence.html" title="class in com.sleepycat.db">Sequence</a>&nbsp;openSequence&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;key,
<a href="SequenceConfig.html" title="class in com.sleepycat.db">SequenceConfig</a>&nbsp;config)
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Open a sequence represented by the key in the database.
<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>txn</code> - For a transactional database, an explicit transaction may be specified, or
null may be specified to use auto-commit. For a non-transactional
database, null must be specified.
If no transaction handle is specified, but the operation occurs in a
transactional database, the operation will be implicitly transaction protected.
<p></dd>
<dd><code>key</code> - The key <a href="DatabaseEntry.html" title="class in com.sleepycat.db"><code>DatabaseEntry</code></a> of the sequence.
It specifies which record in the database stores the persistent sequence data.
<p></dd>
<dd><code>config</code> - The sequence attributes. If null, default attributes are used.
<p></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A sequence handle.
<p></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
</dl>
</li>
</ul>
<a name="removeSequence-com.sleepycat.db.Transaction-com.sleepycat.db.DatabaseEntry-com.sleepycat.db.SequenceConfig-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeSequence</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;removeSequence&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;key,
<a href="SequenceConfig.html" title="class in com.sleepycat.db">SequenceConfig</a>&nbsp;config)
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Remove the sequence from the database. This method should not be called if
there are open handles on this sequence.
<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>txn</code> - For a transactional database, an explicit transaction may be specified, or
null may be specified to use auto-commit. For a non-transactional
database, null must be specified.
If no transaction handle is specified, but the operation occurs in a
transactional database, the operation will be implicitly transaction protected.
<p></dd>
<dd><code>key</code> - The key <a href="DatabaseEntry.html" title="class in com.sleepycat.db"><code>DatabaseEntry</code></a> of the sequence.
It specifies which record in the database stores the persistent sequence data.
<p></dd>
<dd><code>config</code> - The sequence attributes. If null, default attributes are used.
<p></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
</dl>
</li>
</ul>
<a name="getDatabaseFile--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDatabaseFile</h4>
<pre class="methodSignature">public&nbsp;java.lang.String&nbsp;getDatabaseFile()
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Return the database's underlying file name.
<p>
This method may be called at any time during the life of the application.
<p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The database's underlying file name.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
</dl>
</li>
</ul>
<a name="getDatabaseName--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDatabaseName</h4>
<pre class="methodSignature">public&nbsp;java.lang.String&nbsp;getDatabaseName()
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Return the database name.
<p>
This method may be called at any time during the life of the application.
<p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The database name.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
</dl>
</li>
</ul>
<a name="getConfig--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getConfig</h4>
<pre class="methodSignature">public&nbsp;<a href="DatabaseConfig.html" title="class in com.sleepycat.db">DatabaseConfig</a>&nbsp;getConfig()
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Return this Database object's configuration.
<p>
This may differ from the configuration used to open this object if
the database existed previously.
<p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This Database object's configuration.
<p></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
</dl>
</li>
</ul>
<a name="setConfig-com.sleepycat.db.DatabaseConfig-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setConfig</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setConfig&#8203;(<a href="DatabaseConfig.html" title="class in com.sleepycat.db">DatabaseConfig</a>&nbsp;config)
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Change the settings in an existing database handle.
<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>config</code> - The environment attributes. If null, default attributes are used.
<p></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalArgumentException</code> - if an invalid parameter was specified.
<p></dd>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
</dl>
</li>
</ul>
<a name="getEnvironment--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEnvironment</h4>
<pre class="methodSignature">public&nbsp;<a href="Environment.html" title="class in com.sleepycat.db">Environment</a>&nbsp;getEnvironment()
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Return the <a href="Environment.html" title="class in com.sleepycat.db"><code>Environment</code></a> handle for the database environment
underlying the <a href="Database.html" title="class in com.sleepycat.db"><code>Database</code></a>.
<p>
This method may be called at any time during the life of the application.
<p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The <a href="Environment.html" title="class in com.sleepycat.db"><code>Environment</code></a> handle for the database environment
underlying the <a href="Database.html" title="class in com.sleepycat.db"><code>Database</code></a>.
<p></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
</dl>
</li>
</ul>
<a name="getCacheFile--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCacheFile</h4>
<pre class="methodSignature">public&nbsp;<a href="CacheFile.html" title="class in com.sleepycat.db">CacheFile</a>&nbsp;getCacheFile()
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Return the handle for the cache file underlying the database.
<p>
This method may be called at any time during the life of the application.
<p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The handle for the cache file underlying the database.
<p></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
</dl>
</li>
</ul>
<a name="append-com.sleepycat.db.Transaction-com.sleepycat.db.DatabaseEntry-com.sleepycat.db.DatabaseEntry-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>append</h4>
<pre class="methodSignature">public&nbsp;<a href="OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</a>&nbsp;append&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;key,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;data)
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block"><p>
Append the key/data pair to the end of the database.
<p>
The underlying database must be a Queue or Recno database. The record
number allocated to the record is returned in the key parameter.
<p>
There is a minor behavioral difference between the Recno and Queue
access methods this method. If a transaction enclosing this method
aborts, the record number may be decremented (and later reallocated by
a subsequent operation) in the Recno access method, but will not be
decremented or reallocated in the Queue access method.
<p>
It may be useful to modify the stored data based on the generated key.
If a callback function is specified using <a href="DatabaseConfig.html#setRecordNumberAppender-com.sleepycat.db.RecordNumberAppender-"><code>DatabaseConfig.setRecordNumberAppender</code></a>, it will be called after the record number has
been selected, but before the data has been stored.
<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>txn</code> - For a transactional database, an explicit transaction may be specified, or null
may be specified to use auto-commit. For a non-transactional database, null
must be specified.
<p></dd>
<dd><code>key</code> - the key <a href="DatabaseEntry.html" title="class in com.sleepycat.db"><code>DatabaseEntry</code></a> operated on.
<p></dd>
<dd><code>data</code> - the data <a href="DatabaseEntry.html" title="class in com.sleepycat.db"><code>DatabaseEntry</code></a> stored.
<p></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><a href="OperationStatus.html#SUCCESS"><code>OperationStatus.SUCCESS</code></a>
<p></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</a></code> - if the operation was selected to resolve a
deadlock.
<p></dd>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
</dl>
</li>
</ul>
<a name="consume-com.sleepycat.db.Transaction-com.sleepycat.db.DatabaseEntry-com.sleepycat.db.DatabaseEntry-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>consume</h4>
<pre class="methodSignature">public&nbsp;<a href="OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</a>&nbsp;consume&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;key,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;data,
boolean&nbsp;wait)
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Return the record number and data from the available record closest to
the head of the queue, and delete the record. The record number will be
returned in the <code>key</code> parameter, and the data will be returned
in the <code>data</code> parameter. A record is available if it is not
deleted and is not currently locked. The underlying database must be
of type Queue for this method to be called.
<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>txn</code> - For a transactional database, an explicit transaction may be specified to
transaction-protect the operation, or null may be specified to perform the
operation without transaction protection. For a non-transactional database,
null must be specified.</dd>
<dd><code>key</code> - the key
returned as output. Its byte array does not need to be initialized by the
caller.</dd>
<dd><code>data</code> - the data
returned as output. Its byte array does not need to be initialized by the
caller.</dd>
<dd><code>wait</code> - if there is no record available, this parameter determines whether the
method waits for one to become available, or returns immediately with
status <code>NOTFOUND</code>.
<p></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><a href="OperationStatus.html#NOTFOUND"><code>OperationStatus.NOTFOUND</code></a> if no matching key/data pair is
found; <a href="OperationStatus.html#KEYEMPTY"><code>OperationStatus.KEYEMPTY</code></a> if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, <a href="OperationStatus.html#SUCCESS"><code>OperationStatus.SUCCESS</code></a>.
<p></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</a></code> - if the operation was selected to resolve a
deadlock.
<p></dd>
<dd><code>java.lang.IllegalArgumentException</code> - if an invalid parameter was specified.
<p></dd>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
</dl>
</li>
</ul>
<a name="delete-com.sleepycat.db.Transaction-com.sleepycat.db.DatabaseEntry-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>delete</h4>
<pre class="methodSignature">public&nbsp;<a href="OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</a>&nbsp;delete&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;key)
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Remove key/data pairs from the database.
<p>
The key/data pair associated with the specified key is discarded
from the database. In the presence of duplicate key values, all
records associated with the designated key will be discarded.
<p>
The key/data pair is also deleted from any associated secondary
databases.
When called on a database that has been made into a secondary index,
this method deletes the key/data pair from the primary database and all secondary indices.
<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>txn</code> - If the operation is part of an application-specified transaction, the txn
parameter is a Transaction object returned from the
<a href="Environment.html#beginTransaction-com.sleepycat.db.Transaction-com.sleepycat.db.TransactionConfig-"><code>Environment.beginTransaction</code></a> method; if the operation is part of a Berkeley DB
Concurrent Data Store group, the txn parameter is a Transaction object returned
from the <a href="Environment.html#beginCDSGroup--"><code>Environment.beginCDSGroup</code></a> method; otherwise null.
For a transactional database, an explicit transaction may be specified, or null
may be specified to use auto-commit. For a non-transactional database, null
must be specified.
If no transaction handle is specified, but the operation occurs in a transactional
database, the operation will be implicitly transaction protected.
<p></dd>
<dd><code>key</code> - the key <a href="DatabaseEntry.html" title="class in com.sleepycat.db"><code>DatabaseEntry</code></a> operated on.
<p></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The method will return <a href="OperationStatus.html#NOTFOUND"><code>OperationStatus.NOTFOUND</code></a> if the
specified key is not found in the database;
The method will return <a href="OperationStatus.html#KEYEMPTY"><code>OperationStatus.KEYEMPTY</code></a> if the
database is a Queue or Recno database and the specified key exists,
but was never explicitly created by the application or was later
deleted;
otherwise the method will return <a href="OperationStatus.html#SUCCESS"><code>OperationStatus.SUCCESS</code></a>.
<p></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</a></code> - if the operation was selected to resolve a
deadlock.
<p></dd>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
</dl>
</li>
</ul>
<a name="deleteMultiple-com.sleepycat.db.Transaction-com.sleepycat.db.MultipleEntry-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>deleteMultiple</h4>
<pre class="methodSignature">public&nbsp;<a href="OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</a>&nbsp;deleteMultiple&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="MultipleEntry.html" title="class in com.sleepycat.db">MultipleEntry</a>&nbsp;keys)
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Remove key/data pairs from the database.
<p>
The key/data pairs associated with the specified keys are discarded
from the database. In the presence of duplicate key values, all
records associated with the designated keys will be discarded.
<p>
The key/data pairs are also deleted from any associated secondary
databases. When called on a database that has been made into a secondary
index, this method deletes the key/data pairs from the primary database and
all secondary indices.
<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>txn</code> - If the operation is part of an application-specified transaction, the txn
parameter is a Transaction object returned from the
<a href="Environment.html#beginTransaction-com.sleepycat.db.Transaction-com.sleepycat.db.TransactionConfig-"><code>Environment.beginTransaction</code></a>
method; if the operation is part of a Berkeley DB Concurrent Data Store
group, the txn parameter is a Transaction object returned from the
<a href="Environment.html#beginCDSGroup--"><code>Environment.beginCDSGroup</code></a>
method; otherwise null. For a transactional database, an explicit transaction
may be specified, or null may be specified to use auto-commit. For a
non-transactional database, null must be specified. If no transaction
handle is specified, but the operation occurs in a transactional database,
the operation will be implicitly transaction protected.
<p></dd>
<dd><code>keys</code> - the set of keys
<a href="MultipleEntry.html" title="class in com.sleepycat.db"><code>MultipleEntry</code></a> operated on.
<p></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The method will return
<a href="OperationStatus.html#NOTFOUND"><code>OperationStatus.NOTFOUND</code></a>
when it encounters an entry in the list that is not found in the database,
and will not process any remaining entries; The method will return
<a href="OperationStatus.html#KEYEMPTY"><code>OperationStatus.KEYEMPTY</code></a>
if the database is a Queue or Recno database and the specified key exists,
but was never explicitly created by the application or was later
deleted; otherwise the method will return
<a href="OperationStatus.html#SUCCESS"><code>OperationStatus.SUCCESS</code></a>.
<p></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</a></code> - if the operation was selected to resolve a
deadlock.
<p></dd>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
</dl>
</li>
</ul>
<a name="deleteMultipleKey-com.sleepycat.db.Transaction-com.sleepycat.db.MultipleEntry-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>deleteMultipleKey</h4>
<pre class="methodSignature">public&nbsp;<a href="OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</a>&nbsp;deleteMultipleKey&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="MultipleEntry.html" title="class in com.sleepycat.db">MultipleEntry</a>&nbsp;keys)
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Remove key/data pairs from the database.
<p>
The specified key/data pairs are discarded from the database.
<p>
The key/data pairs are also deleted from any associated secondary
databases. When called on a database that has been made into a secondary
index, this method deletes the key/data pairs from the primary database and
all secondary indices.
<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>txn</code> - If the operation is part of an application-specified transaction, the txn
parameter is a Transaction object returned from the
<a href="Environment.html#beginTransaction-com.sleepycat.db.Transaction-com.sleepycat.db.TransactionConfig-"><code>Environment.beginTransaction</code></a>
method; if the operation is part of a Berkeley DB Concurrent Data Store
group, the txn parameter is a Transaction object returned from the
<a href="Environment.html#beginCDSGroup--"><code>Environment.beginCDSGroup</code></a>
method; otherwise null. For a transactional database, an explicit transaction
may be specified, or null may be specified to use auto-commit. For a
non-transactional database, null must be specified. If no transaction
handle is specified, but the operation occurs in a transactional database,
the operation will be implicitly transaction protected.
<p></dd>
<dd><code>keys</code> - the set of key/data pairs
<a href="MultipleEntry.html" title="class in com.sleepycat.db"><code>MultipleEntry</code></a> operated on.
<p></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The method will return
<a href="OperationStatus.html#NOTFOUND"><code>OperationStatus.NOTFOUND</code></a>
when it encounters an entry in the list that is not found in the database,
and will not process any remaining entries; The method will return
<a href="OperationStatus.html#KEYEMPTY"><code>OperationStatus.KEYEMPTY</code></a>
if the database is a Queue or Recno database and the specified key exists,
but was never explicitly created by the application or was later
deleted; otherwise the method will return
<a href="OperationStatus.html#SUCCESS"><code>OperationStatus.SUCCESS</code></a>.
<p></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</a></code> - if the operation was selected to resolve a
deadlock.
<p></dd>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
</dl>
</li>
</ul>
<a name="exists-com.sleepycat.db.Transaction-com.sleepycat.db.DatabaseEntry-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>exists</h4>
<pre class="methodSignature">public&nbsp;<a href="OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</a>&nbsp;exists&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;key)
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Checks if the specified key appears in the database.
<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>txn</code> - If the operation is part of an application-specified transaction, the txn
parameter is a Transaction object returned from the
<a href="Environment.html#beginTransaction-com.sleepycat.db.Transaction-com.sleepycat.db.TransactionConfig-"><code>Environment.beginTransaction</code></a> method; if the operation is part of a Berkeley DB
Concurrent Data Store group, the txn parameter is a Transaction object returned
from the <a href="Environment.html#beginCDSGroup--"><code>Environment.beginCDSGroup</code></a> method; otherwise null.
For a transactional database, an explicit transaction may be specified to
transaction-protect the operation, or null may be specified to perform the
operation without transaction protection. For a non-transactional database,
null must be specified.
If no transaction handle is specified, but the operation occurs in a
transactional database, the operation will be implicitly transaction protected.
<p></dd>
<dd><code>key</code> - the key
used as input. It must be initialized with a non-null byte array by the
caller.
<p></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><a href="OperationStatus.html#NOTFOUND"><code>OperationStatus.NOTFOUND</code></a> if no matching key/data pair is
found; <a href="OperationStatus.html#KEYEMPTY"><code>OperationStatus.KEYEMPTY</code></a> if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, <a href="OperationStatus.html#SUCCESS"><code>OperationStatus.SUCCESS</code></a>.
<p></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</a></code> - if the operation was selected to resolve a
deadlock.
<p></dd>
<dd><code>java.lang.IllegalArgumentException</code> - if an invalid parameter was specified.
<p></dd>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
</dl>
</li>
</ul>
<a name="get-com.sleepycat.db.Transaction-com.sleepycat.db.DatabaseEntry-com.sleepycat.db.DatabaseEntry-com.sleepycat.db.LockMode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>get</h4>
<pre class="methodSignature">public&nbsp;<a href="OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</a>&nbsp;get&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;key,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;data,
<a href="LockMode.html" title="class in com.sleepycat.db">LockMode</a>&nbsp;lockMode)
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Retrieves the key/data pair with the given key from the database. If the matching key has
duplicate values, the first data item in the set of duplicates is returned.
<p>Duplicates are sorted by:
<ul>
<li> their sort order, if a duplicate sort function was specified.
<li>any explicit cursor designated insertion.
<li> by insert order. This is the default behavior.
</ul>
<p>
Retrieval of duplicates requires the use of <a href="Cursor.html" title="class in com.sleepycat.db"><code>Cursor</code></a> operations.
When called on a database that has been made into a secondary index,
this method returns the key from the secondary index and the data item from the primary database.
<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>txn</code> - If the operation is part of an application-specified transaction, the txn
parameter is a Transaction object returned from the
<a href="Environment.html#beginTransaction-com.sleepycat.db.Transaction-com.sleepycat.db.TransactionConfig-"><code>Environment.beginTransaction</code></a> method; if the operation is part of a Berkeley DB
Concurrent Data Store group, the txn parameter is a Transaction object returned
from the <a href="Environment.html#beginCDSGroup--"><code>Environment.beginCDSGroup</code></a> method; otherwise null.
For a transactional database, an explicit transaction may be specified to
transaction-protect the operation, or null may be specified to perform the
operation without transaction protection. For a non-transactional database,
null must be specified.
If no transaction handle is specified, but the operation occurs in a
transactional database, the operation will be implicitly transaction protected.
<p></dd>
<dd><code>key</code> - the key
used as input. It must be initialized with a non-null byte array by the
caller.
<p></dd>
<dd><code>data</code> - the data
returned as output. Its byte array does not need to be initialized by the
caller.
<p></dd>
<dd><code>lockMode</code> - the locking attributes; if null, default attributes are used.
<p></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><a href="OperationStatus.html#NOTFOUND"><code>OperationStatus.NOTFOUND</code></a> if no matching key/data pair is
found; <a href="OperationStatus.html#KEYEMPTY"><code>OperationStatus.KEYEMPTY</code></a> if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, <a href="OperationStatus.html#SUCCESS"><code>OperationStatus.SUCCESS</code></a>.
<p></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</a></code> - if the operation was selected to resolve a
deadlock.
<p></dd>
<dd><code>java.lang.IllegalArgumentException</code> - if an invalid parameter was specified.
<p></dd>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
</dl>
</li>
</ul>
<a name="getKeyRange-com.sleepycat.db.Transaction-com.sleepycat.db.DatabaseEntry-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getKeyRange</h4>
<pre class="methodSignature">public&nbsp;<a href="KeyRange.html" title="class in com.sleepycat.db">KeyRange</a>&nbsp;getKeyRange&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;key)
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Return an estimate of the proportion of keys in the database less
than, equal to, and greater than the specified key.
<p>
The underlying database must be of type Btree.
<p>
This method does not retain the locks it acquires for the life of
the transaction, so estimates are not repeatable.
<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - The key <a href="DatabaseEntry.html" title="class in com.sleepycat.db"><code>DatabaseEntry</code></a> being compared.
<p></dd>
<dd><code>txn</code> - If the operation is part of an application-specified transaction, the txn
parameter is a Transaction object returned from the
<a href="Environment.html#beginTransaction-com.sleepycat.db.Transaction-com.sleepycat.db.TransactionConfig-"><code>Environment.beginTransaction</code></a> method; if the operation is part of a Berkeley DB
Concurrent Data Store group, the txn parameter is a Transaction object returned
from the <a href="Environment.html#beginCDSGroup--"><code>Environment.beginCDSGroup</code></a> method; otherwise null.
For a transactional database, an explicit transaction may be specified to
transaction-protect the operation, or null may be specified to perform the
operation without transaction protection. For a non-transactional database,
null must be specified.
If no transaction handle is specified, but the operation occurs in a
transactional database, the operation will be implicitly transaction protected.
<p></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>An estimate of the proportion of keys in the database less than,
equal to, and greater than the specified key.
<p></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</a></code> - if the operation was selected to resolve a
deadlock.
<p></dd>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
</dl>
</li>
</ul>
<a name="getSearchBoth-com.sleepycat.db.Transaction-com.sleepycat.db.DatabaseEntry-com.sleepycat.db.DatabaseEntry-com.sleepycat.db.LockMode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSearchBoth</h4>
<pre class="methodSignature">public&nbsp;<a href="OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</a>&nbsp;getSearchBoth&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;key,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;data,
<a href="LockMode.html" title="class in com.sleepycat.db">LockMode</a>&nbsp;lockMode)
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Retrieves the key/data pair with the given key and data value, that is, both
the key and data items must match.
<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>txn</code> - For a transactional database, an explicit transaction may be specified to
transaction-protect the operation, or null may be specified to perform the
operation without transaction protection. For a non-transactional database,
null must be specified.</dd>
<dd><code>key</code> - the key
used as input. It must be initialized with a non-null byte array by the
caller.</dd>
<dd><code>data</code> - the data
used as input. It must be initialized with a non-null byte array by the
caller.
<p></dd>
<dd><code>lockMode</code> - the locking attributes; if null, default attributes are used.
<p></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><a href="OperationStatus.html#NOTFOUND"><code>OperationStatus.NOTFOUND</code></a> if no matching key/data pair is
found; <a href="OperationStatus.html#KEYEMPTY"><code>OperationStatus.KEYEMPTY</code></a> if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, <a href="OperationStatus.html#SUCCESS"><code>OperationStatus.SUCCESS</code></a>.
<p></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</a></code> - if the operation was selected to resolve a
deadlock.
<p></dd>
<dd><code>java.lang.IllegalArgumentException</code> - if an invalid parameter was specified.
<p></dd>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
</dl>
</li>
</ul>
<a name="getSearchRecordNumber-com.sleepycat.db.Transaction-com.sleepycat.db.DatabaseEntry-com.sleepycat.db.DatabaseEntry-com.sleepycat.db.LockMode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSearchRecordNumber</h4>
<pre class="methodSignature">public&nbsp;<a href="OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</a>&nbsp;getSearchRecordNumber&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;key,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;data,
<a href="LockMode.html" title="class in com.sleepycat.db">LockMode</a>&nbsp;lockMode)
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Retrieves the key/data pair associated with the specific numbered record of the database.
<p>
The data field of the specified key must be a byte array containing a
record number, as described in <a href="DatabaseEntry.html" title="class in com.sleepycat.db"><code>DatabaseEntry</code></a>. This determines
the record to be retrieved.
<p>
For this method to be called, the underlying database must be of type
Btree, and it must have been configured to support record numbers.
<p>
If this method fails for any reason, the position of the cursor will be
unchanged.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>txn</code> - For a transactional database, an explicit transaction may be specified to
transaction-protect the operation, or null may be specified to perform the
operation without transaction protection. For a non-transactional database,
null must be specified.</dd>
<dd><code>key</code> - the key
returned as output. Its byte array does not need to be initialized by the
caller.</dd>
<dd><code>data</code> - the data
returned as output. Multiple results can be retrieved by passing an object
that is a subclass of <a href="MultipleEntry.html" title="class in com.sleepycat.db"><code>MultipleEntry</code></a>, otherwise its byte array does not
need to be initialized by the caller.</dd>
<dd><code>lockMode</code> - the locking attributes; if null, default attributes are used.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><a href="OperationStatus.html#NOTFOUND"><code>OperationStatus.NOTFOUND</code></a> if no matching key/data pair is
found; <a href="OperationStatus.html#KEYEMPTY"><code>OperationStatus.KEYEMPTY</code></a> if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, <a href="OperationStatus.html#SUCCESS"><code>OperationStatus.SUCCESS</code></a>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.NullPointerException</code> - if a DatabaseEntry parameter is null or
does not contain a required non-null byte array.
<p></dd>
<dd><code><a href="DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</a></code> - if the operation was selected to resolve a
deadlock.
<p></dd>
<dd><code>java.lang.IllegalArgumentException</code> - if an invalid parameter was specified.
<p></dd>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.
<p></dd>
</dl>
</li>
</ul>
<a name="put-com.sleepycat.db.Transaction-com.sleepycat.db.DatabaseEntry-com.sleepycat.db.DatabaseEntry-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>put</h4>
<pre class="methodSignature">public&nbsp;<a href="OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</a>&nbsp;put&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;key,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;data)
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block"><p>
Store the key/data pair into the database.
<p>
If the key already appears in the database and duplicates are not
configured, the existing key/data pair will be replaced. If the key
already appears in the database and sorted duplicates are configured,
the new data value is inserted at the correct sorted location.
If the key already appears in the database and unsorted duplicates are
configured, the new data value is appended at the end of the duplicate
set.
<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>txn</code> - If the operation is part of an application-specified transaction, the txn
parameter is a Transaction object returned from the
<a href="Environment.html#beginTransaction-com.sleepycat.db.Transaction-com.sleepycat.db.TransactionConfig-"><code>Environment.beginTransaction</code></a> method; if the operation is part of a Berkeley DB
Concurrent Data Store group, the txn parameter is a Transaction object returned
from the <a href="Environment.html#beginCDSGroup--"><code>Environment.beginCDSGroup</code></a> method; otherwise null.
For a transactional database, an explicit transaction may be specified, or null
may be specified to use auto-commit. For a non-transactional database, null
must be specified.
If no transaction handle is specified, but the operation occurs in a transactional
database, the operation will be implicitly transaction protected.
<p></dd>
<dd><code>key</code> - the key <a href="DatabaseEntry.html" title="class in com.sleepycat.db"><code>DatabaseEntry</code></a> operated on.
<p></dd>
<dd><code>data</code> - the data <a href="DatabaseEntry.html" title="class in com.sleepycat.db"><code>DatabaseEntry</code></a> stored.
<p></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><a href="OperationStatus.html#SUCCESS"><code>OperationStatus.SUCCESS</code></a>
<p></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</a></code> - if the operation was selected to resolve a
deadlock.
<p></dd>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
</dl>
</li>
</ul>
<a name="putMultiple-com.sleepycat.db.Transaction-com.sleepycat.db.MultipleEntry-com.sleepycat.db.MultipleEntry-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putMultiple</h4>
<pre class="methodSignature">public&nbsp;<a href="OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</a>&nbsp;putMultiple&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="MultipleEntry.html" title="class in com.sleepycat.db">MultipleEntry</a>&nbsp;key,
<a href="MultipleEntry.html" title="class in com.sleepycat.db">MultipleEntry</a>&nbsp;data,
boolean&nbsp;overwrite)
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block"><p>
Store a set of key/data pairs into the database.
<p>
The key and data parameters must contain corresponding key/data pairs. That is
the first entry in the multiple key is inserted with the first entry from the
data parameter. Similarly for all remaining keys in the set.
<p>
This method may not be called on databases configured with unsorted duplicates.
<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>txn</code> - If the operation is part of an application-specified transaction, the txn
parameter is a Transaction object returned from the
<a href="Environment.html#beginTransaction-com.sleepycat.db.Transaction-com.sleepycat.db.TransactionConfig-"><code>Environment.beginTransaction</code></a> method; if the operation is part of a Berkeley DB
Concurrent Data Store group, the txn parameter is a Transaction object returned
from the <a href="Environment.html#beginCDSGroup--"><code>Environment.beginCDSGroup</code></a> method; otherwise null.
For a transactional database, an explicit transaction may be specified, or null
may be specified to use auto-commit. For a non-transactional database, null
must be specified.
If no transaction handle is specified, but the operation occurs in a transactional
database, the operation will be implicitly transaction protected.
<p></dd>
<dd><code>key</code> - the set of keys <a href="MultipleEntry.html" title="class in com.sleepycat.db"><code>MultipleEntry</code></a> operated on.
<p></dd>
<dd><code>data</code> - the set of data <a href="MultipleEntry.html" title="class in com.sleepycat.db"><code>MultipleEntry</code></a> stored.
<p></dd>
<dd><code>overwrite</code> - if this flag is true and any of the keys already exist in the database, they will be replaced. Otherwise a KEYEXIST error will be returned.
<p></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>If any of the key/data pairs already appear in the database, this method will
return <a href="OperationStatus.html#KEYEXIST"><code>OperationStatus.KEYEXIST</code></a>.
<p></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</a></code> - if the operation was selected to resolve a
deadlock.
<p></dd>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
</dl>
</li>
</ul>
<a name="putMultipleKey-com.sleepycat.db.Transaction-com.sleepycat.db.MultipleEntry-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putMultipleKey</h4>
<pre class="methodSignature">public&nbsp;<a href="OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</a>&nbsp;putMultipleKey&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="MultipleEntry.html" title="class in com.sleepycat.db">MultipleEntry</a>&nbsp;key,
boolean&nbsp;overwrite)
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block"><p>
Store a set of key/data pairs into the database.
<p>
This method may not be called on databases configured with unsorted duplicates.
<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>txn</code> - If the operation is part of an application-specified transaction, the txn
parameter is a Transaction object returned from the
<a href="Environment.html#beginTransaction-com.sleepycat.db.Transaction-com.sleepycat.db.TransactionConfig-"><code>Environment.beginTransaction</code></a> method; if the operation is part of a Berkeley DB
Concurrent Data Store group, the txn parameter is a Transaction object returned
from the <a href="Environment.html#beginCDSGroup--"><code>Environment.beginCDSGroup</code></a> method; otherwise null.
For a transactional database, an explicit transaction may be specified, or null
may be specified to use auto-commit. For a non-transactional database, null
must be specified.
If no transaction handle is specified, but the operation occurs in a transactional
database, the operation will be implicitly transaction protected.
<p></dd>
<dd><code>key</code> - the key and data sets <a href="MultipleEntry.html" title="class in com.sleepycat.db"><code>MultipleEntry</code></a> operated on.
<p></dd>
<dd><code>overwrite</code> - if this flag is true and any of the keys already exist in the database, they will be replaced. Otherwise a KEYEXIST error will be returned.
<p></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>If any of the key/data pairs already appear in the database, this method will
return <a href="OperationStatus.html#KEYEXIST"><code>OperationStatus.KEYEXIST</code></a>.
<p></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</a></code> - if the operation was selected to resolve a
deadlock.
<p></dd>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
</dl>
</li>
</ul>
<a name="putNoDupData-com.sleepycat.db.Transaction-com.sleepycat.db.DatabaseEntry-com.sleepycat.db.DatabaseEntry-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putNoDupData</h4>
<pre class="methodSignature">public&nbsp;<a href="OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</a>&nbsp;putNoDupData&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;key,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;data)
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block"><p>
Store the key/data pair into the database if it does not already appear
in the database.
<p>
This method may only be called if the underlying database has been
configured to support sorted duplicates.
(This method may not be specified to the Queue or Recno access methods.)
<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>txn</code> - If the operation is part of an application-specified transaction, the txn
parameter is a Transaction object returned from the
<a href="Environment.html#beginTransaction-com.sleepycat.db.Transaction-com.sleepycat.db.TransactionConfig-"><code>Environment.beginTransaction</code></a> method; if the operation is part of a Berkeley DB
Concurrent Data Store group, the txn parameter is a Transaction object returned
from the <a href="Environment.html#beginCDSGroup--"><code>Environment.beginCDSGroup</code></a> method; otherwise null.
For a transactional database, an explicit transaction may be specified, or null
may be specified to use auto-commit. For a non-transactional database, null
must be specified.
If no transaction handle is specified, but the operation occurs in a transactional
database, the operation will be implicitly transaction protected.
<p></dd>
<dd><code>key</code> - the key <a href="DatabaseEntry.html" title="class in com.sleepycat.db"><code>DatabaseEntry</code></a> operated on.
<p></dd>
<dd><code>data</code> - the data <a href="DatabaseEntry.html" title="class in com.sleepycat.db"><code>DatabaseEntry</code></a> stored.
<p></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>If the key/data pair already appears in the database, this method will
return <a href="OperationStatus.html#KEYEXIST"><code>OperationStatus.KEYEXIST</code></a>.
<p></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</a></code> - if the operation was selected to resolve a
deadlock.
<p></dd>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
</dl>
</li>
</ul>
<a name="putNoOverwrite-com.sleepycat.db.Transaction-com.sleepycat.db.DatabaseEntry-com.sleepycat.db.DatabaseEntry-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putNoOverwrite</h4>
<pre class="methodSignature">public&nbsp;<a href="OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</a>&nbsp;putNoOverwrite&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;key,
<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;data)
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block"><p>
Store the key/data pair into the database if the key does not already
appear in the database.
<p>
This method will fail if the key already exists in the database, even
if the database supports duplicates.
<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>txn</code> - If the operation is part of an application-specified transaction, the txn
parameter is a Transaction object returned from the
<a href="Environment.html#beginTransaction-com.sleepycat.db.Transaction-com.sleepycat.db.TransactionConfig-"><code>Environment.beginTransaction</code></a> method; if the operation is part of a Berkeley DB
Concurrent Data Store group, the txn parameter is a Transaction object returned
from the <a href="Environment.html#beginCDSGroup--"><code>Environment.beginCDSGroup</code></a> method; otherwise null.
For a transactional database, an explicit transaction may be specified, or null
may be specified to use auto-commit. For a non-transactional database, null
must be specified.
If no transaction handle is specified, but the operation occurs in a transactional
database, the operation will be implicitly transaction protected.
<p></dd>
<dd><code>key</code> - the key <a href="DatabaseEntry.html" title="class in com.sleepycat.db"><code>DatabaseEntry</code></a> operated on.
<p></dd>
<dd><code>data</code> - the data <a href="DatabaseEntry.html" title="class in com.sleepycat.db"><code>DatabaseEntry</code></a> stored.
<p></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>If the key already appears in the database, this method will return
<a href="OperationStatus.html#KEYEXIST"><code>OperationStatus.KEYEXIST</code></a>.
<p></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</a></code> - if the operation was selected to resolve a
deadlock.
<p></dd>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
</dl>
</li>
</ul>
<a name="join-com.sleepycat.db.Cursor:A-com.sleepycat.db.JoinConfig-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>join</h4>
<pre class="methodSignature">public&nbsp;<a href="JoinCursor.html" title="class in com.sleepycat.db">JoinCursor</a>&nbsp;join&#8203;(<a href="Cursor.html" title="class in com.sleepycat.db">Cursor</a>[]&nbsp;cursors,
<a href="JoinConfig.html" title="class in com.sleepycat.db">JoinConfig</a>&nbsp;config)
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Creates a specialized join cursor for use in performing equality or
natural joins on secondary indices.
<p>
Each cursor in the <code>cursors</code> array must have been
initialized to refer to the key on which the underlying database should
be joined. Typically, this initialization is done by calling
<a href="Cursor.html#getSearchKey-com.sleepycat.db.DatabaseEntry-com.sleepycat.db.DatabaseEntry-com.sleepycat.db.LockMode-"><code>Cursor.getSearchKey</code></a>.
<p>
Once the cursors have been passed to this method, they should not be
accessed or modified until the newly created join cursor has been
closed, or else inconsistent results may be returned. However, the
position of the cursors will not be changed by this method or by the
methods of the join cursor.
<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>cursors</code> - an array of cursors associated with this primary
database.
<p></dd>
<dd><code>config</code> - The join attributes. If null, default attributes are used.
<p></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a specialized cursor that returns the results of the equality join
operation.
<p></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="JoinCursor.html" title="class in com.sleepycat.db"><code>JoinCursor</code></a></dd>
</dl>
</li>
</ul>
<a name="truncate-com.sleepycat.db.Transaction-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>truncate</h4>
<pre class="methodSignature">public&nbsp;int&nbsp;truncate&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
boolean&nbsp;countRecords)
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Empty the database, discarding all records it contains.
<p>
When called on a database configured with secondary indices, this
method truncates the primary database and all secondary indices. If
configured to return a count of the records discarded, the returned
count is the count of records discarded from the primary database.
<p>
It is an error to call this method on a database with open cursors.
<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>txn</code> - For a transactional database, an explicit transaction may be specified, or
null may be specified to use auto-commit. For a non-transactional
database, null must be specified.
If no transaction handle is specified, but the operation occurs in a
transactional database, the operation will be implicitly transaction protected.
<p></dd>
<dd><code>countRecords</code> - If true, count and return the number of records discarded.
<p></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The number of records discarded, or -1 if returnCount is false.
<p></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</a></code> - if the operation was selected to resolve a
deadlock.
<p></dd>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
</dl>
</li>
</ul>
<a name="getStats-com.sleepycat.db.Transaction-com.sleepycat.db.StatsConfig-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStats</h4>
<pre class="methodSignature">public&nbsp;<a href="DatabaseStats.html" title="class in com.sleepycat.db">DatabaseStats</a>&nbsp;getStats&#8203;(<a href="Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
<a href="StatsConfig.html" title="class in com.sleepycat.db">StatsConfig</a>&nbsp;config)
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Return database statistics.
<p>
If this method has not been configured to avoid expensive operations
(using the <a href="StatsConfig.html#setFast-boolean-"><code>StatsConfig.setFast</code></a> method), it will access
some of or all the pages in the database, incurring a severe
performance penalty as well as possibly flushing the underlying
buffer pool.
<p>
In the presence of multiple threads or processes accessing an active
database, the information returned by this method may be out-of-date.
<p>
If the database was not opened read-only and this method was not
configured using the <a href="StatsConfig.html#setFast-boolean-"><code>StatsConfig.setFast</code></a> method, cached
key and record numbers will be updated after the statistical
information has been gathered.
<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>txn</code> - If the operation is part of an application-specified transaction, the txn
parameter is a Transaction object returned from the
<a href="Environment.html#beginTransaction-com.sleepycat.db.Transaction-com.sleepycat.db.TransactionConfig-"><code>Environment.beginTransaction</code></a> method; if the operation is part of a Berkeley DB
Concurrent Data Store group, the txn parameter is a Transaction object returned
from the <a href="Environment.html#beginCDSGroup--"><code>Environment.beginCDSGroup</code></a> method; otherwise null.
For a transactional database, an explicit transaction may be specified to
transaction-protect the operation, or null may be specified to perform the
operation without transaction protection. For a non-transactional
database, null must be specified.
If no transaction handle is specified, but the operation occurs in a
transactional database, the operation will be implicitly transaction protected.
<p></dd>
<dd><code>config</code> - The statistics returned; if null, default statistics are returned.
<p></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Database statistics.
<p></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</a></code> - if the operation was selected to resolve a
deadlock.
<p></dd>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
</dl>
</li>
</ul>
<a name="printStats-com.sleepycat.db.StatsConfig-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>printStats</h4>
<pre class="methodSignature">public&nbsp;int&nbsp;printStats&#8203;(<a href="StatsConfig.html" title="class in com.sleepycat.db">StatsConfig</a>&nbsp;config)
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Print database statistics to a specified output channel (see the
setMsgfile() method for more information), or passed to an application
callback function (see the setMsgcall() method for more information).
<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>config</code> - The statistics returned; if null, default statistics are returned.
<p></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A non-zero error value on failure and 0 on success.
<p></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</a></code> - if the operation was selected to resolve a
deadlock.
<p></dd>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
</dl>
</li>
</ul>
<a name="remove-java.lang.String-java.lang.String-com.sleepycat.db.DatabaseConfig-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>remove</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;remove&#8203;(java.lang.String&nbsp;fileName,
java.lang.String&nbsp;databaseName,
<a href="DatabaseConfig.html" title="class in com.sleepycat.db">DatabaseConfig</a>&nbsp;config)
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a>,
java.io.FileNotFoundException</pre>
<div class="block"><p>
Remove the database specified by the file and database parameters.
<p>
If no database is specified, the underlying file specified is removed,
incidentally removing all of the databases it contained..
<p>
Applications should never remove databases with open <a href="Database.html" title="class in com.sleepycat.db"><code>Database</code></a>
handles, or in the case of removing a file, when any database in the
file has an open handle. For example, some architectures do not permit
the removal of files with open system handles. On these architectures,
attempts to remove databases currently in use by any thread of control
in the system may fail.
<p>
If the database was opened within a database environment, the
environment variable DB_HOME may be used as the path of the database
environment home.
This method may not be called after calling the open method on any database handle.
If the open method has already been called on a database handle,
close the existing handle and create a new one before calling the remove method.
This method should not be called if the remove is intended to be transactionally safe;
the <a href="Environment.html#removeDatabase-com.sleepycat.db.Transaction-java.lang.String-java.lang.String-"><code>Environment.removeDatabase</code></a> method should be used instead.
<p>
This method is affected by any database directory specified with
<a href="EnvironmentConfig.html#addDataDir-java.io.File-"><code>EnvironmentConfig.addDataDir</code></a>, or by setting the "set_data_dir"
string in the database environment's DB_CONFIG file.
<p>
The <a href="Database.html" title="class in com.sleepycat.db"><code>Database</code></a> handle may not be accessed
again after this method is called, regardless of this method's success
or failure.
<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>fileName</code> - The physical file which contains the database to be removed.
On Windows platforms, this argument will be interpreted as a UTF-8
string, which is equivalent to ASCII for Latin characters.
<p></dd>
<dd><code>databaseName</code> - The database to be removed.
<p></dd>
<dd><code>config</code> - The database remove attributes. If null, default attributes are used.
<p></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
<dd><code>java.io.FileNotFoundException</code> - if the database file does not exist</dd>
</dl>
</li>
</ul>
<a name="rename-java.lang.String-java.lang.String-java.lang.String-com.sleepycat.db.DatabaseConfig-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rename</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;rename&#8203;(java.lang.String&nbsp;fileName,
java.lang.String&nbsp;oldDatabaseName,
java.lang.String&nbsp;newDatabaseName,
<a href="DatabaseConfig.html" title="class in com.sleepycat.db">DatabaseConfig</a>&nbsp;config)
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a>,
java.io.FileNotFoundException</pre>
<div class="block"><p>
Rename a database specified by the file and database parameters.
<p>
If no database name is specified, the underlying file specified is
renamed, incidentally renaming all of the databases it contains.
<p>
Applications should never rename databases that are currently in use.
If an underlying file is being renamed and logging is currently enabled
in the database environment, no database in the file may be open when
this method is called. In particular, some architectures do not permit
renaming files with open handles. On these architectures, attempts to
rename databases that are currently in use by any thread of control in
the system may fail.
<p>
If the database was opened within a database environment, the
environment variable DB_HOME may be used as the path of the database
environment home. This method should not be called if the rename is intended
to be transactionally safe; the
<a href="Environment.html#renameDatabase-com.sleepycat.db.Transaction-java.lang.String-java.lang.String-java.lang.String-"><code>Environment.renameDatabase</code></a> method should be used instead.
<p>
This method is affected by any database directory specified with
<a href="EnvironmentConfig.html#addDataDir-java.io.File-"><code>EnvironmentConfig.addDataDir</code></a>, or by setting the "set_data_dir"
string in the database environment's DB_CONFIG file.
This method may not be called after calling the open method on any database handle.
If the open method has already been called on a database handle,
close the existing handle and create a new one before calling the rename method.
<p>
The <a href="Database.html" title="class in com.sleepycat.db"><code>Database</code></a> handle may not be accessed
again after this method is called, regardless of this method's success
or failure.
<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>fileName</code> - The physical file which contains the database to be renamed.
On Windows platforms, this argument will be interpreted as a UTF-8
string, which is equivalent to ASCII for Latin characters.
<p></dd>
<dd><code>oldDatabaseName</code> - The database to be renamed.
<p></dd>
<dd><code>newDatabaseName</code> - The new name of the database or file.
<p></dd>
<dd><code>config</code> - The database rename attributes. If null, default attributes are used.
<p></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
<dd><code>java.io.FileNotFoundException</code> - if the database file does not exist</dd>
</dl>
</li>
</ul>
<a name="sortMultipleKeyData-com.sleepycat.db.MultipleKeyDataEntry-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sortMultipleKeyData</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;sortMultipleKeyData&#8203;(<a href="MultipleKeyDataEntry.html" title="class in com.sleepycat.db">MultipleKeyDataEntry</a>&nbsp;entries)
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Sorts a DatabaseEntry with multiple matching key/data pairs.
<p>
If specified, the application specific btree comparison and duplicate
comparison functions will be used.
<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>entries</code> - A MultipleKeyDataEntry that contains matching pairs of key/data items,
the sorted entries will be returned in the original entries object.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
</dl>
</li>
</ul>
<a name="sortMultipleKeyOrData-com.sleepycat.db.MultipleDataEntry-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sortMultipleKeyOrData</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;sortMultipleKeyOrData&#8203;(<a href="MultipleDataEntry.html" title="class in com.sleepycat.db">MultipleDataEntry</a>&nbsp;entries)
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Sorts a DatabaseEntry with multiple key or data pairs.
<p>
If specified, the application specific btree comparison function will be
used.
<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>entries</code> - A MultipleDataEntry that contains multiple key or data items,
the sorted entries will be returned in the original entries object.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
</dl>
</li>
</ul>
<a name="sortMultipleKeyAndData-com.sleepycat.db.MultipleDataEntry-com.sleepycat.db.MultipleDataEntry-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sortMultipleKeyAndData</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;sortMultipleKeyAndData&#8203;(<a href="MultipleDataEntry.html" title="class in com.sleepycat.db">MultipleDataEntry</a>&nbsp;keys,
<a href="MultipleDataEntry.html" title="class in com.sleepycat.db">MultipleDataEntry</a>&nbsp;datas)
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Sorts two DatabaseEntry objects with multiple key and data pairs.
<p>
If specified, the application specific btree comparison and duplicate
comparison functions will be used.
<p>
The key and data parameters must contain "pairs" of items. That is the n-th
entry in keys corresponds to the n-th entry in datas.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>keys</code> - A MultipleDataEntry that contains multiple key items, the sorted entries
will be returned in the original entries object.</dd>
<dd><code>datas</code> - A MultipleDataEntry that contains multiple data items, the sorted entries
will be returned in the original entries object.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
</dl>
</li>
</ul>
<a name="sync--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sync</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;sync()
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Flush any cached information to disk.
<p>
If the database is in memory only, this method has no effect and
will always succeed.
<p>
<b>It is important to understand that flushing cached information to
disk only minimizes the window of opportunity for corrupted data.</b>
<p>
Although unlikely, it is possible for database corruption to happen
if a system or application crash occurs while writing data to the
database. To ensure that database corruption never occurs,
applications must either: use transactions and logging with
automatic recovery; use logging and application-specific recovery;
or edit a copy of the database, and once all applications using the
database have successfully closed the copy of the database,
atomically replace the original database with the updated copy.
<p></div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
</dl>
</li>
</ul>
<a name="upgrade-java.lang.String-com.sleepycat.db.DatabaseConfig-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>upgrade</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;upgrade&#8203;(java.lang.String&nbsp;fileName,
<a href="DatabaseConfig.html" title="class in com.sleepycat.db">DatabaseConfig</a>&nbsp;config)
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a>,
java.io.FileNotFoundException</pre>
<div class="block">Upgrade all of the databases included in the specified file.
<p>
If no upgrade is necessary, always returns success.
<p>
<b>
Database upgrades are done in place and are destructive. For example,
if pages need to be allocated and no disk space is available, the
database may be left corrupted. Backups should be made before databases
are upgraded.
</b>
<p>
<b>
The following information is only meaningful when upgrading databases
from releases before the Berkeley DB 3.1 release:
</b>
<p>
As part of the upgrade from the Berkeley DB 3.0 release to the 3.1
release, the on-disk format of duplicate data items changed. To
correctly upgrade the format requires applications to specify
whether duplicate data items in the database are sorted or not.
Configuring the database object to support sorted duplicates by the
<a href="DatabaseConfig.html#setSortedDuplicates-boolean-"><code>DatabaseConfig.setSortedDuplicates</code></a> method informs this
method that the duplicates are sorted; otherwise they are assumed
to be unsorted. Incorrectly specifying this configuration
information may lead to database corruption.
<p>
Further, because this method upgrades a physical file (including all
the databases it contains), it is not possible to use this method
to upgrade files in which some of the databases it includes have
sorted duplicate data items, and some of the databases it includes
have unsorted duplicate data items. If the file does not have more
than a single database, if the databases do not support duplicate
data items, or if all of the databases that support duplicate data
items support the same style of duplicates (either sorted or
unsorted), this method will work correctly as long as the duplicate
configuration is correctly specified. Otherwise, the file cannot
be upgraded using this method; it must be upgraded manually by
dumping and reloading the databases.
<p>
Unlike all other database operations, upgrades may only be done on
a system with the same byte-order as the database.
<p>
If the database was opened within a database environment, the
environment variable DB_HOME may be used as the path of the database
environment home.
<p>
This method is affected by any database directory specified with
<a href="EnvironmentConfig.html#addDataDir-java.io.File-"><code>EnvironmentConfig.addDataDir</code></a>, or by setting the "set_data_dir"
string in the database environment's DB_CONFIG file.
<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>fileName</code> - The physical file containing the databases to be upgraded.
<p></dd>
<dd><code>config</code> - The database attributes. If null, default attributes are used.
<p></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
<dd><code>java.io.FileNotFoundException</code> - if the database file does not exist</dd>
</dl>
</li>
</ul>
<a name="convert-java.lang.String-boolean-com.sleepycat.db.DatabaseConfig-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convert</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;convert&#8203;(java.lang.String&nbsp;fileName,
boolean&nbsp;useBigEndian,
<a href="DatabaseConfig.html" title="class in com.sleepycat.db">DatabaseConfig</a>&nbsp;config)
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a>,
java.io.FileNotFoundException</pre>
<div class="block">Convert the byte order of all the databases included in the specified file.
<p>
If no conversion is necessary, always returns success.
<p>
If the database is partitioned, config must contain the correct partition
configuration in order to convert database partitions.
<p>
<b>
Database conversions are done in place and are destructive. For example,
if pages need to be allocated and no disk space is available, the
database may be left corrupted. Backups should be made before databases
are converted.
</b>
If the database was opened within a database environment, the
environment variable DB_HOME may be used as the path of the database
environment home.
<p>
This method is affected by any database directory specified with
<a href="EnvironmentConfig.html#addDataDir-java.io.File-"><code>EnvironmentConfig.addDataDir</code></a>, or by setting the "set_data_dir"
string in the database environment's DB_CONFIG file.
<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>fileName</code> - The physical file containing the databases to be converted.
<p></dd>
<dd><code>useBigEndian</code> - If true, the databases are converted to big-endian;
otherwise, they are converted to little-endian.
<p></dd>
<dd><code>config</code> - The database attributes. If null, default attributes are used.
<p></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
<dd><code>java.io.FileNotFoundException</code> - if the database file does not exist</dd>
</dl>
</li>
</ul>
<a name="verify-java.lang.String-java.lang.String-java.io.PrintStream-com.sleepycat.db.VerifyConfig-com.sleepycat.db.DatabaseConfig-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>verify</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;verify&#8203;(java.lang.String&nbsp;fileName,
java.lang.String&nbsp;databaseName,
java.io.PrintStream&nbsp;dumpStream,
<a href="VerifyConfig.html" title="class in com.sleepycat.db">VerifyConfig</a>&nbsp;verifyConfig,
<a href="DatabaseConfig.html" title="class in com.sleepycat.db">DatabaseConfig</a>&nbsp;dbConfig)
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a>,
java.io.FileNotFoundException</pre>
<div class="block">Return if all of the databases in a file are uncorrupted.
<p>
This method optionally outputs the databases' key/data pairs to a
file stream.
<p>
<b>
This method does not perform any locking, even in database
environments are configured with a locking subsystem. As such, it
should only be used on files that are not being modified by another
thread of control.
</b>
<p>
This method may not be called after the database is opened.
<p>
If the database was opened within a database environment, the
environment variable DB_HOME may be used as the path of the database
environment home.
<p>
This method is affected by any database directory specified with
<a href="EnvironmentConfig.html#addDataDir-java.io.File-"><code>EnvironmentConfig.addDataDir</code></a>, or by setting the "set_data_dir"
string in the database environment's DB_CONFIG file.
<p>
The <a href="Database.html" title="class in com.sleepycat.db"><code>Database</code></a> handle may not be accessed
again after this method is called, regardless of this method's success
or failure.
<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>fileName</code> - The physical file in which the databases to be verified are found.
<p></dd>
<dd><code>databaseName</code> - The database in the file on which the database checks for btree and
duplicate sort order and for hashing are to be performed. This
parameter should be set to null except when the operation has been
been configured by <a href="VerifyConfig.html#setOrderCheckOnly-boolean-"><code>VerifyConfig.setOrderCheckOnly</code></a>.
<p></dd>
<dd><code>dumpStream</code> - An optional file stream to which the databases' key/data pairs are
written. This parameter should be set to null except when the
operation has been been configured by <a href="VerifyConfig.html#setSalvage-boolean-"><code>VerifyConfig.setSalvage</code></a>.
<p></dd>
<dd><code>verifyConfig</code> - The verify operation attributes. If null, default attributes are used.
<p></dd>
<dd><code>dbConfig</code> - The database attributes. If null, default attributes are used.
<p></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>True, if all of the databases in the file are uncorrupted. If this
method returns false, and the operation was configured by
<a href="VerifyConfig.html#setSalvage-boolean-"><code>VerifyConfig.setSalvage</code></a>, all of the key/data pairs in the
file may not have been successfully output.
<p></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
<dd><code>java.io.FileNotFoundException</code> - if the database file does not exist</dd>
</dl>
</li>
</ul>
<a name="setMsgfile-java.io.File-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMsgfile</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setMsgfile&#8203;(java.io.File&nbsp;file)
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Sets the path of a file to store statistical information.
<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>file</code> - The path of a file to store statistical information.
<p></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
</dl>
</li>
</ul>
<a name="getSlices--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSlices</h4>
<pre class="methodSignature">public&nbsp;<a href="Database.html" title="class in com.sleepycat.db">Database</a>[]&nbsp;getSlices()
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block"><p>
Get the Database handles of the underlying slices of the database.
<p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an array of Database handles of the underlying slices of the
sliced database.
<p></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
</dl>
</li>
</ul>
<a name="sliceLookup-com.sleepycat.db.DatabaseEntry-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>sliceLookup</h4>
<pre class="methodSignature">public&nbsp;<a href="Database.html" title="class in com.sleepycat.db">Database</a>&nbsp;sliceLookup&#8203;(<a href="DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</a>&nbsp;key)
throws <a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block"><p>
Get the Database handle of the slice that contains the given key.
<p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - a key <a href="DatabaseEntry.html" title="class in com.sleepycat.db"><code>DatabaseEntry</code></a> that contains
a value stored in the sliced database.
<p></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The Database handle of the slice that contains the key.
<p></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - if a failure occurs.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Database.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><b>Berkeley DB</b><br><font size="-1"> version 18.1.40</font></div>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small><font size=1>Copyright (c) 1996, 2020 Oracle and/or its affiliates. All rights reserved.</font></small></p>
</body>
</html>