stasis/je-7.5.11/docs/java/com/sleepycat/je/Cursor.html

1976 lines
127 KiB
HTML
Raw Normal View History

2019-06-25 20:12:40 +00:00
<!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:45 EDT 2017 -->
<title>Cursor (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="Cursor (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":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":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete 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/Cursor.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/CommitToken.html" title="class in com.sleepycat.je"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../com/sleepycat/je/CursorConfig.html" title="class in com.sleepycat.je"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/sleepycat/je/Cursor.html" target="_top">Frames</a></li>
<li><a href="Cursor.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All&nbsp;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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&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>Constr&nbsp;|&nbsp;</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 Cursor" class="title">Class Cursor</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>com.sleepycat.je.Cursor</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="../../../com/sleepycat/je/ForwardCursor.html" title="interface in com.sleepycat.je">ForwardCursor</a>, java.io.Closeable, java.lang.AutoCloseable</dd>
</dl>
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><a href="../../../com/sleepycat/je/SecondaryCursor.html" title="class in com.sleepycat.je">SecondaryCursor</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="typeNameLabel">Cursor</span>
extends java.lang.Object
implements <a href="../../../com/sleepycat/je/ForwardCursor.html" title="interface in com.sleepycat.je">ForwardCursor</a></pre>
<div class="block">A database cursor. Cursors are used for operating on collections of records,
for iterating over a database, and for saving handles to individual records,
so that they can be modified after they have been read.
<p>Cursors which are opened with a transaction instance are transactional
cursors and may be used by multiple threads, but only serially. That is,
the application must serialize access to the handle. Non-transactional
cursors, opened with a null transaction instance, may not be used by
multiple threads.</p>
<p>If the cursor is to be used to perform operations on behalf of a
transaction, the cursor must be opened and closed within the context of that
single transaction.</p>
<p>Once the cursor <a href="../../../com/sleepycat/je/Cursor.html#close--"><code>close()</code></a> method has been called, the handle may not
be accessed again, regardless of the <code>close</code> method's success or
failure, with one exception: the <code>close</code> method itself may be called
any number of times to simplify error handling.</p>
<p>To obtain a cursor with default attributes:</p>
<blockquote><pre>
Cursor cursor = myDatabase.openCursor(txn, null);
</pre></blockquote>
<p>To customize the attributes of a cursor, use a CursorConfig object.</p>
<blockquote><pre>
CursorConfig config = new CursorConfig();
config.setReadUncommitted(true);
Cursor cursor = myDatabase.openCursor(txn, config);
</pre></blockquote>
<p>Modifications to the database during a sequential scan will be reflected
in the scan; that is, records inserted behind a cursor will not be returned
while records inserted in front of a cursor will be returned.</p>
<p>By default, a cursor is "sticky", meaning that the prior position is
maintained by cursor movement operations, and the cursor stays at the
prior position when the operation does not succeed. However, it is possible
to configure a cursor as non-sticky to enable certain performance benefits.
See <a href="../../../com/sleepycat/je/CursorConfig.html#setNonSticky-boolean-"><code>CursorConfig.setNonSticky(boolean)</code></a> for details.</p>
<h3><a name="partialEntry">Using Null and Partial DatabaseEntry
Parameters</a></h3>
<p>Null can be passed for DatabaseEntry output parameters if the value is
not needed. The <a href="../../../com/sleepycat/je/DatabaseEntry.html#setPartial-int-int-boolean-"><code>DatabaseEntry Partial</code></a>
property can also be used to optimize in certain cases. These provide
varying degrees of performance benefits that depend on the specific
operation, as described below.</p>
<p>When retrieving a record with a <a href="../../../com/sleepycat/je/Database.html" title="class in com.sleepycat.je"><code>Database</code></a> or <a href="../../../com/sleepycat/je/Cursor.html" title="class in com.sleepycat.je"><code>Cursor</code></a>
method, if only the key is needed by the application then the retrieval of
the data item can be suppressed by passing null. If null is passed as
the data parameter, the data item will not be returned by the <code>Database</code> or <code>Cursor</code> method.</p>
<p>Suppressing the return of the data item potentially has a large
performance benefit. In this case, if the record data is not already in the
JE cache, it will not be read from disk. The performance benefit is
potentially large because random access disk reads may be reduced. Examples
use cases are:</p>
<ul>
<li>Scanning all records in key order, when the data is not needed.</li>
<li>Skipping over records quickly with <code>READ_UNCOMMITTED</code> isolation to
select records for further processing by examining the key value.</li>
</ul>
<p>Note that by "record data" we mean both the <code>data</code> parameter for a
regular or primary DB, and the <code>pKey</code> parameter for a secondary DB.
However, the performance advantage of a key-only operation does not apply to
databases configured for duplicates. For a duplicates DB, the data is always
available along with the key and does not have to be fetched separately.</p>
<p>The Partial property may also be used to retrieve or update only a
portion of a data item. This avoids copying the entire record between the
JE cache and the application data parameter. However, this feature has less
of a performance benefit than one might assume, since the entire record is
always read or written to the database, and the entire record is cached. A
partial update may be performed only with
<a href="../../../com/sleepycat/je/Cursor.html#putCurrent-com.sleepycat.je.DatabaseEntry-"><code>Cursor.putCurrent</code></a>.</p>
<p>A null or partial DatabaseEntry output parameter may also be used in
other cases, for example, to retrieve a partial key item. However, in
practice this has limited value since the entire key is usually needed by
the application, and the benefit of copying a portion of the key is
generally very small.</p>
<p>Historical note: Prior to JE 7.0, null could not be passed for output
parameters. Instead, <code>DatabaseEntry.setPartial(0, 0, true)</code> was called
for a data parameter to avoid reading the record's data. Now, null can be
passed instead.</p></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">&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="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/Cursor.html#close--">close</a></span>()</code>
<div class="block">Discards the cursor.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/Cursor.html#count--">count</a></span>()</code>
<div class="block">Returns a count of the number of data items for the key to which the
cursor refers.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/Cursor.html#countEstimate--">countEstimate</a></span>()</code>
<div class="block">Returns a rough estimate of the count of the number of data items for
the key to which the cursor refers.</div>
</td>
</tr>
<tr id="i3" 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/Cursor.html#delete--">delete</a></span>()</code>
<div class="block">Deletes the record to which the cursor refers.</div>
</td>
</tr>
<tr id="i4" 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/Cursor.html#delete-com.sleepycat.je.WriteOptions-">delete</a></span>(<a href="../../../com/sleepycat/je/WriteOptions.html" title="class in com.sleepycat.je">WriteOptions</a>&nbsp;options)</code>
<div class="block">Deletes the record to which the cursor refers.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/je/Cursor.html" title="class in com.sleepycat.je">Cursor</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/Cursor.html#dup-boolean-">dup</a></span>(boolean&nbsp;samePosition)</code>
<div class="block">Returns a new cursor with the same transaction and locker ID as the
original cursor.</div>
</td>
</tr>
<tr id="i6" 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/Cursor.html#get-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.Get-com.sleepycat.je.ReadOptions-">get</a></span>(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data,
<a href="../../../com/sleepycat/je/Get.html" title="enum in com.sleepycat.je">Get</a>&nbsp;getType,
<a href="../../../com/sleepycat/je/ReadOptions.html" title="class in com.sleepycat.je">ReadOptions</a>&nbsp;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="i7" class="rowColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/je/CacheMode.html" title="enum in com.sleepycat.je">CacheMode</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/Cursor.html#getCacheMode--">getCacheMode</a></span>()</code>
<div class="block">Returns the default <code>CacheMode</code> used for subsequent operations
performed using this cursor.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/je/CursorConfig.html" title="class in com.sleepycat.je">CursorConfig</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/Cursor.html#getConfig--">getConfig</a></span>()</code>
<div class="block">Returns this cursor's configuration.</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/Cursor.html#getCurrent-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">getCurrent</a></span>(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data,
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a>&nbsp;lockMode)</code>
<div class="block">Returns the key/data pair to which the cursor refers.</div>
</td>
</tr>
<tr id="i10" 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/Cursor.html#getDatabase--">getDatabase</a></span>()</code>
<div class="block">Returns the Database handle associated with this Cursor.</div>
</td>
</tr>
<tr id="i11" 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/Cursor.html#getFirst-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">getFirst</a></span>(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data,
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a>&nbsp;lockMode)</code>
<div class="block">Moves the cursor to the first key/data pair of the database, and returns
that pair.</div>
</td>
</tr>
<tr id="i12" 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/Cursor.html#getLast-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">getLast</a></span>(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data,
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a>&nbsp;lockMode)</code>
<div class="block">Moves the cursor to the last key/data pair of the database, and returns
that pair.</div>
</td>
</tr>
<tr id="i13" 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/Cursor.html#getNext-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">getNext</a></span>(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data,
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a>&nbsp;lockMode)</code>
<div class="block">Moves the cursor to the next key/data pair and returns that pair.</div>
</td>
</tr>
<tr id="i14" 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/Cursor.html#getNextDup-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">getNextDup</a></span>(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data,
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a>&nbsp;lockMode)</code>
<div class="block">If the next key/data pair of the database is a duplicate data record for
the current key/data pair, moves the cursor to the next key/data pair of
the database and returns that pair.</div>
</td>
</tr>
<tr id="i15" 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/Cursor.html#getNextNoDup-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">getNextNoDup</a></span>(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data,
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a>&nbsp;lockMode)</code>
<div class="block">Moves the cursor to the next non-duplicate key/data pair and returns
that pair.</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/Cursor.html#getPrev-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">getPrev</a></span>(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data,
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a>&nbsp;lockMode)</code>
<div class="block">Moves the cursor to the previous key/data pair and returns that pair.</div>
</td>
</tr>
<tr id="i17" 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/Cursor.html#getPrevDup-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">getPrevDup</a></span>(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data,
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a>&nbsp;lockMode)</code>
<div class="block">If the previous key/data pair of the database is a duplicate data record
for the current key/data pair, moves the cursor to the previous key/data
pair of the database and returns that pair.</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/Cursor.html#getPrevNoDup-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">getPrevNoDup</a></span>(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data,
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a>&nbsp;lockMode)</code>
<div class="block">Moves the cursor to the previous non-duplicate key/data pair and returns
that pair.</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/Cursor.html#getSearchBoth-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">getSearchBoth</a></span>(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data,
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a>&nbsp;lockMode)</code>
<div class="block">Moves the cursor to the specified key/data pair, where both the key and
data items must match.</div>
</td>
</tr>
<tr id="i20" 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/Cursor.html#getSearchBothRange-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">getSearchBothRange</a></span>(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data,
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a>&nbsp;lockMode)</code>
<div class="block">Moves the cursor to the specified key and closest matching data item of
the database.</div>
</td>
</tr>
<tr id="i21" 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/Cursor.html#getSearchKey-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">getSearchKey</a></span>(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data,
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a>&nbsp;lockMode)</code>
<div class="block">Moves the cursor to the given key of the database, and returns the datum
associated with the given key.</div>
</td>
</tr>
<tr id="i22" 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/Cursor.html#getSearchKeyRange-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">getSearchKeyRange</a></span>(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data,
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a>&nbsp;lockMode)</code>
<div class="block">Moves the cursor to the closest matching key of the database, and
returns the data item associated with the matching key.</div>
</td>
</tr>
<tr id="i23" 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/Cursor.html#put-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-">put</a></span>(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data)</code>
<div class="block">Stores a key/data pair into the database.</div>
</td>
</tr>
<tr id="i24" 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/Cursor.html#put-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.Put-com.sleepycat.je.WriteOptions-">put</a></span>(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data,
<a href="../../../com/sleepycat/je/Put.html" title="enum in com.sleepycat.je">Put</a>&nbsp;putType,
<a href="../../../com/sleepycat/je/WriteOptions.html" title="class in com.sleepycat.je">WriteOptions</a>&nbsp;options)</code>
<div class="block">Inserts or updates a record according to the specified <a href="../../../com/sleepycat/je/Put.html" title="enum in com.sleepycat.je"><code>Put</code></a>
type.</div>
</td>
</tr>
<tr id="i25" 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/Cursor.html#putCurrent-com.sleepycat.je.DatabaseEntry-">putCurrent</a></span>(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data)</code>
<div class="block">Replaces the data in the key/data pair at the current cursor position.</div>
</td>
</tr>
<tr id="i26" 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/Cursor.html#putNoDupData-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-">putNoDupData</a></span>(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data)</code>
<div class="block">Stores a key/data pair into the database.</div>
</td>
</tr>
<tr id="i27" 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/Cursor.html#putNoOverwrite-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-">putNoOverwrite</a></span>(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data)</code>
<div class="block">Stores a key/data pair into the database.</div>
</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/Cursor.html#setCacheMode-com.sleepycat.je.CacheMode-">setCacheMode</a></span>(<a href="../../../com/sleepycat/je/CacheMode.html" title="enum in com.sleepycat.je">CacheMode</a>&nbsp;cacheMode)</code>
<div class="block">Sets the <code>CacheMode</code> default used for subsequent operations
performed using this cursor.</div>
</td>
</tr>
<tr id="i29" class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/Cursor.html#skipNext-long-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">skipNext</a></span>(long&nbsp;maxCount,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data,
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a>&nbsp;lockMode)</code>
<div class="block">Skips forward a given number of key/data pairs and returns the number by
which the cursor is moved.</div>
</td>
</tr>
<tr id="i30" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/Cursor.html#skipPrev-long-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">skipPrev</a></span>(long&nbsp;maxCount,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data,
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a>&nbsp;lockMode)</code>
<div class="block">Skips backward a given number of key/data pairs and returns the number
by which the cursor is moved.</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">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getDatabase--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDatabase</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/Database.html" title="class in com.sleepycat.je">Database</a>&nbsp;getDatabase()</pre>
<div class="block">Returns the Database handle associated with this Cursor.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../com/sleepycat/je/ForwardCursor.html#getDatabase--">getDatabase</a></code>&nbsp;in interface&nbsp;<code><a href="../../../com/sleepycat/je/ForwardCursor.html" title="interface in com.sleepycat.je">ForwardCursor</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The Database handle associated with this Cursor.</dd>
</dl>
</li>
</ul>
<a name="getConfig--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getConfig</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/CursorConfig.html" title="class in com.sleepycat.je">CursorConfig</a>&nbsp;getConfig()</pre>
<div class="block">Returns this cursor's configuration.
<p>This may differ from the configuration used to open this object if
the cursor existed previously.</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>This cursor's configuration.</dd>
</dl>
</li>
</ul>
<a name="getCacheMode--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCacheMode</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/CacheMode.html" title="enum in com.sleepycat.je">CacheMode</a>&nbsp;getCacheMode()</pre>
<div class="block">Returns the default <code>CacheMode</code> used for subsequent operations
performed using this cursor. If <a href="../../../com/sleepycat/je/Cursor.html#setCacheMode-com.sleepycat.je.CacheMode-"><code>setCacheMode(com.sleepycat.je.CacheMode)</code></a> has not been
called with a non-null value, the configured Database or Environment
default is returned.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <code>CacheMode</code> default used for subsequent operations
using this cursor.</dd>
</dl>
</li>
</ul>
<a name="setCacheMode-com.sleepycat.je.CacheMode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCacheMode</h4>
<pre>public&nbsp;void&nbsp;setCacheMode(<a href="../../../com/sleepycat/je/CacheMode.html" title="enum in com.sleepycat.je">CacheMode</a>&nbsp;cacheMode)</pre>
<div class="block">Sets the <code>CacheMode</code> default used for subsequent operations
performed using this cursor. This method may be used to override the
defaults specified using <a href="../../../com/sleepycat/je/DatabaseConfig.html#setCacheMode-com.sleepycat.je.CacheMode-"><code>DatabaseConfig.setCacheMode(com.sleepycat.je.CacheMode)</code></a> and <a href="../../../com/sleepycat/je/EnvironmentMutableConfig.html#setCacheMode-com.sleepycat.je.CacheMode-"><code>EnvironmentMutableConfig.setCacheMode(com.sleepycat.je.CacheMode)</code></a>. Note that the default is always
overridden by a non-null cache mode that is specified via
<a href="../../../com/sleepycat/je/ReadOptions.html" title="class in com.sleepycat.je"><code>ReadOptions</code></a> or <a href="../../../com/sleepycat/je/WriteOptions.html" title="class in com.sleepycat.je"><code>WriteOptions</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>cacheMode</code> - is the default <code>CacheMode</code> used for subsequent
operations using this cursor, or null to configure the Database or
Environment default.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../com/sleepycat/je/CacheMode.html" title="enum in com.sleepycat.je"><code>for further details.</code></a></dd>
</dl>
</li>
</ul>
<a name="close--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre>public&nbsp;void&nbsp;close()</pre>
<div class="block">Discards the cursor.
<p>The cursor handle may not be used again after this method has been
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></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../com/sleepycat/je/ForwardCursor.html#close--">close</a></code>&nbsp;in interface&nbsp;<code><a href="../../../com/sleepycat/je/ForwardCursor.html" title="interface in com.sleepycat.je">ForwardCursor</a></code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code>close</code>&nbsp;in interface&nbsp;<code>java.io.Closeable</code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code>close</code>&nbsp;in interface&nbsp;<code>java.lang.AutoCloseable</code></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="dup-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dup</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/Cursor.html" title="class in com.sleepycat.je">Cursor</a>&nbsp;dup(boolean&nbsp;samePosition)</pre>
<div class="block">Returns a new cursor with the same transaction and locker ID as the
original cursor.
<p>This is useful when an application is using locking and requires
two or more cursors in the same thread of control.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>samePosition</code> - If true, the newly created cursor is initialized
to refer to the same position in the database as the original cursor
(if any) and hold the same locks (if any). If false, or the original
cursor does not hold a database position and locks, the returned
cursor is uninitialized and will behave like a newly created cursor.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A new cursor with the same transaction and locker ID as the
original cursor.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../com/sleepycat/je/rep/DatabasePreemptedException.html" title="class in com.sleepycat.je.rep">DatabasePreemptedException</a></code> - in a replicated
environment if the master has truncated, removed or renamed the
database.</dd>
<dd><code><a href="../../../com/sleepycat/je/OperationFailureException.html" title="class in com.sleepycat.je">OperationFailureException</a></code> - if this exception occurred earlier and
caused the transaction to be invalidated.</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 cursor or database has been closed.</dd>
</dl>
</li>
</ul>
<a name="delete-com.sleepycat.je.WriteOptions-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>delete</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/OperationResult.html" title="class in com.sleepycat.je">OperationResult</a>&nbsp;delete(<a href="../../../com/sleepycat/je/WriteOptions.html" title="class in com.sleepycat.je">WriteOptions</a>&nbsp;options)</pre>
<div class="block">Deletes the record to which the cursor refers. When the database has
associated secondary databases, this method also deletes the associated
index records.
<p>The cursor position is unchanged after a delete, and subsequent calls
to cursor functions expecting the cursor to refer to an existing record
will fail.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<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
record at the cursor position has already been deleted.</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="../je/OperationFailureException.html#writeFailures">Write
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.UnsupportedOperationException</code> - if the database is transactional
but this cursor was not opened with a non-null transaction parameter,
or the database is read-only.</dd>
<dd><code>java.lang.IllegalStateException</code> - if the cursor or database has been closed,
or the cursor is uninitialized (not positioned on a record), or the
non-transactional cursor was created in a different thread.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>7.0</dd>
</dl>
</li>
</ul>
<a name="delete--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>delete</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/OperationStatus.html" title="enum in com.sleepycat.je">OperationStatus</a>&nbsp;delete()</pre>
<div class="block">Deletes the record to which the cursor refers. When the database has
associated secondary databases, this method also deletes the associated
index records.
<p>The cursor position is unchanged after a delete, and subsequent calls
to cursor functions expecting the cursor to refer to an existing record
will fail.</p>
<p>Calling this method is equivalent to calling <a href="../../../com/sleepycat/je/Cursor.html#delete-com.sleepycat.je.WriteOptions-"><code>delete(WriteOptions)</code></a>.</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><a href="../../../com/sleepycat/je/OperationStatus.html#KEYEMPTY"><code>OperationStatus.KEYEMPTY</code></a> if the record at the cursor position has
already been deleted; 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="../je/OperationFailureException.html#writeFailures">Write
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.UnsupportedOperationException</code> - if the database is transactional
but this cursor was not opened with a non-null transaction parameter,
or the database is read-only.</dd>
<dd><code>java.lang.IllegalStateException</code> - if the cursor or database has been closed,
or the cursor is uninitialized (not positioned on a record), or the
non-transactional cursor was created in a different thread.</dd>
</dl>
</li>
</ul>
<a name="put-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&nbsp;<a href="../../../com/sleepycat/je/OperationResult.html" title="class in com.sleepycat.je">OperationResult</a>&nbsp;put(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data,
<a href="../../../com/sleepycat/je/Put.html" title="enum in com.sleepycat.je">Put</a>&nbsp;putType,
<a href="../../../com/sleepycat/je/WriteOptions.html" title="class in com.sleepycat.je">WriteOptions</a>&nbsp;options)</pre>
<div class="block">Inserts or updates a record according to the specified <a href="../../../com/sleepycat/je/Put.html" title="enum in com.sleepycat.je"><code>Put</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 cursor will
be positioned on the record, and a non-null OperationResult will be
returned. If the operation fails because the record already exists (or
does not exist, depending on the putType), null is returned.</p>
<p>When the database has associated secondary databases, this method
also inserts or deletes associated index records as necessary.</p>
<p>The following table lists each allowed operation. See the individual
<a href="../../../com/sleepycat/je/Put.html" title="enum in com.sleepycat.je"><code>Put</code></a> operations for more information.</p>
<div><table border="1" summary="">
<tr>
<th>Put operation</th>
<th>Description</th>
<th>Returns null when?</th>
<th>Other special rules</th>
</tr>
<tr>
<td><a href="../../../com/sleepycat/je/Put.html#OVERWRITE"><code>Put.OVERWRITE</code></a></td>
<td>Inserts or updates a record depending on whether a matching
record is already present.</td>
<td>Never returns null.</td>
<td>Without duplicates, a matching record is one with the same key;
with duplicates, it is one with the same key and data.</td>
</tr>
<tr>
<td><a href="../../../com/sleepycat/je/Put.html#NO_OVERWRITE"><code>Put.NO_OVERWRITE</code></a></td>
<td>Inserts a record if a record with a matching key is not already
present.</td>
<td>When an existing record matches.</td>
<td>If the database has duplicate keys, a record is inserted only if
there are no records with a matching key.</td>
</tr>
<tr>
<td><a href="../../../com/sleepycat/je/Put.html#NO_DUP_DATA"><code>Put.NO_DUP_DATA</code></a></td>
<td>Inserts a record in a database with duplicate keys if a record
with a matching key and data is not already present.</td>
<td>When an existing record matches.</td>
<td>Without duplicates, this operation is not allowed.</td>
</tr>
<tr>
<td><a href="../../../com/sleepycat/je/Put.html#CURRENT"><code>Put.CURRENT</code></a></td>
<td>Updates the data of the record at the cursor position.</td>
<td>When the record at the cursor position has been deleted.</td>
<td>With duplicates, the data must be considered equal by the
duplicate comparator, meaning that changing the data is only
possible if a custom duplicate comparator is configured.
<p>
Cannot be used to update the key of an existing record and in
fact the key parameter must be null.
<p>
A <a href="Cursor.html#partialEntry">partial data item</a> may be
specified to optimize for partial data update.
</td>
</tr>
</table></div></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - the key used as
<a href="DatabaseEntry.html#inParam">input</a>. Must be null when
putType is <code>Put.CURRENT</code>.</dd>
<dd><code>data</code> - the data used as
<a href="DatabaseEntry.html#inParam">input</a>. May be partial only when
putType is <code>Put.CURRENT</code>.</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>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../com/sleepycat/je/DuplicateDataException.html" title="class in com.sleepycat.je">DuplicateDataException</a></code> - if putType is Put.CURRENT and the old and
new data are not equal according to the configured duplicate comparator
or default comparator.</dd>
<dd><code><a href="../../../com/sleepycat/je/OperationFailureException.html" title="class in com.sleepycat.je">OperationFailureException</a></code> - if one of the <a
href="../je/OperationFailureException.html#writeFailures">Write
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.UnsupportedOperationException</code> - if the database is transactional
but this cursor was not opened with a non-null transaction parameter,
or the database is read-only, or putType is Put.NO_DUP_DATA and the
database is not configured for duplicates.</dd>
<dd><code>java.lang.IllegalStateException</code> - if the cursor or database has been closed,
or the non-transactional cursor was created in a different thread.</dd>
<dd><code>java.lang.IllegalArgumentException</code> - if an invalid parameter is specified.
This includes passing a null putType, a null input key/data parameter,
an input key/data parameter with a null data array, a partial key/data
input parameter.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>7.0</dd>
</dl>
</li>
</ul>
<a name="put-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>put</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/OperationStatus.html" title="enum in com.sleepycat.je">OperationStatus</a>&nbsp;put(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data)</pre>
<div class="block">Stores a key/data pair into the database.
<p>Calling this method is equivalent to calling <a href="../../../com/sleepycat/je/Cursor.html#put-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.Put-com.sleepycat.je.WriteOptions-"><code>put(DatabaseEntry, DatabaseEntry, Put, WriteOptions)</code></a> with
<a href="../../../com/sleepycat/je/Put.html#OVERWRITE"><code>Put.OVERWRITE</code></a>.</p>
<p>If the put method succeeds, the cursor is positioned to refer to the
newly inserted item.</p>
<p>If the key already appears in the database and duplicates are
supported, the new data value is inserted at the correct sorted
location, unless the new data value also appears in the database
already. In the later case, although the given key/data pair compares
equal to an existing key/data pair, the two records may not be identical
if custom comparators are used, in which case the existing record will
be replaced with the new record. If the key already appears in the
database and duplicates are not supported, the data associated with
the key will be replaced.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<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>
<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="../je/OperationFailureException.html#writeFailures">Write
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.UnsupportedOperationException</code> - if the database is transactional
but this cursor was not opened with a non-null transaction parameter,
or the database is read-only.</dd>
<dd><code>java.lang.IllegalStateException</code> - if the cursor or database has been closed,
or the non-transactional cursor was created in a different thread.</dd>
<dd><code>java.lang.IllegalArgumentException</code> - if an invalid parameter is specified.</dd>
</dl>
</li>
</ul>
<a name="putNoOverwrite-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putNoOverwrite</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/OperationStatus.html" title="enum in com.sleepycat.je">OperationStatus</a>&nbsp;putNoOverwrite(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data)</pre>
<div class="block">Stores a key/data pair into the database.
<p>Calling this method is equivalent to calling <a href="../../../com/sleepycat/je/Cursor.html#put-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.Put-com.sleepycat.je.WriteOptions-"><code>put(DatabaseEntry, DatabaseEntry, Put, WriteOptions)</code></a> with
<a href="../../../com/sleepycat/je/Put.html#NO_OVERWRITE"><code>Put.NO_OVERWRITE</code></a>.</p>
<p>If the putNoOverwrite method succeeds, the cursor is positioned to
refer to the newly inserted item.</p>
<p>If the key already appears in the database, putNoOverwrite will
return <a href="../../../com/sleepycat/je/OperationStatus.html#KEYEXIST"><code>OperationStatus.KEYEXIST</code></a>.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<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>
<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="../je/OperationFailureException.html#writeFailures">Write
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.UnsupportedOperationException</code> - if the database is transactional
but this cursor was not opened with a non-null transaction parameter,
or the database is read-only.</dd>
<dd><code>java.lang.IllegalStateException</code> - if the cursor or database has been closed,
or the non-transactional cursor was created in a different thread.</dd>
<dd><code>java.lang.IllegalArgumentException</code> - if an invalid parameter is specified.</dd>
</dl>
</li>
</ul>
<a name="putNoDupData-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putNoDupData</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/OperationStatus.html" title="enum in com.sleepycat.je">OperationStatus</a>&nbsp;putNoDupData(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data)</pre>
<div class="block">Stores a key/data pair into the database. The database must be
configured for duplicates.
<p>Calling this method is equivalent to calling <a href="../../../com/sleepycat/je/Cursor.html#put-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.Put-com.sleepycat.je.WriteOptions-"><code>put(DatabaseEntry, DatabaseEntry, Put, WriteOptions)</code></a> with
<a href="../../../com/sleepycat/je/Put.html#NO_DUP_DATA"><code>Put.NO_DUP_DATA</code></a>.</p>
<p>If the putNoDupData method succeeds, the cursor is positioned to
refer to the newly inserted item.</p>
<p>Insert the specified key/data pair into the database, unless a
key/data pair comparing equally to it already exists in the database.
If a matching key/data pair already exists in the database, <a href="../../../com/sleepycat/je/OperationStatus.html#KEYEXIST"><code>OperationStatus.KEYEXIST</code></a> is
returned.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<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>
<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="../je/OperationFailureException.html#writeFailures">Write
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.UnsupportedOperationException</code> - if the database is transactional
but this cursor was not opened with a non-null transaction parameter, or
the database is read-only, or the database is not configured for
duplicates.</dd>
<dd><code>java.lang.IllegalStateException</code> - if the cursor or database has been closed,
or the non-transactional cursor was created in a different thread.</dd>
<dd><code>java.lang.IllegalArgumentException</code> - if an invalid parameter is specified.</dd>
</dl>
</li>
</ul>
<a name="putCurrent-com.sleepycat.je.DatabaseEntry-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putCurrent</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/OperationStatus.html" title="enum in com.sleepycat.je">OperationStatus</a>&nbsp;putCurrent(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data)</pre>
<div class="block">Replaces the data in the key/data pair at the current cursor position.
<p>Calling this method is equivalent to calling <a href="../../../com/sleepycat/je/Cursor.html#put-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.Put-com.sleepycat.je.WriteOptions-"><code>put(DatabaseEntry, DatabaseEntry, Put, WriteOptions)</code></a> with
<a href="../../../com/sleepycat/je/Put.html#CURRENT"><code>Put.CURRENT</code></a>.</p>
<p>Overwrite the data of the key/data pair to which the cursor refers
with the specified data item. This method will return
OperationStatus.NOTFOUND if the cursor currently refers to an
already-deleted key/data pair.</p>
<p>For a database that does not support duplicates, the data may be
changed by this method. If duplicates are supported, the data may be
changed only if a custom partial comparator is configured and the
comparator considers the old and new data to be equal (that is, the
comparator returns zero). For more information on partial comparators
see <a href="../../../com/sleepycat/je/DatabaseConfig.html#setDuplicateComparator-java.util.Comparator-"><code>DatabaseConfig.setDuplicateComparator(java.util.Comparator&lt;byte[]&gt;)</code></a>.</p>
<p>If the old and new data are unequal according to the comparator, a
<a href="../../../com/sleepycat/je/DuplicateDataException.html" title="class in com.sleepycat.je"><code>DuplicateDataException</code></a> is thrown. Changing the data in this
case would change the sort order of the record, which would change the
cursor position, and this is not allowed. To change the sort order of a
record, delete it and then re-insert it.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - the data used as
<a href="DatabaseEntry.html#inParam">input</a>.
A <a href="Cursor.html#partialEntry">partial data item</a> may be
specified to optimize for partial data update.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><a href="../../../com/sleepycat/je/OperationStatus.html#KEYEMPTY"><code>OperationStatus.KEYEMPTY</code></a> if the key/pair at the cursor position has
been deleted; 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/DuplicateDataException.html" title="class in com.sleepycat.je">DuplicateDataException</a></code> - if the old and new data are not equal
according to the configured duplicate comparator or default comparator.</dd>
<dd><code><a href="../../../com/sleepycat/je/OperationFailureException.html" title="class in com.sleepycat.je">OperationFailureException</a></code> - if one of the <a
href="../je/OperationFailureException.html#writeFailures">Write
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.UnsupportedOperationException</code> - if the database is transactional
but this cursor was not opened with a non-null transaction parameter,
or the database is read-only.</dd>
<dd><code>java.lang.IllegalStateException</code> - if the cursor or database has been closed,
or the cursor is uninitialized (not positioned on a record), or the
non-transactional cursor was created in a different thread.</dd>
<dd><code>java.lang.IllegalArgumentException</code> - if an invalid parameter is specified.</dd>
</dl>
</li>
</ul>
<a name="get-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&nbsp;<a href="../../../com/sleepycat/je/OperationResult.html" title="class in com.sleepycat.je">OperationResult</a>&nbsp;get(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data,
<a href="../../../com/sleepycat/je/Get.html" title="enum in com.sleepycat.je">Get</a>&nbsp;getType,
<a href="../../../com/sleepycat/je/ReadOptions.html" title="class in com.sleepycat.je">ReadOptions</a>&nbsp;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>If the operation succeeds, the record at the resulting cursor
position will be locked according to the <a href="../../../com/sleepycat/je/ReadOptions.html#getLockMode--"><code>lock mode</code></a> specified, the 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
and data parameters are <a href="DatabaseEntry.html#params">input or
output parameters</a>. Also specified is whether the cursor must be
initialized (positioned on a record) before calling this method. 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>'data' parameter</th>
<th>Cursor position<br/>must be initialized?</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>no</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>no</td>
</tr>
<tr>
<td><a href="../../../com/sleepycat/je/Get.html#SEARCH_GTE"><code>Get.SEARCH_GTE</code></a></td>
<td>Searches using a GTE match by key.</td>
<td><a href="DatabaseEntry.html#inParam">input/output</a></td>
<td><a href="DatabaseEntry.html#outParam">output</a></td>
<td>no</td>
</tr>
<tr>
<td><a href="../../../com/sleepycat/je/Get.html#SEARCH_BOTH_GTE"><code>Get.SEARCH_BOTH_GTE</code></a></td>
<td>Searches using an exact match by key and a GTE match by data.</td>
<td><a href="DatabaseEntry.html#inParam">input</a></td>
<td><a href="DatabaseEntry.html#inParam">input/output</a></td>
<td>no</td>
</tr>
<tr>
<td><a href="../../../com/sleepycat/je/Get.html#CURRENT"><code>Get.CURRENT</code></a></td>
<td>Accesses the current record</td>
<td><a href="DatabaseEntry.html#outParam">output</a></td>
<td><a href="DatabaseEntry.html#outParam">output</a></td>
<td>yes</td>
</tr>
<tr>
<td><a href="../../../com/sleepycat/je/Get.html#FIRST"><code>Get.FIRST</code></a></td>
<td>Finds the first record in the database.</td>
<td><a href="DatabaseEntry.html#outParam">output</a></td>
<td><a href="DatabaseEntry.html#outParam">output</a></td>
<td>no</td>
</tr>
<tr>
<td><a href="../../../com/sleepycat/je/Get.html#LAST"><code>Get.LAST</code></a></td>
<td>Finds the last record in the database.</td>
<td><a href="DatabaseEntry.html#outParam">output</a></td>
<td><a href="DatabaseEntry.html#outParam">output</a></td>
<td>no</td>
</tr>
<tr>
<td><a href="../../../com/sleepycat/je/Get.html#NEXT"><code>Get.NEXT</code></a></td>
<td>Moves to the next record.</td>
<td><a href="DatabaseEntry.html#outParam">output</a></td>
<td><a href="DatabaseEntry.html#outParam">output</a></td>
<td>no**</td>
</tr>
<tr>
<td><a href="../../../com/sleepycat/je/Get.html#NEXT_DUP"><code>Get.NEXT_DUP</code></a></td>
<td>Moves to the next record with the same key.</td>
<td><a href="DatabaseEntry.html#outParam">output</a></td>
<td><a href="DatabaseEntry.html#outParam">output</a></td>
<td>yes</td>
</tr>
<tr>
<td><a href="../../../com/sleepycat/je/Get.html#NEXT_NO_DUP"><code>Get.NEXT_NO_DUP</code></a></td>
<td>Moves to the next record with a different key.</td>
<td><a href="DatabaseEntry.html#outParam">output</a></td>
<td><a href="DatabaseEntry.html#outParam">output</a></td>
<td>no**</td>
</tr>
<tr>
<td><a href="../../../com/sleepycat/je/Get.html#PREV"><code>Get.PREV</code></a></td>
<td>Moves to the previous record.</td>
<td><a href="DatabaseEntry.html#outParam">output</a></td>
<td><a href="DatabaseEntry.html#outParam">output</a></td>
<td>no**</td>
</tr>
<tr>
<td><a href="../../../com/sleepycat/je/Get.html#PREV_DUP"><code>Get.PREV_DUP</code></a></td>
<td>Moves to the previous record with the same key.</td>
<td><a href="DatabaseEntry.html#outParam">output</a></td>
<td><a href="DatabaseEntry.html#outParam">output</a></td>
<td>yes</td>
</tr>
<tr>
<td><a href="../../../com/sleepycat/je/Get.html#PREV_NO_DUP"><code>Get.PREV_NO_DUP</code></a></td>
<td>Moves to the previous record with a different key.</td>
<td><a href="DatabaseEntry.html#outParam">output</a></td>
<td><a href="DatabaseEntry.html#outParam">output</a></td>
<td>no**</td>
</tr>
</table></div>
<p>** - For these 'next' and 'previous' operations the cursor may be
uninitialized, in which case the cursor will be moved to the first or
last record, respectively.</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../com/sleepycat/je/ForwardCursor.html#get-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.Get-com.sleepycat.je.ReadOptions-">get</a></code>&nbsp;in interface&nbsp;<code><a href="../../../com/sleepycat/je/ForwardCursor.html" title="interface in com.sleepycat.je">ForwardCursor</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - the key input or output parameter, depending on getType.</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>
<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 cursor or database has been closed,
the cursor is uninitialized (not positioned on a record) and this is not
permitted (see above), or the non-transactional cursor was created in a
different thread.</dd>
<dd><code>java.lang.IllegalArgumentException</code> - if an invalid parameter is specified.
This includes passing a null getType, a null input key/data parameter,
an input key/data parameter with a null data array, a partial key/data
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="getCurrent-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCurrent</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/OperationStatus.html" title="enum in com.sleepycat.je">OperationStatus</a>&nbsp;getCurrent(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data,
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a>&nbsp;lockMode)</pre>
<div class="block">Returns the key/data pair to which the cursor refers.
<p>Calling this method is equivalent to calling <a href="../../../com/sleepycat/je/Cursor.html#get-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.Get-com.sleepycat.je.ReadOptions-"><code>get(DatabaseEntry, DatabaseEntry, Get, ReadOptions)</code></a> with
<a href="../../../com/sleepycat/je/Get.html#CURRENT"><code>Get.CURRENT</code></a>.</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../com/sleepycat/je/ForwardCursor.html#getCurrent-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">getCurrent</a></code>&nbsp;in interface&nbsp;<code><a href="../../../com/sleepycat/je/ForwardCursor.html" title="interface in com.sleepycat.je">ForwardCursor</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - the key returned as
<a href="DatabaseEntry.html#outParam">output</a>.</dd>
<dd><code>data</code> - the data returned as
<a href="DatabaseEntry.html#outParam">output</a>.</dd>
<dd><code>lockMode</code> - the locking attributes; if null, default attributes are
used. <a href="../../../com/sleepycat/je/LockMode.html#READ_COMMITTED"><code>LockMode.READ_COMMITTED</code></a> is not allowed.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><a href="../../../com/sleepycat/je/OperationStatus.html#KEYEMPTY"><code>OperationStatus.KEYEMPTY</code></a> if the key/pair at the cursor position has
been deleted; 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 cursor or database has been closed,
or the cursor is uninitialized (not positioned on a record), or the
non-transactional cursor was created in a different thread.</dd>
<dd><code>java.lang.IllegalArgumentException</code> - if an invalid parameter is specified.</dd>
</dl>
</li>
</ul>
<a name="getFirst-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFirst</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/OperationStatus.html" title="enum in com.sleepycat.je">OperationStatus</a>&nbsp;getFirst(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data,
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a>&nbsp;lockMode)</pre>
<div class="block">Moves the cursor to the first key/data pair of the database, and returns
that pair. If the first key has duplicate values, the first data item
in the set of duplicates is returned.
<p>Calling this method is equivalent to calling <a href="../../../com/sleepycat/je/Cursor.html#get-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.Get-com.sleepycat.je.ReadOptions-"><code>get(DatabaseEntry, DatabaseEntry, Get, ReadOptions)</code></a> with
<a href="../../../com/sleepycat/je/Get.html#FIRST"><code>Get.FIRST</code></a>.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - the key returned as
<a href="DatabaseEntry.html#outParam">output</a>.</dd>
<dd><code>data</code> - the data returned as
<a href="DatabaseEntry.html#outParam">output</a>.</dd>
<dd><code>lockMode</code> - the locking attributes; if null, default attributes are
used. <a href="../../../com/sleepycat/je/LockMode.html#READ_COMMITTED"><code>LockMode.READ_COMMITTED</code></a> is not allowed.</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 cursor or database has been closed,
or the non-transactional cursor was created in a different thread.</dd>
<dd><code>java.lang.IllegalArgumentException</code> - if an invalid parameter is specified.</dd>
</dl>
</li>
</ul>
<a name="getLast-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLast</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/OperationStatus.html" title="enum in com.sleepycat.je">OperationStatus</a>&nbsp;getLast(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data,
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a>&nbsp;lockMode)</pre>
<div class="block">Moves the cursor to the last key/data pair of the database, and returns
that pair. If the last key has duplicate values, the last data item in
the set of duplicates is returned.
<p>Calling this method is equivalent to calling <a href="../../../com/sleepycat/je/Cursor.html#get-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.Get-com.sleepycat.je.ReadOptions-"><code>get(DatabaseEntry, DatabaseEntry, Get, ReadOptions)</code></a> with
<a href="../../../com/sleepycat/je/Get.html#LAST"><code>Get.LAST</code></a>.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - the key returned as
<a href="DatabaseEntry.html#outParam">output</a>.</dd>
<dd><code>data</code> - the data returned as
<a href="DatabaseEntry.html#outParam">output</a>.</dd>
<dd><code>lockMode</code> - the locking attributes; if null, default attributes are
used. <a href="../../../com/sleepycat/je/LockMode.html#READ_COMMITTED"><code>LockMode.READ_COMMITTED</code></a> is not allowed.</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 cursor or database has been closed,
or the non-transactional cursor was created in a different thread.</dd>
<dd><code>java.lang.IllegalArgumentException</code> - if an invalid parameter is specified.</dd>
</dl>
</li>
</ul>
<a name="getNext-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNext</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/OperationStatus.html" title="enum in com.sleepycat.je">OperationStatus</a>&nbsp;getNext(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data,
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a>&nbsp;lockMode)</pre>
<div class="block">Moves the cursor to the next key/data pair and returns that pair.
<p>Calling this method is equivalent to calling <a href="../../../com/sleepycat/je/Cursor.html#get-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.Get-com.sleepycat.je.ReadOptions-"><code>get(DatabaseEntry, DatabaseEntry, Get, ReadOptions)</code></a> with
<a href="../../../com/sleepycat/je/Get.html#NEXT"><code>Get.NEXT</code></a>.</p>
<p>If the cursor is not yet initialized, move the cursor to the first
key/data pair of the database, and return that pair. Otherwise, the
cursor is moved to the next key/data pair of the database, and that pair
is returned. In the presence of duplicate key values, the value of the
key may not change.</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../com/sleepycat/je/ForwardCursor.html#getNext-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">getNext</a></code>&nbsp;in interface&nbsp;<code><a href="../../../com/sleepycat/je/ForwardCursor.html" title="interface in com.sleepycat.je">ForwardCursor</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - the key returned as
<a href="DatabaseEntry.html#outParam">output</a>.</dd>
<dd><code>data</code> - the data returned as
<a href="DatabaseEntry.html#outParam">output</a>.</dd>
<dd><code>lockMode</code> - the locking attributes; if null, default attributes are
used. <a href="../../../com/sleepycat/je/LockMode.html#READ_COMMITTED"><code>LockMode.READ_COMMITTED</code></a> is not allowed.</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 cursor or database has been closed,
or the non-transactional cursor was created in a different thread.</dd>
<dd><code>java.lang.IllegalArgumentException</code> - if an invalid parameter is specified.</dd>
</dl>
</li>
</ul>
<a name="getNextDup-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNextDup</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/OperationStatus.html" title="enum in com.sleepycat.je">OperationStatus</a>&nbsp;getNextDup(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data,
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a>&nbsp;lockMode)</pre>
<div class="block">If the next key/data pair of the database is a duplicate data record for
the current key/data pair, moves the cursor to the next key/data pair of
the database and returns that pair.
<p>Calling this method is equivalent to calling <a href="../../../com/sleepycat/je/Cursor.html#get-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.Get-com.sleepycat.je.ReadOptions-"><code>get(DatabaseEntry, DatabaseEntry, Get, ReadOptions)</code></a> with
<a href="../../../com/sleepycat/je/Get.html#NEXT_DUP"><code>Get.NEXT_DUP</code></a>.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - the key returned as
<a href="DatabaseEntry.html#outParam">output</a>.</dd>
<dd><code>data</code> - the data returned as
<a href="DatabaseEntry.html#outParam">output</a>.</dd>
<dd><code>lockMode</code> - the locking attributes; if null, default attributes are
used. <a href="../../../com/sleepycat/je/LockMode.html#READ_COMMITTED"><code>LockMode.READ_COMMITTED</code></a> is not allowed.</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 cursor or database has been closed,
or the cursor is uninitialized (not positioned on a record), or the
non-transactional cursor was created in a different thread.</dd>
<dd><code>java.lang.IllegalArgumentException</code> - if an invalid parameter is specified.</dd>
</dl>
</li>
</ul>
<a name="getNextNoDup-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNextNoDup</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/OperationStatus.html" title="enum in com.sleepycat.je">OperationStatus</a>&nbsp;getNextNoDup(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data,
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a>&nbsp;lockMode)</pre>
<div class="block">Moves the cursor to the next non-duplicate key/data pair and returns
that pair. If the matching key has duplicate values, the first data
item in the set of duplicates is returned.
<p>Calling this method is equivalent to calling <a href="../../../com/sleepycat/je/Cursor.html#get-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.Get-com.sleepycat.je.ReadOptions-"><code>get(DatabaseEntry, DatabaseEntry, Get, ReadOptions)</code></a> with
<a href="../../../com/sleepycat/je/Get.html#NEXT_NO_DUP"><code>Get.NEXT_NO_DUP</code></a>.</p>
<p>If the cursor is not yet initialized, move the cursor to the first
key/data pair of the database, and return that pair. Otherwise, the
cursor is moved to the next non-duplicate key of the database, and that
key/data pair is returned.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - the key returned as
<a href="DatabaseEntry.html#outParam">output</a>.</dd>
<dd><code>data</code> - the data returned as
<a href="DatabaseEntry.html#outParam">output</a>.</dd>
<dd><code>lockMode</code> - the locking attributes; if null, default attributes are
used. <a href="../../../com/sleepycat/je/LockMode.html#READ_COMMITTED"><code>LockMode.READ_COMMITTED</code></a> is not allowed.</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 cursor or database has been closed,
or the non-transactional cursor was created in a different thread.</dd>
<dd><code>java.lang.IllegalArgumentException</code> - if an invalid parameter is specified.</dd>
</dl>
</li>
</ul>
<a name="getPrev-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPrev</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/OperationStatus.html" title="enum in com.sleepycat.je">OperationStatus</a>&nbsp;getPrev(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data,
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a>&nbsp;lockMode)</pre>
<div class="block">Moves the cursor to the previous key/data pair and returns that pair.
<p>Calling this method is equivalent to calling <a href="../../../com/sleepycat/je/Cursor.html#get-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.Get-com.sleepycat.je.ReadOptions-"><code>get(DatabaseEntry, DatabaseEntry, Get, ReadOptions)</code></a> with
<a href="../../../com/sleepycat/je/Get.html#PREV"><code>Get.PREV</code></a>.</p>
<p>If the cursor is not yet initialized, move the cursor to the last
key/data pair of the database, and return that pair. Otherwise, the
cursor is moved to the previous key/data pair of the database, and that
pair is returned. In the presence of duplicate key values, the value of
the key may not change.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - the key returned as
<a href="DatabaseEntry.html#outParam">output</a>.</dd>
<dd><code>data</code> - the data returned as
<a href="DatabaseEntry.html#outParam">output</a>.</dd>
<dd><code>lockMode</code> - the locking attributes; if null, default attributes are
used. <a href="../../../com/sleepycat/je/LockMode.html#READ_COMMITTED"><code>LockMode.READ_COMMITTED</code></a> is not allowed.</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 cursor or database has been closed,
or the non-transactional cursor was created in a different thread.</dd>
<dd><code>java.lang.IllegalArgumentException</code> - if an invalid parameter is specified.</dd>
</dl>
</li>
</ul>
<a name="getPrevDup-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPrevDup</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/OperationStatus.html" title="enum in com.sleepycat.je">OperationStatus</a>&nbsp;getPrevDup(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data,
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a>&nbsp;lockMode)</pre>
<div class="block">If the previous key/data pair of the database is a duplicate data record
for the current key/data pair, moves the cursor to the previous key/data
pair of the database and returns that pair.
<p>Calling this method is equivalent to calling <a href="../../../com/sleepycat/je/Cursor.html#get-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.Get-com.sleepycat.je.ReadOptions-"><code>get(DatabaseEntry, DatabaseEntry, Get, ReadOptions)</code></a> with
<a href="../../../com/sleepycat/je/Get.html#PREV_DUP"><code>Get.PREV_DUP</code></a>.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - the key returned as
<a href="DatabaseEntry.html#outParam">output</a>.</dd>
<dd><code>data</code> - the data returned as
<a href="DatabaseEntry.html#outParam">output</a>.</dd>
<dd><code>lockMode</code> - the locking attributes; if null, default attributes are
used. <a href="../../../com/sleepycat/je/LockMode.html#READ_COMMITTED"><code>LockMode.READ_COMMITTED</code></a> is not allowed.</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 cursor or database has been closed,
or the cursor is uninitialized (not positioned on a record), or the
non-transactional cursor was created in a different thread.</dd>
<dd><code>java.lang.IllegalArgumentException</code> - if an invalid parameter is specified.</dd>
</dl>
</li>
</ul>
<a name="getPrevNoDup-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPrevNoDup</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/OperationStatus.html" title="enum in com.sleepycat.je">OperationStatus</a>&nbsp;getPrevNoDup(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data,
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a>&nbsp;lockMode)</pre>
<div class="block">Moves the cursor to the previous non-duplicate key/data pair and returns
that pair. If the matching key has duplicate values, the last data item
in the set of duplicates is returned.
<p>Calling this method is equivalent to calling <a href="../../../com/sleepycat/je/Cursor.html#get-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.Get-com.sleepycat.je.ReadOptions-"><code>get(DatabaseEntry, DatabaseEntry, Get, ReadOptions)</code></a> with
<a href="../../../com/sleepycat/je/Get.html#PREV_NO_DUP"><code>Get.PREV_NO_DUP</code></a>.</p>
<p>If the cursor is not yet initialized, move the cursor to the last
key/data pair of the database, and return that pair. Otherwise, the
cursor is moved to the previous non-duplicate key of the database, and
that key/data pair is returned.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - the key returned as
<a href="DatabaseEntry.html#outParam">output</a>.</dd>
<dd><code>data</code> - the data returned as
<a href="DatabaseEntry.html#outParam">output</a>.</dd>
<dd><code>lockMode</code> - the locking attributes; if null, default attributes are
used. <a href="../../../com/sleepycat/je/LockMode.html#READ_COMMITTED"><code>LockMode.READ_COMMITTED</code></a> is not allowed.</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 cursor or database has been closed,
or the non-transactional cursor was created in a different thread.</dd>
<dd><code>java.lang.IllegalArgumentException</code> - if an invalid parameter is specified.</dd>
</dl>
</li>
</ul>
<a name="skipNext-long-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>skipNext</h4>
<pre>public&nbsp;long&nbsp;skipNext(long&nbsp;maxCount,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data,
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a>&nbsp;lockMode)</pre>
<div class="block">Skips forward a given number of key/data pairs and returns the number by
which the cursor is moved.
<p>Without regard to performance, calling this method is equivalent to
repeatedly calling <a href="../../../com/sleepycat/je/Cursor.html#getNext-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-"><code>getNext</code></a> with <a href="../../../com/sleepycat/je/LockMode.html#READ_UNCOMMITTED"><code>LockMode.READ_UNCOMMITTED</code></a> to skip over the desired number of key/data
pairs, and then calling <a href="../../../com/sleepycat/je/Cursor.html#getCurrent-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-"><code>getCurrent</code></a> with the <code>lockMode</code> parameter to return the final key/data pair.</p>
<p>With regard to performance, this method is optimized to skip over
key/value pairs using a smaller number of Btree operations. When there
is no contention on the bottom internal nodes (BINs) and all BINs are in
cache, the number of Btree operations is reduced by roughly two orders
of magnitude, where the exact number depends on the <a href="../../../com/sleepycat/je/EnvironmentConfig.html#NODE_MAX_ENTRIES"><code>EnvironmentConfig.NODE_MAX_ENTRIES</code></a> setting. When there is contention
on BINs or fetching BINs is required, the scan is broken up into smaller
operations to avoid blocking other threads for long time periods.</p>
<p>If the returned count is greater than zero, then the key/data pair at
the new cursor position is also returned. If zero is returned, then
there are no key/value pairs that follow the cursor position and a
key/data pair is not returned.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>maxCount</code> - the maximum number of key/data pairs to skip, i.e., the
maximum number by which the cursor should be moved; must be greater
than zero.</dd>
<dd><code>key</code> - the key returned as
<a href="DatabaseEntry.html#outParam">output</a>.</dd>
<dd><code>data</code> - the data returned as
<a href="DatabaseEntry.html#outParam">output</a>.</dd>
<dd><code>lockMode</code> - the locking attributes; if null, default attributes are
used. <a href="../../../com/sleepycat/je/LockMode.html#READ_COMMITTED"><code>LockMode.READ_COMMITTED</code></a> is not allowed.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of key/data pairs skipped, i.e., the number by which
the cursor has moved; if zero is returned, the cursor position is
unchanged and the key/data pair is not returned.</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 cursor or database has been closed,
or the cursor is uninitialized (not positioned on a record), or the
non-transactional cursor was created in a different thread.</dd>
<dd><code>java.lang.IllegalArgumentException</code> - if an invalid parameter is specified.</dd>
</dl>
</li>
</ul>
<a name="skipPrev-long-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>skipPrev</h4>
<pre>public&nbsp;long&nbsp;skipPrev(long&nbsp;maxCount,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data,
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a>&nbsp;lockMode)</pre>
<div class="block">Skips backward a given number of key/data pairs and returns the number
by which the cursor is moved.
<p>Without regard to performance, calling this method is equivalent to
repeatedly calling <a href="../../../com/sleepycat/je/Cursor.html#getPrev-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-"><code>getPrev</code></a> with <a href="../../../com/sleepycat/je/LockMode.html#READ_UNCOMMITTED"><code>LockMode.READ_UNCOMMITTED</code></a> to skip over the desired number of key/data
pairs, and then calling <a href="../../../com/sleepycat/je/Cursor.html#getCurrent-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-"><code>getCurrent</code></a> with the <code>lockMode</code> parameter to return the final key/data pair.</p>
<p>With regard to performance, this method is optimized to skip over
key/value pairs using a smaller number of Btree operations. When there
is no contention on the bottom internal nodes (BINs) and all BINs are in
cache, the number of Btree operations is reduced by roughly two orders
of magnitude, where the exact number depends on the <a href="../../../com/sleepycat/je/EnvironmentConfig.html#NODE_MAX_ENTRIES"><code>EnvironmentConfig.NODE_MAX_ENTRIES</code></a> setting. When there is contention
on BINs or fetching BINs is required, the scan is broken up into smaller
operations to avoid blocking other threads for long time periods.</p>
<p>If the returned count is greater than zero, then the key/data pair at
the new cursor position is also returned. If zero is returned, then
there are no key/value pairs that follow the cursor position and a
key/data pair is not returned.</p>
<p>In a replicated environment, an explicit transaction must have been
specified when opening the cursor, unless read-uncommitted isolation is
specified via the <a href="../../../com/sleepycat/je/CursorConfig.html" title="class in com.sleepycat.je"><code>CursorConfig</code></a> or <a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je"><code>LockMode</code></a>
parameter.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>maxCount</code> - the maximum number of key/data pairs to skip, i.e., the
maximum number by which the cursor should be moved; must be greater
than zero.</dd>
<dd><code>key</code> - the key returned as
<a href="DatabaseEntry.html#outParam">output</a>.</dd>
<dd><code>data</code> - the data returned as
<a href="DatabaseEntry.html#outParam">output</a>.</dd>
<dd><code>lockMode</code> - the locking attributes; if null, default attributes are
used. <a href="../../../com/sleepycat/je/LockMode.html#READ_COMMITTED"><code>LockMode.READ_COMMITTED</code></a> is not allowed.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of key/data pairs skipped, i.e., the number by which
the cursor has moved; if zero is returned, the cursor position is
unchanged and the key/data pair is not returned.</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 cursor or database has been closed,
or the cursor is uninitialized (not positioned on a record), or the
non-transactional cursor was created in a different thread.</dd>
<dd><code>java.lang.IllegalArgumentException</code> - if an invalid parameter is specified.</dd>
</dl>
</li>
</ul>
<a name="getSearchKey-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSearchKey</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/OperationStatus.html" title="enum in com.sleepycat.je">OperationStatus</a>&nbsp;getSearchKey(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data,
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a>&nbsp;lockMode)</pre>
<div class="block">Moves the cursor to the given key of the database, and returns the datum
associated with the given key. If the matching key has duplicate
values, the first data item in the set of duplicates is returned.
<p>Calling this method is equivalent to calling <a href="../../../com/sleepycat/je/Cursor.html#get-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.Get-com.sleepycat.je.ReadOptions-"><code>get(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>key</code> - the key used as
<a href="DatabaseEntry.html#inParam">input</a>.</dd>
<dd><code>data</code> - the data returned as
<a href="DatabaseEntry.html#outParam">output</a>.</dd>
<dd><code>lockMode</code> - the locking attributes; if null, default attributes are
used. <a href="../../../com/sleepycat/je/LockMode.html#READ_COMMITTED"><code>LockMode.READ_COMMITTED</code></a> is not allowed.</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 cursor or database has been closed,
or the non-transactional cursor was created in a different thread.</dd>
<dd><code>java.lang.IllegalArgumentException</code> - if an invalid parameter is specified.</dd>
</dl>
</li>
</ul>
<a name="getSearchKeyRange-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSearchKeyRange</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/OperationStatus.html" title="enum in com.sleepycat.je">OperationStatus</a>&nbsp;getSearchKeyRange(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data,
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a>&nbsp;lockMode)</pre>
<div class="block">Moves the cursor to the closest matching key of the database, and
returns the data item associated with the matching key. If the matching
key has duplicate values, the first data item in the set of duplicates
is returned.
<p>Calling this method is equivalent to calling <a href="../../../com/sleepycat/je/Cursor.html#get-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.Get-com.sleepycat.je.ReadOptions-"><code>get(DatabaseEntry, DatabaseEntry, Get, ReadOptions)</code></a> with
<a href="../../../com/sleepycat/je/Get.html#SEARCH_GTE"><code>Get.SEARCH_GTE</code></a>.</p>
<p>The returned key/data pair is for the smallest key greater than or
equal to the specified key (as determined by the key comparison
function), permitting partial key matches and range searches.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - the key used as
<a href="DatabaseEntry.html#inParam">input</a> and returned as output.</dd>
<dd><code>data</code> - the data returned as
<a href="DatabaseEntry.html#outParam">output</a>.</dd>
<dd><code>lockMode</code> - the locking attributes; if null, default attributes
are used. <a href="../../../com/sleepycat/je/LockMode.html#READ_COMMITTED"><code>LockMode.READ_COMMITTED</code></a> is not allowed.</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 cursor or database has been closed,
or the non-transactional cursor was created in a different thread.</dd>
<dd><code>java.lang.IllegalArgumentException</code> - if an invalid parameter is specified.</dd>
</dl>
</li>
</ul>
<a name="getSearchBoth-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSearchBoth</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/OperationStatus.html" title="enum in com.sleepycat.je">OperationStatus</a>&nbsp;getSearchBoth(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data,
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a>&nbsp;lockMode)</pre>
<div class="block">Moves the cursor to the specified key/data pair, where both the key and
data items must match.
<p>Calling this method is equivalent to calling <a href="../../../com/sleepycat/je/Cursor.html#get-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.Get-com.sleepycat.je.ReadOptions-"><code>get(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>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. <a href="../../../com/sleepycat/je/LockMode.html#READ_COMMITTED"><code>LockMode.READ_COMMITTED</code></a> is not allowed.</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 cursor or database has been closed,
or the non-transactional cursor was created in a different thread.</dd>
<dd><code>java.lang.IllegalArgumentException</code> - if an invalid parameter is specified.</dd>
</dl>
</li>
</ul>
<a name="getSearchBothRange-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSearchBothRange</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/OperationStatus.html" title="enum in com.sleepycat.je">OperationStatus</a>&nbsp;getSearchBothRange(<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;key,
<a href="../../../com/sleepycat/je/DatabaseEntry.html" title="class in com.sleepycat.je">DatabaseEntry</a>&nbsp;data,
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a>&nbsp;lockMode)</pre>
<div class="block">Moves the cursor to the specified key and closest matching data item of
the database.
<p>Calling this method is equivalent to calling <a href="../../../com/sleepycat/je/Cursor.html#get-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.Get-com.sleepycat.je.ReadOptions-"><code>get(DatabaseEntry, DatabaseEntry, Get, ReadOptions)</code></a> with
<a href="../../../com/sleepycat/je/Get.html#SEARCH_BOTH_GTE"><code>Get.SEARCH_BOTH_GTE</code></a>.</p>
<p>In the case of any database supporting sorted duplicate sets, the
returned key/data pair is for the smallest data item greater than or
equal to the specified data item (as determined by the duplicate
comparison function), permitting partial matches and range searches in
duplicate data sets.</p>
<p>In the case of databases that do not support sorted duplicate sets,
this method is equivalent to getSearchBoth.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<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> and returned as output.</dd>
<dd><code>lockMode</code> - the locking attributes; if null, default attributes are
used. <a href="../../../com/sleepycat/je/LockMode.html#READ_COMMITTED"><code>LockMode.READ_COMMITTED</code></a> is not allowed.</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 cursor or database has been closed,
or the non-transactional cursor was created in a different thread.</dd>
<dd><code>java.lang.IllegalArgumentException</code> - if an invalid parameter is specified.</dd>
</dl>
</li>
</ul>
<a name="count--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>count</h4>
<pre>public&nbsp;int&nbsp;count()</pre>
<div class="block">Returns a count of the number of data items for the key to which the
cursor refers.
<p>If the database is configured for duplicates, the database is scanned
internally, without taking any record locks, to count the number of
non-deleted entries. Although the internal scan is more efficient under
some conditions, the result is the same as if a cursor were used to
iterate over the entries using <a href="../../../com/sleepycat/je/LockMode.html#READ_UNCOMMITTED"><code>LockMode.READ_UNCOMMITTED</code></a>.</p>
<p>If the database is not configured for duplicates, the count returned
is always zero or one, depending on the record at the cursor position is
deleted or not.</p>
<p>The cost of this method is directly proportional to the number of
records scanned.</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A count of the number of data items for the key to which the
cursor refers.</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 cursor or database has been closed,
or the cursor is uninitialized (not positioned on a record), or the
non-transactional cursor was created in a different thread.</dd>
</dl>
</li>
</ul>
<a name="countEstimate--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>countEstimate</h4>
<pre>public&nbsp;long&nbsp;countEstimate()</pre>
<div class="block">Returns a rough estimate of the count of the number of data items for
the key to which the cursor refers.
<p>If the database is configured for duplicates, a quick estimate of the
number of records is computed using information in the Btree. Because
the Btree is unbalanced, in some cases the estimate may be off by a
factor of two or more. The estimate is accurate when the number of
records is less than the configured <a href="../../../com/sleepycat/je/DatabaseConfig.html#setNodeMaxEntries-int-"><code>NodeMaxEntries</code></a>.</p>
<p>If the database is not configured for duplicates, the count returned
is always zero or one, depending on the record at the cursor position is
deleted or not.</p>
<p>The cost of this method is fixed, rather than being proportional to
the number of records scanned. Because its accuracy is variable, this
method should normally be used when accuracy is not required, such as
for query optimization, and a fixed cost operation is needed. For
example, this method is used internally for determining the index
processing order in a <a href="../../../com/sleepycat/je/JoinCursor.html" title="class in com.sleepycat.je"><code>JoinCursor</code></a>.</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an estimate of the count of the number of data items for the key
to which the cursor refers.</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 cursor or database has been closed,
or the cursor is uninitialized (not positioned on a record), or the
non-transactional cursor was created in a different thread.</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/Cursor.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/CommitToken.html" title="class in com.sleepycat.je"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../com/sleepycat/je/CursorConfig.html" title="class in com.sleepycat.je"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/sleepycat/je/Cursor.html" target="_top">Frames</a></li>
<li><a href="Cursor.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.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>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&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>Constr&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) 2002, 2017 Oracle and/or its affiliates. All rights reserved.</font> </small></p>
</body>
</html>