Interface Cursor<T>

Type Parameters:
T -
All Superinterfaces:
AutoCloseable, Closeable, CloseableIterator<T>, Iterator<T>
All Known Implementing Classes:
ConvertingCursor, KeyBoundCursor, ScanCursor

public interface Cursor<T> extends CloseableIterator<T>
Cursor abstraction to scan over the keyspace or elements within a data structure using a variant of a SCAN command.

Using a Java 8 allows to apply additional filters and limits to the underlying Cursor.

Make sure to close the cursor when done as this allows implementations to clean up any resources they need to keep open to iterate over elements (eg. by using a try-with-resource statement).

Christoph Strobl, Mark Paluch
  • Method Details

    • getCursorId

      long getCursorId()
      Get the reference cursor.
      NOTE: the id might change while iterating items.
    • isClosed

      boolean isClosed()
      true if cursor closed.
    • getPosition

      long getPosition()
      the current position of the cursor.