| com.sleepycat.persist.ForwardCursor
ForwardCursor | public interface ForwardCursor extends Iterable<V>(Code) | | Cursor operations limited to traversing forward. See
EntityCursor for general information on cursors.
ForwardCursor objects are not thread-safe. Cursors
should be opened, used and closed by a single thread.
WARNING: Cursors must always be closed to prevent resource leaks
which could lead to the index becoming unusable or cause an
OutOfMemoryError . To ensure that a cursor is closed in the
face of exceptions, close it in a finally block.
author: Mark Hayes |
Method Summary | |
void | close() Closes the cursor. | Iterator<V> | iterator() Returns an iterator over the key range, starting with the value
following the current position or at the first value if the cursor is
uninitialized. | Iterator<V> | iterator(LockMode lockMode) Returns an iterator over the key range, starting with the value
following the current position or at the first value if the cursor is
uninitialized.
Parameters: lockMode - the lock mode to use for all operations performedusing the iterator, or null to use LockMode.DEFAULT. | V | next() Moves the cursor to the next value and returns it, or returns null
if there are no more values in the cursor range. | V | next(LockMode lockMode) Moves the cursor to the next value and returns it, or returns null
if there are no more values in the cursor range. |
iterator | Iterator<V> iterator()(Code) | | Returns an iterator over the key range, starting with the value
following the current position or at the first value if the cursor is
uninitialized.
LockMode.DEFAULT is used implicitly.
the iterator. |
iterator | Iterator<V> iterator(LockMode lockMode)(Code) | | Returns an iterator over the key range, starting with the value
following the current position or at the first value if the cursor is
uninitialized.
Parameters: lockMode - the lock mode to use for all operations performedusing the iterator, or null to use LockMode.DEFAULT. the iterator. |
next | V next() throws DatabaseException(Code) | | Moves the cursor to the next value and returns it, or returns null
if there are no more values in the cursor range. If the cursor is
uninitialized, this method returns the first value.
LockMode.DEFAULT is used implicitly.
the next value, or null if there are no more values in thecursor range. |
next | V next(LockMode lockMode) throws DatabaseException(Code) | | Moves the cursor to the next value and returns it, or returns null
if there are no more values in the cursor range. If the cursor is
uninitialized, this method returns the first value.
Parameters: lockMode - the lock mode to use for this operation, or null touse LockMode.DEFAULT. the next value, or null if there are no more values in thecursor range. |
|
|