1171 lines
80 KiB
HTML
1171 lines
80 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 (1.8.0_151) on Tue Oct 31 17:36:46 EDT 2017 -->
|
|
<title>SecondaryDatabase (Oracle - Berkeley DB Java Edition API)</title>
|
|
<meta name="date" content="2017-10-31">
|
|
<link rel="stylesheet" type="text/css" href="../../../style.css" title="Style">
|
|
<script type="text/javascript" src="../../../script.js"></script>
|
|
</head>
|
|
<body>
|
|
<script type="text/javascript"><!--
|
|
try {
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="SecondaryDatabase (Oracle - Berkeley DB Java Edition API)";
|
|
}
|
|
}
|
|
catch(err) {
|
|
}
|
|
//-->
|
|
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":42,"i12":10,"i13":10,"i14":10,"i15":42,"i16":10,"i17":10,"i18":10,"i19":10};
|
|
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]};
|
|
var altColor = "altColor";
|
|
var rowColor = "rowColor";
|
|
var tableTab = "tableTab";
|
|
var activeTableTab = "activeTableTab";
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<!-- ========= 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="../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="class-use/SecondaryDatabase.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 Java Edition</b><br><font size=\"-1\"> version 7.5.11</font>
|
|
</div>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../com/sleepycat/je/SecondaryCursor.html" title="class in com.sleepycat.je"><span class="typeNameLink">Prev Class</span></a></li>
|
|
<li><a href="../../../com/sleepycat/je/SecondaryIntegrityException.html" title="class in com.sleepycat.je"><span class="typeNameLink">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../index.html?com/sleepycat/je/SecondaryDatabase.html" target="_top">Frames</a></li>
|
|
<li><a href="SecondaryDatabase.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_top">
|
|
<li><a href="../../../allclasses-noframe.html">All Classes</a></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>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li>Field | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip.navbar.top">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<div class="header">
|
|
<div class="subTitle">com.sleepycat.je</div>
|
|
<h2 title="Class SecondaryDatabase" class="title">Class SecondaryDatabase</h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<ul class="inheritance">
|
|
<li>java.lang.Object</li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li><a href="../../../com/sleepycat/je/Database.html" title="class in com.sleepycat.je">com.sleepycat.je.Database</a></li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>com.sleepycat.je.SecondaryDatabase</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<dl>
|
|
<dt>All Implemented Interfaces:</dt>
|
|
<dd>java.io.Closeable, java.lang.AutoCloseable</dd>
|
|
</dl>
|
|
<hr>
|
|
<br>
|
|
<pre>public class <span class="typeNameLabel">SecondaryDatabase</span>
|
|
extends <a href="../../../com/sleepycat/je/Database.html" title="class in com.sleepycat.je">Database</a></pre>
|
|
<div class="block">A secondary database handle.
|
|
|
|
<p>Secondary databases are opened with <a href="../../../com/sleepycat/je/Environment.html#openSecondaryDatabase-com.sleepycat.je.Transaction-java.lang.String-com.sleepycat.je.Database-com.sleepycat.je.SecondaryConfig-"><code>Environment.openSecondaryDatabase</code></a> and are
|
|
always associated with a single primary database. The distinguishing
|
|
characteristics of a secondary database are:</p>
|
|
|
|
<ul>
|
|
<li>Records are automatically added to a secondary database when records are
|
|
added, modified and deleted in the primary database. Direct calls to
|
|
<code>put()</code> methods on a secondary database are prohibited.</li>
|
|
<li>The <a href="../../../com/sleepycat/je/SecondaryDatabase.html#delete-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.WriteOptions-"><code>delete</code></a> method of a secondary database will delete
|
|
the primary record and as well as all its associated secondary records.</li>
|
|
<li>Calls to all <code>get()</code> methods will return the data from the
|
|
associated primary database.</li>
|
|
<li>Additional <code>get()</code> method signatures are provided to return
|
|
the primary key in an additional <code>pKey</code> parameter.</li>
|
|
<li>Calls to <a href="../../../com/sleepycat/je/SecondaryDatabase.html#openCursor-com.sleepycat.je.Transaction-com.sleepycat.je.CursorConfig-"><code>openCursor</code></a> will return a <a href="../../../com/sleepycat/je/SecondaryCursor.html" title="class in com.sleepycat.je"><code>SecondaryCursor</code></a>, which itself has <code>get()</code> methods that return
|
|
the data of the primary database and additional <code>get()</code> method
|
|
signatures for returning the primary key.</li>
|
|
</ul>
|
|
<p>Before opening or creating a secondary database you must implement
|
|
the <a href="../../../com/sleepycat/je/SecondaryKeyCreator.html" title="interface in com.sleepycat.je"><code>SecondaryKeyCreator</code></a> or <a href="../../../com/sleepycat/je/SecondaryMultiKeyCreator.html" title="interface in com.sleepycat.je"><code>SecondaryMultiKeyCreator</code></a>
|
|
interface.</p>
|
|
|
|
<p>For example, to create a secondary database that supports duplicates:</p>
|
|
|
|
<pre>
|
|
Database primaryDb; // The primary database must already be open.
|
|
SecondaryKeyCreator keyCreator; // Your key creator implementation.
|
|
SecondaryConfig secConfig = new SecondaryConfig();
|
|
secConfig.setAllowCreate(true);
|
|
secConfig.setSortedDuplicates(true);
|
|
secConfig.setKeyCreator(keyCreator);
|
|
SecondaryDatabase newDb = env.openSecondaryDatabase(transaction,
|
|
"myDatabaseName",
|
|
primaryDb,
|
|
secConfig)
|
|
</pre>
|
|
|
|
<p>If a primary database is to be associated with one or more secondary
|
|
databases, it may not be configured for duplicates.</p>
|
|
|
|
<p><b>WARNING:</b> The associations between primary and secondary databases
|
|
are not stored persistently. Whenever a primary database is opened for
|
|
write access by the application, the appropriate associated secondary
|
|
databases should also be opened by the application. This is necessary to
|
|
ensure data integrity when changes are made to the primary database. If the
|
|
secondary database is not opened, it will not be updated when the primary is
|
|
updated, and the references between the databases will become invalid.
|
|
(Note that this warning does not apply when using the <a href="../../../com/sleepycat/persist/package-summary.html"><code>DPL</code></a>, which does store secondary relationships
|
|
persistently.)</p>
|
|
|
|
<h3><a name="transactions">Special considerations for using Secondary
|
|
Databases with and without Transactions</a></h3>
|
|
|
|
<p>Normally, during a primary database write operation (insert, update or
|
|
delete), all associated secondary databases are also updated. However, when
|
|
an exception occurs during the write operation, the updates may be
|
|
incomplete. If the databases are transactional, this is handled by aborting
|
|
the transaction to undo the incomplete operation. If an auto-commit
|
|
transaction is used (null is passed for the transaction), the transaction
|
|
will be aborted automatically. If an explicit transaction is used, it
|
|
must be aborted by the application caller after the exception is caught.</p>
|
|
|
|
<p>However, if the databases are non-transactional, integrity problems can
|
|
result when an exception occurs during the write operation. Because the
|
|
write operation is not made atomic by a transaction, references between the
|
|
databases will become invalid if the operation is incomplete. This results
|
|
in a <a href="../../../com/sleepycat/je/SecondaryIntegrityException.html" title="class in com.sleepycat.je"><code>SecondaryIntegrityException</code></a> when attempting to access the
|
|
databases later.</p>
|
|
|
|
<p>A secondary integrity problem is persistent; it cannot be resolved by
|
|
reopening the databases or the environment. The only way to resolve the
|
|
problem is to restore the environment from a valid backup, or, if the
|
|
integrity of the primary database is assumed, to remove and recreate all
|
|
secondary databases.</p>
|
|
|
|
<p>Therefore, secondary databases and indexes should always be used in
|
|
conjunction with transactional databases and stores. Without transactions,
|
|
it is the responsibility of the application to handle the results of the
|
|
incomplete write operation or to take steps to prevent this situation from
|
|
happening in the first place.</p>
|
|
|
|
<p>The following exceptions may be thrown during a write operation, and may
|
|
cause an integrity problem in the absence of transactions.</p>
|
|
<ul>
|
|
<li><a href="../../../com/sleepycat/je/SecondaryConstraintException.html" title="class in com.sleepycat.je"><code>SecondaryConstraintException</code></a>, see its subclasses for more
|
|
information.</li>
|
|
<li><a href="../../../com/sleepycat/je/LockConflictException.html" title="class in com.sleepycat.je"><code>LockConflictException</code></a>, when more than one thread is accessing
|
|
the databases.</li>
|
|
<li><a href="../../../com/sleepycat/je/EnvironmentFailureException.html" title="class in com.sleepycat.je"><code>EnvironmentFailureException</code></a>, if an unexpected or system failure
|
|
occurs.</li>
|
|
<li>There is always the possibility of an <code>Error</code> or an unintended
|
|
<code>RuntimeException</code>.</li>
|
|
</ul></div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
|
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd"> </span></span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Method and Description</th>
|
|
</tr>
|
|
<tr id="i0" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/SecondaryDatabase.html#close--">close</a></span>()</code>
|
|
<div class="block">Closes a secondary database and dis-associates it from its primary
|
|
database.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i1" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../com/sleepycat/je/OperationStatus.html" title="enum in com.sleepycat.je">OperationStatus</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/SecondaryDatabase.html#delete-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-">delete</a></span>(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> key)</code>
|
|
<div class="block">Deletes the record associated with the given secondary key.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i2" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../com/sleepycat/je/OperationResult.html" title="class in com.sleepycat.je">OperationResult</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/SecondaryDatabase.html#delete-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.WriteOptions-">delete</a></span>(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> key,
|
|
<a href="../../../com/sleepycat/je/WriteOptions.html" title="class in com.sleepycat.je">WriteOptions</a> options)</code>
|
|
<div class="block">Deletes the record associated with the given secondary key.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i3" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../com/sleepycat/je/OperationResult.html" title="class in com.sleepycat.je">OperationResult</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/SecondaryDatabase.html#get-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.Get-com.sleepycat.je.ReadOptions-">get</a></span>(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> key,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> pKey,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> data,
|
|
<a href="../../../com/sleepycat/je/Get.html" title="enum in com.sleepycat.je">Get</a> getType,
|
|
<a href="../../../com/sleepycat/je/ReadOptions.html" title="class in com.sleepycat.je">ReadOptions</a> options)</code>
|
|
<div class="block">Retrieves a record according to the specified <a href="../../../com/sleepycat/je/Get.html" title="enum in com.sleepycat.je"><code>Get</code></a> type.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i4" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../com/sleepycat/je/OperationStatus.html" title="enum in com.sleepycat.je">OperationStatus</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/SecondaryDatabase.html#get-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">get</a></span>(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> key,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> pKey,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> data,
|
|
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a> lockMode)</code>
|
|
<div class="block">Retrieves the key/data pair with the given key.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i5" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../com/sleepycat/je/OperationResult.html" title="class in com.sleepycat.je">OperationResult</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/SecondaryDatabase.html#get-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.Get-com.sleepycat.je.ReadOptions-">get</a></span>(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> key,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> data,
|
|
<a href="../../../com/sleepycat/je/Get.html" title="enum in com.sleepycat.je">Get</a> getType,
|
|
<a href="../../../com/sleepycat/je/ReadOptions.html" title="class in com.sleepycat.je">ReadOptions</a> options)</code>
|
|
<div class="block">Moves the cursor to a record according to the specified <a href="../../../com/sleepycat/je/Get.html" title="enum in com.sleepycat.je"><code>Get</code></a>
|
|
type.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i6" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../com/sleepycat/je/OperationStatus.html" title="enum in com.sleepycat.je">OperationStatus</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/SecondaryDatabase.html#get-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">get</a></span>(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> key,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> data,
|
|
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a> lockMode)</code>
|
|
<div class="block">Retrieves the key/data pair with the given key.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i7" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../com/sleepycat/je/SecondaryConfig.html" title="class in com.sleepycat.je">SecondaryConfig</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/SecondaryDatabase.html#getConfig--">getConfig</a></span>()</code>
|
|
<div class="block">Returns a copy of the secondary configuration of this database.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i8" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../com/sleepycat/je/Database.html" title="class in com.sleepycat.je">Database</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/SecondaryDatabase.html#getPrimaryDatabase--">getPrimaryDatabase</a></span>()</code>
|
|
<div class="block">Returns the primary database associated with this secondary database.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i9" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../com/sleepycat/je/OperationStatus.html" title="enum in com.sleepycat.je">OperationStatus</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/SecondaryDatabase.html#getSearchBoth-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">getSearchBoth</a></span>(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> key,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> pKey,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> data,
|
|
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a> lockMode)</code>
|
|
<div class="block">Retrieves the key/data pair with the specified secondary and primary
|
|
key, that is, both the primary and secondary key items must match.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i10" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../com/sleepycat/je/OperationStatus.html" title="enum in com.sleepycat.je">OperationStatus</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/SecondaryDatabase.html#getSearchBoth-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">getSearchBoth</a></span>(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> key,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> data,
|
|
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a> lockMode)</code>
|
|
<div class="block">This operation is not allowed with this method signature.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i11" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../com/sleepycat/je/SecondaryConfig.html" title="class in com.sleepycat.je">SecondaryConfig</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/SecondaryDatabase.html#getSecondaryConfig--">getSecondaryConfig</a></span>()</code>
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="block"><span class="deprecationComment">As of JE 4.0.13, replaced by <a href="../../../com/sleepycat/je/SecondaryDatabase.html#getConfig--"><code>getConfig()</code></a>.</span></div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i12" class="altColor">
|
|
<td class="colFirst"><code>java.util.List<<a href="../../../com/sleepycat/je/SecondaryDatabase.html" title="class in com.sleepycat.je">SecondaryDatabase</a>></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/SecondaryDatabase.html#getSecondaryDatabases--">getSecondaryDatabases</a></span>()</code>
|
|
<div class="block">Returns an empty list, since this database is itself a secondary
|
|
database.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i13" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../com/sleepycat/je/JoinCursor.html" title="class in com.sleepycat.je">JoinCursor</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/SecondaryDatabase.html#join-com.sleepycat.je.Cursor:A-com.sleepycat.je.JoinConfig-">join</a></span>(<a href="../../../com/sleepycat/je/Cursor.html" title="class in com.sleepycat.je">Cursor</a>[] cursors,
|
|
<a href="../../../com/sleepycat/je/JoinConfig.html" title="class in com.sleepycat.je">JoinConfig</a> config)</code>
|
|
<div class="block">This operation is not allowed on a secondary database.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i14" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../com/sleepycat/je/SecondaryCursor.html" title="class in com.sleepycat.je">SecondaryCursor</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/SecondaryDatabase.html#openCursor-com.sleepycat.je.Transaction-com.sleepycat.je.CursorConfig-">openCursor</a></span>(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/je/CursorConfig.html" title="class in com.sleepycat.je">CursorConfig</a> cursorConfig)</code>
|
|
<div class="block">Obtain a cursor on a database, returning a <code>SecondaryCursor</code>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i15" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../com/sleepycat/je/SecondaryCursor.html" title="class in com.sleepycat.je">SecondaryCursor</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/SecondaryDatabase.html#openSecondaryCursor-com.sleepycat.je.Transaction-com.sleepycat.je.CursorConfig-">openSecondaryCursor</a></span>(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/je/CursorConfig.html" title="class in com.sleepycat.je">CursorConfig</a> cursorConfig)</code>
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="block"><span class="deprecationComment">As of JE 4.0.13, replaced by <a href="../../../com/sleepycat/je/SecondaryDatabase.html#openCursor-com.sleepycat.je.Transaction-com.sleepycat.je.CursorConfig-"><code>openCursor(com.sleepycat.je.Transaction, com.sleepycat.je.CursorConfig)</code></a>.</p></span></div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i16" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../com/sleepycat/je/OperationStatus.html" title="enum in com.sleepycat.je">OperationStatus</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/SecondaryDatabase.html#put-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-">put</a></span>(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> key,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> data)</code>
|
|
<div class="block">This operation is not allowed on a secondary database.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i17" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../com/sleepycat/je/OperationResult.html" title="class in com.sleepycat.je">OperationResult</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/SecondaryDatabase.html#put-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.Put-com.sleepycat.je.WriteOptions-">put</a></span>(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> key,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> data,
|
|
<a href="../../../com/sleepycat/je/Put.html" title="enum in com.sleepycat.je">Put</a> putType,
|
|
<a href="../../../com/sleepycat/je/WriteOptions.html" title="class in com.sleepycat.je">WriteOptions</a> options)</code>
|
|
<div class="block">This operation is not allowed on a secondary database.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i18" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../com/sleepycat/je/OperationStatus.html" title="enum in com.sleepycat.je">OperationStatus</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/SecondaryDatabase.html#putNoDupData-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-">putNoDupData</a></span>(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> key,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> data)</code>
|
|
<div class="block">This operation is not allowed on a secondary database.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i19" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../com/sleepycat/je/OperationStatus.html" title="enum in com.sleepycat.je">OperationStatus</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/SecondaryDatabase.html#putNoOverwrite-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-">putNoOverwrite</a></span>(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> key,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> data)</code>
|
|
<div class="block">This operation is not allowed on a secondary database.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="methods.inherited.from.class.com.sleepycat.je.Database">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class com.sleepycat.je.<a href="../../../com/sleepycat/je/Database.html" title="class in com.sleepycat.je">Database</a></h3>
|
|
<code><a href="../../../com/sleepycat/je/Database.html#compareDuplicates-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-">compareDuplicates</a>, <a href="../../../com/sleepycat/je/Database.html#compareKeys-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-">compareKeys</a>, <a href="../../../com/sleepycat/je/Database.html#count--">count</a>, <a href="../../../com/sleepycat/je/Database.html#count-long-">count</a>, <a href="../../../com/sleepycat/je/Database.html#getDatabaseName--">getDatabaseName</a>, <a href="../../../com/sleepycat/je/Database.html#getEnvironment--">getEnvironment</a>, <a href="../../../com/sleepycat/je/Database.html#getStats-com.sleepycat.je.StatsConfig-">getStats</a>, <a href="../../../com/sleepycat/je/Database.html#openCursor-com.sleepycat.je.DiskOrderedCursorConfig-">openCursor</a>, <a href="../../../com/sleepycat/je/Database.html#openSequence-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.SequenceConfig-">openSequence</a>, <a href="../../../com/sleepycat/je/Database.html#preload-long-">preload</a>, <a href="../../../com/sleepycat/je/Database.html#preload-long-long-">preload</a>, <a href="../../../com/sleepycat/je/Database.html#preload-com.sleepycat.je.PreloadConfig-">preload</a>, <a href="../../../com/sleepycat/je/Database.html#removeSequence-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-">removeSequence</a>, <a href="../../../com/sleepycat/je/Database.html#sync--">sync</a>, <a href="../../../com/sleepycat/je/Database.html#verify-com.sleepycat.je.VerifyConfig-">verify</a></code></li>
|
|
</ul>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class 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">
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a name="close--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>close</h4>
|
|
<pre>public void close()</pre>
|
|
<div class="block">Closes a secondary database and dis-associates it from its primary
|
|
database. A secondary database should be closed before closing its
|
|
associated primary database.
|
|
|
|
Discards the database handle.
|
|
<p>
|
|
When closing the last open handle for a deferred-write database, any
|
|
cached database information is flushed to disk as if <a href="../../../com/sleepycat/je/Database.html#sync--"><code>Database.sync()</code></a> were
|
|
called.
|
|
<p>
|
|
The database handle should not be closed while any other handle that
|
|
refers to it is not yet closed; for example, database handles should not
|
|
be closed while cursor handles into the database remain open, or
|
|
transactions that include operations on the database have not yet been
|
|
committed or aborted. Specifically, this includes <a href="../../../com/sleepycat/je/Cursor.html" title="class in com.sleepycat.je"><code>Cursor</code></a> and <a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je"><code>Transaction</code></a> handles.
|
|
<p>
|
|
When multiple threads are using the <a href="../../../com/sleepycat/je/Database.html" title="class in com.sleepycat.je"><code>Database</code></a> handle concurrently, only a single thread may call this
|
|
method.
|
|
<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.
|
|
<p>
|
|
The database handle may not be accessed again after this method is
|
|
called, regardless of the method's success or failure, with one
|
|
exception: the <code>close</code> method itself may be called any number of
|
|
times.</p>
|
|
|
|
<p>WARNING: To guard against memory leaks, the application should
|
|
discard all references to the closed handle. While BDB makes an effort
|
|
to discard references from closed objects to the allocated memory for an
|
|
environment, this behavior is not guaranteed. The safe course of action
|
|
for an application is to discard all references to closed BDB
|
|
objects.</p>
|
|
|
|
<!-- inherit other javadoc from overridden method --></div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code>close</code> in interface <code>java.io.Closeable</code></dd>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code>close</code> in interface <code>java.lang.AutoCloseable</code></dd>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/Database.html#close--">close</a></code> in class <code><a href="../../../com/sleepycat/je/Database.html" title="class in com.sleepycat.je">Database</a></code></dd>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../com/sleepycat/je/DatabaseConfig.html#setDeferredWrite-boolean-"><code>DatabaseConfig.setDeferredWrite</code></a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getPrimaryDatabase--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getPrimaryDatabase</h4>
|
|
<pre>public <a href="../../../com/sleepycat/je/Database.html" title="class in com.sleepycat.je">Database</a> getPrimaryDatabase()</pre>
|
|
<div class="block">Returns the primary database associated with this secondary database.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the primary database associated with this secondary database.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getSecondaryDatabases--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getSecondaryDatabases</h4>
|
|
<pre>public java.util.List<<a href="../../../com/sleepycat/je/SecondaryDatabase.html" title="class in com.sleepycat.je">SecondaryDatabase</a>> getSecondaryDatabases()</pre>
|
|
<div class="block">Returns an empty list, since this database is itself a secondary
|
|
database.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/Database.html#getSecondaryDatabases--">getSecondaryDatabases</a></code> in class <code><a href="../../../com/sleepycat/je/Database.html" title="class in com.sleepycat.je">Database</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getSecondaryConfig--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getSecondaryConfig</h4>
|
|
<pre>public <a href="../../../com/sleepycat/je/SecondaryConfig.html" title="class in com.sleepycat.je">SecondaryConfig</a> getSecondaryConfig()</pre>
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">As of JE 4.0.13, replaced by <a href="../../../com/sleepycat/je/SecondaryDatabase.html#getConfig--"><code>getConfig()</code></a>.</span></div>
|
|
<div class="block">Returns a copy of the secondary configuration of this database.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>a copy of the secondary configuration of this database.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/EnvironmentFailureException.html" title="class in com.sleepycat.je">EnvironmentFailureException</a></code> - if an unexpected, internal or
|
|
environment-wide failure occurs.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getConfig--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getConfig</h4>
|
|
<pre>public <a href="../../../com/sleepycat/je/SecondaryConfig.html" title="class in com.sleepycat.je">SecondaryConfig</a> getConfig()</pre>
|
|
<div class="block">Returns a copy of the secondary configuration of this database.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/Database.html#getConfig--">getConfig</a></code> in class <code><a href="../../../com/sleepycat/je/Database.html" title="class in com.sleepycat.je">Database</a></code></dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>a copy of the secondary configuration of this database.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/EnvironmentFailureException.html" title="class in com.sleepycat.je">EnvironmentFailureException</a></code> - if an unexpected, internal or
|
|
environment-wide failure occurs.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="openSecondaryCursor-com.sleepycat.je.Transaction-com.sleepycat.je.CursorConfig-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>openSecondaryCursor</h4>
|
|
<pre>public <a href="../../../com/sleepycat/je/SecondaryCursor.html" title="class in com.sleepycat.je">SecondaryCursor</a> openSecondaryCursor(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/je/CursorConfig.html" title="class in com.sleepycat.je">CursorConfig</a> cursorConfig)</pre>
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">As of JE 4.0.13, replaced by <a href="../../../com/sleepycat/je/SecondaryDatabase.html#openCursor-com.sleepycat.je.Transaction-com.sleepycat.je.CursorConfig-"><code>openCursor(com.sleepycat.je.Transaction, com.sleepycat.je.CursorConfig)</code></a>.</p></span></div>
|
|
<div class="block">Obtain a cursor on a database, returning a
|
|
<code>SecondaryCursor</code>. Calling this method is the equivalent of
|
|
calling <a href="../../../com/sleepycat/je/SecondaryDatabase.html#openCursor-com.sleepycat.je.Transaction-com.sleepycat.je.CursorConfig-"><code>openCursor(com.sleepycat.je.Transaction, com.sleepycat.je.CursorConfig)</code></a> and casting the result to <a href="../../../com/sleepycat/je/SecondaryCursor.html" title="class in com.sleepycat.je"><code>SecondaryCursor</code></a>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>txn</code> - the transaction used to protect all operations performed with
|
|
the cursor, or null if the operations should not be transaction
|
|
protected. If the database is non-transactional, null must be
|
|
specified. For a transactional database, the transaction is optional
|
|
for read-only access and required for read-write access.</dd>
|
|
<dd><code>cursorConfig</code> - The cursor attributes. If null, default attributes
|
|
are used.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>A secondary database cursor.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/EnvironmentFailureException.html" title="class in com.sleepycat.je">EnvironmentFailureException</a></code> - if an unexpected, internal or
|
|
environment-wide failure occurs.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="openCursor-com.sleepycat.je.Transaction-com.sleepycat.je.CursorConfig-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>openCursor</h4>
|
|
<pre>public <a href="../../../com/sleepycat/je/SecondaryCursor.html" title="class in com.sleepycat.je">SecondaryCursor</a> openCursor(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/je/CursorConfig.html" title="class in com.sleepycat.je">CursorConfig</a> cursorConfig)</pre>
|
|
<div class="block">Obtain a cursor on a database, returning a <code>SecondaryCursor</code>.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/Database.html#openCursor-com.sleepycat.je.Transaction-com.sleepycat.je.CursorConfig-">openCursor</a></code> in class <code><a href="../../../com/sleepycat/je/Database.html" title="class in com.sleepycat.je">Database</a></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>txn</code> - the transaction used to protect all operations performed with
|
|
the cursor, or null if the operations should not be transaction
|
|
protected. If the database is non-transactional, null must be
|
|
specified. For a transactional database, the transaction is optional
|
|
for read-only access and required for read-write access.</dd>
|
|
<dd><code>cursorConfig</code> - The cursor attributes. If null, default attributes
|
|
are used.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>A database cursor.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="delete-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.WriteOptions-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>delete</h4>
|
|
<pre>public <a href="../../../com/sleepycat/je/OperationResult.html" title="class in com.sleepycat.je">OperationResult</a> delete(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> key,
|
|
<a href="../../../com/sleepycat/je/WriteOptions.html" title="class in com.sleepycat.je">WriteOptions</a> options)</pre>
|
|
<div class="block">Deletes the record associated with the given secondary key. In the
|
|
presence of duplicate keys, all primary records associated with the
|
|
given secondary key will be deleted.
|
|
|
|
<p>When multiple primary records are deleted, the expiration time in the
|
|
returned result is that of the last record deleted.</p>
|
|
|
|
<p>When the primary records are deleted, their associated secondary
|
|
records are deleted as if <a href="../../../com/sleepycat/je/Database.html#delete-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.WriteOptions-"><code>Database.delete(com.sleepycat.je.Transaction, com.sleepycat.je.DatabaseEntry, com.sleepycat.je.WriteOptions)</code></a> were called. This
|
|
includes, but is not limited to, the secondary record referenced by the
|
|
given key.</p></div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/Database.html#delete-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.WriteOptions-">delete</a></code> in class <code><a href="../../../com/sleepycat/je/Database.html" title="class in com.sleepycat.je">Database</a></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>key</code> - the key used as
|
|
<a href="DatabaseEntry.html#inParam">input</a>.
|
|
|
|
<!-- inherit other javadoc from overridden method --></dd>
|
|
<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.</dd>
|
|
<dd><code>options</code> - the WriteOptions, or null to use default options.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the OperationResult if the record is deleted, else null if the
|
|
given key was not found in the database.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="delete-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>delete</h4>
|
|
<pre>public <a href="../../../com/sleepycat/je/OperationStatus.html" title="enum in com.sleepycat.je">OperationStatus</a> delete(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> key)</pre>
|
|
<div class="block">Deletes the record associated with the given secondary key. In the
|
|
presence of duplicate keys, all primary records associated with the
|
|
given secondary key will be deleted.
|
|
|
|
<p>When the primary records are deleted, their associated secondary
|
|
records are deleted as if <a href="../../../com/sleepycat/je/Database.html#delete-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.WriteOptions-"><code>Database.delete(com.sleepycat.je.Transaction, com.sleepycat.je.DatabaseEntry, com.sleepycat.je.WriteOptions)</code></a> were called. This
|
|
includes, but is not limited to, the secondary record referenced by the
|
|
given key.</p>
|
|
|
|
<p>Calling this method is equivalent to calling <a href="../../../com/sleepycat/je/SecondaryDatabase.html#delete-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.WriteOptions-"><code>delete(Transaction, DatabaseEntry, WriteOptions)</code></a>.</p></div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/Database.html#delete-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-">delete</a></code> in class <code><a href="../../../com/sleepycat/je/Database.html" title="class in com.sleepycat.je">Database</a></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>key</code> - the key used as
|
|
<a href="DatabaseEntry.html#inParam">input</a>.
|
|
|
|
<!-- inherit other javadoc from overridden method --></dd>
|
|
<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.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The method will return <a href="../../../com/sleepycat/je/OperationStatus.html#NOTFOUND"><code>OperationStatus.NOTFOUND</code></a> if
|
|
the given key is not found in the database; otherwise <a href="../../../com/sleepycat/je/OperationStatus.html#SUCCESS"><code>OperationStatus.SUCCESS</code></a>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="get-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.Get-com.sleepycat.je.ReadOptions-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>get</h4>
|
|
<pre>public <a href="../../../com/sleepycat/je/OperationResult.html" title="class in com.sleepycat.je">OperationResult</a> get(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> key,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> data,
|
|
<a href="../../../com/sleepycat/je/Get.html" title="enum in com.sleepycat.je">Get</a> getType,
|
|
<a href="../../../com/sleepycat/je/ReadOptions.html" title="class in com.sleepycat.je">ReadOptions</a> options)</pre>
|
|
<div class="block">Moves the cursor to a record according to the specified <a href="../../../com/sleepycat/je/Get.html" title="enum in com.sleepycat.je"><code>Get</code></a>
|
|
type.
|
|
|
|
<p>The difference between this method and the method it overrides in
|
|
<a href="../../../com/sleepycat/je/Cursor.html" title="class in com.sleepycat.je"><code>Cursor</code></a> is that the key here is defined as the secondary
|
|
records's key, and the data is defined as the primary record's data.</p></div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/Database.html#get-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.Get-com.sleepycat.je.ReadOptions-">get</a></code> in class <code><a href="../../../com/sleepycat/je/Database.html" title="class in com.sleepycat.je">Database</a></code></dd>
|
|
<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 input parameter.</dd>
|
|
<dd><code>data</code> - the data input or output parameter, depending on getType.</dd>
|
|
<dd><code>getType</code> - the Get operation type. May not be null.</dd>
|
|
<dd><code>options</code> - the ReadOptions, or null to use default options.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the OperationResult if the record requested is found, else null.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="get-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.Get-com.sleepycat.je.ReadOptions-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>get</h4>
|
|
<pre>public <a href="../../../com/sleepycat/je/OperationResult.html" title="class in com.sleepycat.je">OperationResult</a> get(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> key,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> pKey,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> data,
|
|
<a href="../../../com/sleepycat/je/Get.html" title="enum in com.sleepycat.je">Get</a> getType,
|
|
<a href="../../../com/sleepycat/je/ReadOptions.html" title="class in com.sleepycat.je">ReadOptions</a> options)</pre>
|
|
<div class="block">Retrieves a record according to the specified <a href="../../../com/sleepycat/je/Get.html" title="enum in com.sleepycat.je"><code>Get</code></a> type.
|
|
|
|
<p>If the operation succeeds, the record will be locked according to the
|
|
<a href="../../../com/sleepycat/je/ReadOptions.html#getLockMode--"><code>lock mode</code></a> specified, the key, primary
|
|
key and/or data will be returned via the (non-null) DatabaseEntry
|
|
parameters, and a non-null OperationResult will be returned. If the
|
|
operation fails because the record requested is not found, null is
|
|
returned.</p>
|
|
|
|
<p>The following table lists each allowed operation and whether the key,
|
|
pKey and data parameters are <a href="DatabaseEntry.html#params">input
|
|
or output parameters</a>. See the individual <a href="../../../com/sleepycat/je/Get.html" title="enum in com.sleepycat.je"><code>Get</code></a> operations for
|
|
more information.</p>
|
|
|
|
<div><table border="1" summary="">
|
|
<tr>
|
|
<th>Get operation</th>
|
|
<th>Description</th>
|
|
<th>'key' parameter</th>
|
|
<th>'pKey' parameter</th>
|
|
<th>'data' parameter</th>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="../../../com/sleepycat/je/Get.html#SEARCH"><code>Get.SEARCH</code></a></td>
|
|
<td>Searches using an exact match by key.</td>
|
|
<td><a href="DatabaseEntry.html#inParam">input</a></td>
|
|
<td><a href="DatabaseEntry.html#outParam">output</a></td>
|
|
<td><a href="DatabaseEntry.html#outParam">output</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="../../../com/sleepycat/je/Get.html#SEARCH_BOTH"><code>Get.SEARCH_BOTH</code></a></td>
|
|
<td>Searches using an exact match by key and data.</td>
|
|
<td><a href="DatabaseEntry.html#inParam">input</a></td>
|
|
<td><a href="DatabaseEntry.html#inParam">input</a></td>
|
|
<td><a href="DatabaseEntry.html#outParam">output</a></td>
|
|
</tr>
|
|
</table></div></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 secondary key input parameter.</dd>
|
|
<dd><code>pKey</code> - the primary key input or output parameter, depending on
|
|
getType.</dd>
|
|
<dd><code>data</code> - the primary data output parameter.</dd>
|
|
<dd><code>getType</code> - the Get operation type. May not be null.</dd>
|
|
<dd><code>options</code> - the ReadOptions, or null to use default options.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the OperationResult if the record requested is found, else null.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/OperationFailureException.html" title="class in com.sleepycat.je">OperationFailureException</a></code> - if one of the <a
|
|
href="OperationFailureException.html#readFailures">Read Operation
|
|
Failures</a> occurs.</dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/EnvironmentFailureException.html" title="class in com.sleepycat.je">EnvironmentFailureException</a></code> - if an unexpected, internal or
|
|
environment-wide failure occurs.</dd>
|
|
<dd><code>java.lang.IllegalStateException</code> - if the database has been closed.</dd>
|
|
<dd><code>java.lang.IllegalArgumentException</code> - if an invalid parameter is specified.
|
|
This includes passing a null getType, a null input key/pKey parameter,
|
|
an input key/pKey parameter with a null data array, a partial key/pKey
|
|
input parameter, and specifying a <a href="../../../com/sleepycat/je/ReadOptions.html#getLockMode--"><code>lock mode</code></a> of READ_COMMITTED.</dd>
|
|
<dt><span class="simpleTagLabel">Since:</span></dt>
|
|
<dd>7.0</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="get-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>get</h4>
|
|
<pre>public <a href="../../../com/sleepycat/je/OperationStatus.html" title="enum in com.sleepycat.je">OperationStatus</a> get(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> key,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> data,
|
|
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a> lockMode)</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="../../../com/sleepycat/je/Database.html#get-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">Database</a></code></span></div>
|
|
<div class="block">Retrieves the key/data pair with the given key. If the matching key has
|
|
duplicate values, the first data item in the set of duplicates is
|
|
returned. Retrieval of duplicates requires the use of <a href="../../../com/sleepycat/je/Cursor.html" title="class in com.sleepycat.je"><code>Cursor</code></a>
|
|
operations.
|
|
|
|
<p>Calling this method is equivalent to calling <a href="../../../com/sleepycat/je/Database.html#get-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.Get-com.sleepycat.je.ReadOptions-"><code>Database.get(Transaction, DatabaseEntry, DatabaseEntry, Get, ReadOptions)</code></a> with
|
|
<a href="../../../com/sleepycat/je/Get.html#SEARCH"><code>Get.SEARCH</code></a>.</p></div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/Database.html#get-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">get</a></code> in class <code><a href="../../../com/sleepycat/je/Database.html" title="class in com.sleepycat.je">Database</a></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>key</code> - the secondary key used as input. It must be initialized with
|
|
a non-null byte array by the caller.</dd>
|
|
<dd><code>data</code> - the primary data returned as output. Its byte array does
|
|
not need to be initialized by the caller.
|
|
|
|
<!-- inherit other javadoc from overridden method --></dd>
|
|
<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>lockMode</code> - the locking attributes; if null, default attributes are
|
|
used.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd><a href="../../../com/sleepycat/je/OperationStatus.html#NOTFOUND"><code>OperationStatus.NOTFOUND</code></a> if no matching key/data pair is found;
|
|
otherwise, <a href="../../../com/sleepycat/je/OperationStatus.html#SUCCESS"><code>OperationStatus.SUCCESS</code></a>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="get-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>get</h4>
|
|
<pre>public <a href="../../../com/sleepycat/je/OperationStatus.html" title="enum in com.sleepycat.je">OperationStatus</a> get(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> key,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> pKey,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> data,
|
|
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a> lockMode)</pre>
|
|
<div class="block">Retrieves the key/data pair with the given key. If the matching key has
|
|
duplicate values, the first data item in the set of duplicates is
|
|
returned. Retrieval of duplicates requires the use of <a href="../../../com/sleepycat/je/Cursor.html" title="class in com.sleepycat.je"><code>Cursor</code></a>
|
|
operations.
|
|
|
|
<p>Calling this method is equivalent to calling <a href="../../../com/sleepycat/je/SecondaryDatabase.html#get-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.Get-com.sleepycat.je.ReadOptions-"><code>get(Transaction, DatabaseEntry, DatabaseEntry, DatabaseEntry, Get,
|
|
ReadOptions)</code></a> with <a href="../../../com/sleepycat/je/Get.html#SEARCH"><code>Get.SEARCH</code></a>.</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 secondary key used as
|
|
<a href="DatabaseEntry.html#inParam">input</a>.</dd>
|
|
<dd><code>pKey</code> - the primary key returned as
|
|
<a href="DatabaseEntry.html#outParam">output</a>.</dd>
|
|
<dd><code>data</code> - the primary data returned as
|
|
<a href="DatabaseEntry.html#outParam">output</a>.</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="../../../com/sleepycat/je/OperationStatus.html#NOTFOUND"><code>OperationStatus.NOTFOUND</code></a> if no matching key/data pair is found;
|
|
otherwise, <a href="../../../com/sleepycat/je/OperationStatus.html#SUCCESS"><code>OperationStatus.SUCCESS</code></a>.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/OperationFailureException.html" title="class in com.sleepycat.je">OperationFailureException</a></code> - if one of the <a
|
|
href="OperationFailureException.html#readFailures">Read Operation
|
|
Failures</a> occurs.</dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/EnvironmentFailureException.html" title="class in com.sleepycat.je">EnvironmentFailureException</a></code> - if an unexpected, internal or
|
|
environment-wide failure occurs.</dd>
|
|
<dd><code>java.lang.IllegalStateException</code> - if the database has been closed.</dd>
|
|
<dd><code>java.lang.IllegalArgumentException</code> - if an invalid parameter is specified.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getSearchBoth-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getSearchBoth</h4>
|
|
<pre>public <a href="../../../com/sleepycat/je/OperationStatus.html" title="enum in com.sleepycat.je">OperationStatus</a> getSearchBoth(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> key,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> data,
|
|
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a> lockMode)</pre>
|
|
<div class="block">This operation is not allowed with this method signature. <code>UnsupportedOperationException</code> will always be thrown by this method.
|
|
The corresponding method with the <code>pKey</code> parameter should be
|
|
used instead.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/Database.html#getSearchBoth-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">getSearchBoth</a></code> in class <code><a href="../../../com/sleepycat/je/Database.html" title="class in com.sleepycat.je">Database</a></code></dd>
|
|
<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
|
|
<a href="DatabaseEntry.html#inParam">input</a>.</dd>
|
|
<dd><code>data</code> - the data used as
|
|
<a href="DatabaseEntry.html#inParam">input</a>.</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="../../../com/sleepycat/je/OperationStatus.html#NOTFOUND"><code>OperationStatus.NOTFOUND</code></a> if no matching key/data pair is found;
|
|
otherwise, <a href="../../../com/sleepycat/je/OperationStatus.html#SUCCESS"><code>OperationStatus.SUCCESS</code></a>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getSearchBoth-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getSearchBoth</h4>
|
|
<pre>public <a href="../../../com/sleepycat/je/OperationStatus.html" title="enum in com.sleepycat.je">OperationStatus</a> getSearchBoth(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> key,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> pKey,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> data,
|
|
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a> lockMode)</pre>
|
|
<div class="block">Retrieves the key/data pair with the specified secondary and primary
|
|
key, that is, both the primary and secondary key items must match.
|
|
|
|
<p>Calling this method is equivalent to calling <a href="../../../com/sleepycat/je/SecondaryDatabase.html#get-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.Get-com.sleepycat.je.ReadOptions-"><code>get(Transaction, DatabaseEntry, DatabaseEntry, DatabaseEntry, Get,
|
|
ReadOptions)</code></a> with <a href="../../../com/sleepycat/je/Get.html#SEARCH_BOTH"><code>Get.SEARCH_BOTH</code></a>.</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 secondary key used as
|
|
<a href="DatabaseEntry.html#inParam">input</a>.</dd>
|
|
<dd><code>pKey</code> - the primary key used as
|
|
<a href="DatabaseEntry.html#outParam">input</a>.</dd>
|
|
<dd><code>data</code> - the primary data returned as
|
|
<a href="DatabaseEntry.html#outParam">output</a>.</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="../../../com/sleepycat/je/OperationStatus.html#NOTFOUND"><code>OperationStatus.NOTFOUND</code></a> if no matching key/data pair is found;
|
|
otherwise, <a href="../../../com/sleepycat/je/OperationStatus.html#SUCCESS"><code>OperationStatus.SUCCESS</code></a>.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/OperationFailureException.html" title="class in com.sleepycat.je">OperationFailureException</a></code> - if one of the <a
|
|
href="OperationFailureException.html#readFailures">Read Operation
|
|
Failures</a> occurs.</dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/EnvironmentFailureException.html" title="class in com.sleepycat.je">EnvironmentFailureException</a></code> - if an unexpected, internal or
|
|
environment-wide failure occurs.</dd>
|
|
<dd><code>java.lang.IllegalStateException</code> - if the database has been closed.</dd>
|
|
<dd><code>java.lang.IllegalArgumentException</code> - if an invalid parameter is specified.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="put-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.Put-com.sleepycat.je.WriteOptions-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>put</h4>
|
|
<pre>public <a href="../../../com/sleepycat/je/OperationResult.html" title="class in com.sleepycat.je">OperationResult</a> put(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> key,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> data,
|
|
<a href="../../../com/sleepycat/je/Put.html" title="enum in com.sleepycat.je">Put</a> putType,
|
|
<a href="../../../com/sleepycat/je/WriteOptions.html" title="class in com.sleepycat.je">WriteOptions</a> options)</pre>
|
|
<div class="block">This operation is not allowed on a secondary database. <code>UnsupportedOperationException</code> will always be thrown by this method.
|
|
The corresponding method on the primary database should be used instead.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/Database.html#put-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.Put-com.sleepycat.je.WriteOptions-">put</a></code> in class <code><a href="../../../com/sleepycat/je/Database.html" title="class in com.sleepycat.je">Database</a></code></dd>
|
|
<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.</dd>
|
|
<dd><code>key</code> - the key used as
|
|
<a href="DatabaseEntry.html#inParam">input</a>.</dd>
|
|
<dd><code>data</code> - the data used as
|
|
<a href="DatabaseEntry.html#inParam">input</a>.</dd>
|
|
<dd><code>putType</code> - the Put operation type. May not be null.</dd>
|
|
<dd><code>options</code> - the WriteOptions, or null to use default options.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the OperationResult if the record is written, else null.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="put-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>put</h4>
|
|
<pre>public <a href="../../../com/sleepycat/je/OperationStatus.html" title="enum in com.sleepycat.je">OperationStatus</a> put(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> key,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> data)</pre>
|
|
<div class="block">This operation is not allowed on a secondary database. <code>UnsupportedOperationException</code> will always be thrown by this method.
|
|
The corresponding method on the primary database should be used instead.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/Database.html#put-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-">put</a></code> in class <code><a href="../../../com/sleepycat/je/Database.html" title="class in com.sleepycat.je">Database</a></code></dd>
|
|
<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.</dd>
|
|
<dd><code>key</code> - the key used as
|
|
<a href="DatabaseEntry.html#inParam">input</a>..</dd>
|
|
<dd><code>data</code> - the data used as
|
|
<a href="DatabaseEntry.html#inParam">input</a>.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd><a href="../../../com/sleepycat/je/OperationStatus.html#SUCCESS"><code>OperationStatus.SUCCESS</code></a>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="putNoOverwrite-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>putNoOverwrite</h4>
|
|
<pre>public <a href="../../../com/sleepycat/je/OperationStatus.html" title="enum in com.sleepycat.je">OperationStatus</a> putNoOverwrite(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> key,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> data)</pre>
|
|
<div class="block">This operation is not allowed on a secondary database. <code>UnsupportedOperationException</code> will always be thrown by this method.
|
|
The corresponding method on the primary database should be used instead.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/Database.html#putNoOverwrite-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-">putNoOverwrite</a></code> in class <code><a href="../../../com/sleepycat/je/Database.html" title="class in com.sleepycat.je">Database</a></code></dd>
|
|
<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.</dd>
|
|
<dd><code>key</code> - the key used as
|
|
<a href="DatabaseEntry.html#inParam">input</a>..</dd>
|
|
<dd><code>data</code> - the data used as
|
|
<a href="DatabaseEntry.html#inParam">input</a>.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd><a href="../../../com/sleepycat/je/OperationStatus.html#KEYEXIST"><code>OperationStatus.KEYEXIST</code></a> if the key already appears in the database,
|
|
else <a href="../../../com/sleepycat/je/OperationStatus.html#SUCCESS"><code>OperationStatus.SUCCESS</code></a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="putNoDupData-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>putNoDupData</h4>
|
|
<pre>public <a href="../../../com/sleepycat/je/OperationStatus.html" title="enum in com.sleepycat.je">OperationStatus</a> putNoDupData(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> key,
|
|
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a> data)</pre>
|
|
<div class="block">This operation is not allowed on a secondary database. <code>UnsupportedOperationException</code> will always be thrown by this method.
|
|
The corresponding method on the primary database should be used instead.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/Database.html#putNoDupData-com.sleepycat.je.Transaction-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-">putNoDupData</a></code> in class <code><a href="../../../com/sleepycat/je/Database.html" title="class in com.sleepycat.je">Database</a></code></dd>
|
|
<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.</dd>
|
|
<dd><code>key</code> - the key used as
|
|
<a href="DatabaseEntry.html#inParam">input</a>..</dd>
|
|
<dd><code>data</code> - the data used as
|
|
<a href="DatabaseEntry.html#inParam">input</a>.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd><a href="../../../com/sleepycat/je/OperationStatus.html#KEYEXIST"><code>OperationStatus.KEYEXIST</code></a> if the key/data pair already appears in the
|
|
database, else <a href="../../../com/sleepycat/je/OperationStatus.html#SUCCESS"><code>OperationStatus.SUCCESS</code></a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="join-com.sleepycat.je.Cursor:A-com.sleepycat.je.JoinConfig-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>join</h4>
|
|
<pre>public <a href="../../../com/sleepycat/je/JoinCursor.html" title="class in com.sleepycat.je">JoinCursor</a> join(<a href="../../../com/sleepycat/je/Cursor.html" title="class in com.sleepycat.je">Cursor</a>[] cursors,
|
|
<a href="../../../com/sleepycat/je/JoinConfig.html" title="class in com.sleepycat.je">JoinConfig</a> config)</pre>
|
|
<div class="block">This operation is not allowed on a secondary database. <code>UnsupportedOperationException</code> will always be thrown by this method.
|
|
The corresponding method on the primary database should be used instead.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/Database.html#join-com.sleepycat.je.Cursor:A-com.sleepycat.je.JoinConfig-">join</a></code> in class <code><a href="../../../com/sleepycat/je/Database.html" title="class in com.sleepycat.je">Database</a></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>cursors</code> - an array of cursors associated with this primary
|
|
database.</dd>
|
|
<dd><code>config</code> - The join attributes. If null, default attributes are
|
|
used.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>a specialized cursor that returns the results of the equality
|
|
join operation.</dd>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../com/sleepycat/je/JoinCursor.html" title="class in com.sleepycat.je"><code>JoinCursor</code></a></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="../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="class-use/SecondaryDatabase.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 Java Edition</b><br><font size=\"-1\"> version 7.5.11</font>
|
|
</div>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../com/sleepycat/je/SecondaryCursor.html" title="class in com.sleepycat.je"><span class="typeNameLink">Prev Class</span></a></li>
|
|
<li><a href="../../../com/sleepycat/je/SecondaryIntegrityException.html" title="class in com.sleepycat.je"><span class="typeNameLink">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../index.html?com/sleepycat/je/SecondaryDatabase.html" target="_top">Frames</a></li>
|
|
<li><a href="SecondaryDatabase.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_bottom">
|
|
<li><a href="../../../allclasses-noframe.html">All 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>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li>Field | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li>Constr | </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) 2002, 2017 Oracle and/or its affiliates. All rights reserved.</font> </small></p>
|
|
</body>
|
|
</html>
|