Interface RemoteMongoCursor<ResultT>

  • Type Parameters:
    ResultT - The type of documents the cursor contains
    All Superinterfaces:
    AutoCloseable, Closeable

    public interface RemoteMongoCursor<ResultT>
    extends Closeable
    The Mongo Cursor interface. An application should ensure that a cursor is closed in all circumstances, e.g. using a try-with-resources statement.
    • Method Detail

      • hasNext

        Task<Boolean> hasNext()
        Returns whether or not there is a next document to retrieve with next().
        Returns:
        A Task containing whether or not there is a next document to retrieve with next().
      • tryNext

        Task<ResultT> tryNext()
        A special next() case that returns the next document if available or null.
        Returns:
        A Task containing the next document if available or null.