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

553 lines
31 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>DiskOrderedCursor (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="DiskOrderedCursor (Oracle - Berkeley DB Java Edition API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":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/DiskOrderedCursor.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/DiskLimitException.html" title="class in com.sleepycat.je"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../com/sleepycat/je/DiskOrderedCursorConfig.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/DiskOrderedCursor.html" target="_top">Frames</a></li>
<li><a href="DiskOrderedCursor.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 DiskOrderedCursor" class="title">Class DiskOrderedCursor</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>com.sleepycat.je.DiskOrderedCursor</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>
<hr>
<br>
<pre>public class <span class="typeNameLabel">DiskOrderedCursor</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">DiskOrderedCursor returns records in unsorted order in exchange for
generally faster retrieval times. Instead of key order, an approximation of
disk order is used, which results in less I/O. This can be useful when the
application needs to scan all records in one or more databases, and will be
applying filtering logic which does not need key ordered retrieval.
A DiskOrderedCursor is created using the <a href="../../../com/sleepycat/je/Database.html#openCursor-com.sleepycat.je.DiskOrderedCursorConfig-"><code>Database.openCursor(DiskOrderedCursorConfig)</code></a> method or the <a href="../../../com/sleepycat/je/Environment.html#openDiskOrderedCursor-com.sleepycat.je.Database:A-com.sleepycat.je.DiskOrderedCursorConfig-"><code>Environment.openDiskOrderedCursor(Database[], DiskOrderedCursorConfig)</code></a>
method.
<p>
<em>WARNING:</em> After opening a DiskOrderedCursor, deletion of log files
by the JE log cleaner will be disabled until <a href="../../../com/sleepycat/je/DiskOrderedCursor.html#close--"><code>close()</code></a> is called. To
prevent unbounded growth of disk usage, be sure to call <a href="../../../com/sleepycat/je/DiskOrderedCursor.html#close--"><code>close()</code></a> to
re-enable log file deletion.
<p>
<em>Optional configurations:</em> the following options are available to
tune the DiskOrderedCursor.
<p>
The DiskOrderedCursor creates a background producer thread which prefetches
some target records and inserts them in a queue for use by the cursor. The
parameter <a href="../../../com/sleepycat/je/EnvironmentConfig.html#DOS_PRODUCER_QUEUE_TIMEOUT"><code>EnvironmentConfig.DOS_PRODUCER_QUEUE_TIMEOUT</code></a> applies to
this background thread, and controls the timeout which governs the blocking
queue.
<p>
See <a href="../../../com/sleepycat/je/DiskOrderedCursorConfig.html" title="class in com.sleepycat.je"><code>DiskOrderedCursorConfig</code></a> for additional options.
<p>
<h3>Consistency Guarantees</h3>
<p>
The consistency guarantees provided by a DiskOrderedCursor are, at best, the
same as those provided by READ_UNCOMMITTED (see <a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je"><code>LockMode</code></a>). With
READ_UNCOMMITTED, changes made by all transactions, including uncommitted
transactions, may be returned by the scan. Also, a record returned by the
scan is not locked, and may be modified or deleted by the application after
it is returned, including modification or deletion of the record at the
cursor position.
<p>
In other words, the records returned by the scan correspond to the state
of the database (as if READ_UNCOMMITTED were used) at the beginning of the
scan plus some, but not all, changes made by the application after the start
of the scan. The user should not rely on the scan returning any changes
made after the start of the scan. For example, if the record referred to by
the DiskOrderedCursor is deleted after the DiskOrderedCursor is positioned
at that record, getCurrent() will still return the key and value of that
record and OperationStatus.SUCCESS.
If a transactionally correct data set is required (as defined by
READ_COMMITTED), the application must ensure that all transactions that
write to the database are committed before the beginning of the scan.
During the scan, no records in the database of the scan may be
inserted, deleted, or modified. While this is possible, it is not the
expected use case for a DiskOrderedCursor.
<p>
<h3>Performance Considerations</h3>
<p>
The internal algorithm used to approximate disk ordered reads is as follows.
For simplicity, the algorithm description assumes that a single database is
being scanned, but the algorithm is almost the same when multiple databases
are involved.
An internal producer thread is used to scan the database. This thread is
created and started when the <code>DiskOrderedCursor</code> is created, and is
destroyed by <a href="../../../com/sleepycat/je/DiskOrderedCursor.html#close--"><code>close()</code></a>. Scanning consists of two
phases. In phase I the in-cache Btree of the scanned database is traversed
in key order. The LSNs (physical record addresses) of the data to be
fetched are accumulated in a memory buffer. Btree latches are held during
the traversal, but only for short durations. In phase II the accumulated
LSNs are sorted into disk order, fetched one at a time in that order, and
the fetched data is added to a blocking queue. The <code>getNext</code> method
in this class removes the next entry from the queue. This approach allows
concurrent access to the Database during both phases of the scan, including
access by the application's consumer thread (the thread calling <code>getNext</code>).
<p>
Phase I does not always process the entire Btree. During phase I if the
accumulation of LSNs causes the <a href="../../../com/sleepycat/je/DiskOrderedCursorConfig.html#setInternalMemoryLimit-long-"><code>internal memory limit</code></a> or
<a href="../../../com/sleepycat/je/DiskOrderedCursorConfig.html#setLSNBatchSize-long-"><code>LSN batch size</code></a> to be
exceeded, phase I is ended and phase II begins. In this case, after phase
II finishes, phase I resumes where it left off in the Btree traversal.
Phase I and II are repeated until the entire database is scanned.
<p>
By default, the internal memory limit and LSN batch size are unbounded (see
<a href="../../../com/sleepycat/je/DiskOrderedCursorConfig.html" title="class in com.sleepycat.je"><code>DiskOrderedCursorConfig</code></a>). For a database with a large number of
records, this could cause an <code>OutOfMemoryError</code>. Therefore, it is
strongly recommended that either the internal memory limit or LSN batch size
is configured to limit the use of memory during the scan. On the other
hand, the efficiency of the scan is proportional to the amount of memory
used. If enough memory is available, the ideal case would be that the
database is scanned in in a single iteration of phase I and II. The more
iterations, the more random IO will occur.
<p>
Another factor is the <a href="../../../com/sleepycat/je/DiskOrderedCursorConfig.html#setQueueSize-int-"><code>queue
size</code></a>. During the phase I Btree traversal, data that is resident in the JE
cache will be added to the queue immediately, rather than waiting until
phase II and fetching it, but only if the queue is not full. Therefore,
increasing the size of the queue can avoid fetching data that is resident in
the JE cache. Also, increasing the queue size can improve parallelism of
the work done by the producer and consumer threads.
<p>
Also note that a <a href="../../../com/sleepycat/je/DiskOrderedCursorConfig.html#setKeysOnly-boolean-"><code>keys-only</code></a> scan
is much more efficient than the default keys-and-data scan. With a
keys-only scan, only the BINs (bottom internal nodes) of the Btree need to
be fetched; the LNs (leaf nodes) do not. This is also true of databases
<a href="../../../com/sleepycat/je/DatabaseConfig.html#setSortedDuplicates-boolean-"><code>configured for duplicates</code></a>, even
for a keys-and-data scan, since internally the key and data are both
contained in the BIN.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>5.0</dd>
</dl>
</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/DiskOrderedCursor.html#close--">close</a></span>()</code>
<div class="block">Discards the cursor.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/je/OperationResult.html" title="class in com.sleepycat.je">OperationResult</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/DiskOrderedCursor.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="i2" class="altColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/je/DiskOrderedCursorConfig.html" title="class in com.sleepycat.je">DiskOrderedCursorConfig</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/DiskOrderedCursor.html#getConfig--">getConfig</a></span>()</code>
<div class="block">Returns this cursor's configuration.</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/DiskOrderedCursor.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="i4" 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/DiskOrderedCursor.html#getDatabase--">getDatabase</a></span>()</code>
<div class="block">Returns the Database handle for the database that contains the
latest record returned by getNext().</div>
</td>
</tr>
<tr id="i5" 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/DiskOrderedCursor.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>
</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 for the database that contains the
latest record returned by getNext().</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="close--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre>public&nbsp;void&nbsp;close()
throws <a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></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.</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>
<dd><code><a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></code></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"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<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-">ForwardCursor</a></code></span></div>
<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>
<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>options</code> - the ReadOptions, or null to use default options.
For DiskOrderedCursors, <a href="../../../com/sleepycat/je/ReadOptions.html#getLockMode--"><code>ReadOptions.getLockMode()</code></a> must return
null, <a href="../../../com/sleepycat/je/LockMode.html#DEFAULT"><code>LockMode.DEFAULT</code></a> or
<a href="../../../com/sleepycat/je/LockMode.html#READ_UNCOMMITTED"><code>LockMode.READ_UNCOMMITTED</code></a>, and no locking
is performed.</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>getType</code> - is <a href="../../../com/sleepycat/je/Get.html#NEXT"><code>Get.NEXT</code></a> or <a href="../../../com/sleepycat/je/Get.html#CURRENT"><code>Get.CURRENT</code></a>.
interface. <code>Get.CURRENT</code> is permitted only if the cursor is
initialized (positioned on a record).</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the OperationResult if the record requested is found, else null.</dd>
</dl>
</li>
</ul>
<a name="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"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../com/sleepycat/je/ForwardCursor.html#getCurrent-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">ForwardCursor</a></code></span></div>
<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/ForwardCursor.html#get-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.Get-com.sleepycat.je.ReadOptions-"><code>ForwardCursor.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>lockMode</code> - the locking attributes. For DiskOrderedCursors this
parameter must be either null, <a href="../../../com/sleepycat/je/LockMode.html#DEFAULT"><code>LockMode.DEFAULT</code></a>
or <a href="../../../com/sleepycat/je/LockMode.html#READ_UNCOMMITTED"><code>LockMode.READ_UNCOMMITTED</code></a>, and no locking
is performed.</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>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><a href="../../../com/sleepycat/je/OperationStatus.html#KEYEMPTY"><code>OperationStatus.KEYEMPTY</code></a> if there are no more records in the
DiskOrderedCursor set, otherwise, <a href="../../../com/sleepycat/je/OperationStatus.html#SUCCESS"><code>OperationStatus.SUCCESS</code></a>. If
the record referred to by a DiskOrderedCursor is deleted after the
ForwardCursor is positioned at that record, getCurrent() will still
return the key and value of that record and OperationStatus.SUCCESS.</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"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../com/sleepycat/je/ForwardCursor.html#getNext-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.LockMode-">ForwardCursor</a></code></span></div>
<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/ForwardCursor.html#get-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.DatabaseEntry-com.sleepycat.je.Get-com.sleepycat.je.ReadOptions-"><code>ForwardCursor.get(DatabaseEntry, DatabaseEntry, Get, ReadOptions)</code></a> with
<a href="../../../com/sleepycat/je/Get.html#NEXT"><code>Get.NEXT</code></a>.</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>lockMode</code> - the locking attributes. For DiskOrderedCursors this
parameter must be either null, <a href="../../../com/sleepycat/je/LockMode.html#DEFAULT"><code>LockMode.DEFAULT</code></a>
or <a href="../../../com/sleepycat/je/LockMode.html#READ_UNCOMMITTED"><code>LockMode.READ_UNCOMMITTED</code></a>, and no locking
is performed.</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>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><a href="../../../com/sleepycat/je/OperationStatus.html#NOTFOUND"><code>OperationStatus.NOTFOUND</code></a> if no matching key/data pair is found;
otherwise, <a href="../../../com/sleepycat/je/OperationStatus.html#SUCCESS"><code>OperationStatus.SUCCESS</code></a>.</dd>
</dl>
</li>
</ul>
<a name="getConfig--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getConfig</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/DiskOrderedCursorConfig.html" title="class in com.sleepycat.je">DiskOrderedCursorConfig</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>
</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/DiskOrderedCursor.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/DiskLimitException.html" title="class in com.sleepycat.je"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../com/sleepycat/je/DiskOrderedCursorConfig.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/DiskOrderedCursor.html" target="_top">Frames</a></li>
<li><a href="DiskOrderedCursor.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>