Interface MongoIterable<TResult>

    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      void batchCursor​(com.mongodb.async.SingleResultCallback<com.mongodb.async.AsyncBatchCursor<TResult>> callback)
      Deprecated. 
      Provide the underlying AsyncBatchCursor allowing fine grained control of the cursor.
      MongoIterable<TResult> batchSize​(int batchSize)
      Deprecated. 
      Sets the number of documents to return per batch.
      void first​(com.mongodb.async.SingleResultCallback<TResult> callback)
      Deprecated. 
      Helper to return the first item in the iterator or null.
      void forEach​(com.mongodb.Block<? super TResult> block, com.mongodb.async.SingleResultCallback<Void> callback)
      Deprecated. 
      Iterates over all documents in the view, applying the given block to each, and completing the returned future after all documents have been iterated, or an exception has occurred.
      Integer getBatchSize​()
      Deprecated. 
      Gets the number of documents to return per batch or null if not set.
      <A extends Collection<? super TResult>>
      void
      into​(A target, com.mongodb.async.SingleResultCallback<A> callback)
      Deprecated. 
      Iterates over all the documents, adding each to the given target.
      <U> MongoIterable<U> map​(com.mongodb.Function<TResult,U> mapper)
      Deprecated. 
      Maps this iterable from the source document type to the target document type.
    • Method Detail

      • first

        void first​(com.mongodb.async.SingleResultCallback<TResult> callback)
        Deprecated. 
        Helper to return the first item in the iterator or null.
        Parameters:
        callback - a callback that is passed the first item or null.
      • forEach

        void forEach​(com.mongodb.Block<? super TResult> block,
                     com.mongodb.async.SingleResultCallback<Void> callback)
        Deprecated. 
        Iterates over all documents in the view, applying the given block to each, and completing the returned future after all documents have been iterated, or an exception has occurred.
        Parameters:
        block - the block to apply to each document
        callback - a callback that completed once the iteration has completed
      • into

        <A extends Collection<? super TResult>> void into​(A target,
                                                          com.mongodb.async.SingleResultCallback<A> callback)
        Deprecated. 
        Iterates over all the documents, adding each to the given target.
        Type Parameters:
        A - the collection type
        Parameters:
        target - the collection to insert into
        callback - a callback that will be passed the target containing all documents
      • map

        <U> MongoIterable<U> map​(com.mongodb.Function<TResult,U> mapper)
        Deprecated. 
        Maps this iterable from the source document type to the target document type.
        Type Parameters:
        U - the target document type
        Parameters:
        mapper - a function that maps from the source to the target document type
        Returns:
        an iterable which maps T to U
      • batchSize

        MongoIterable<TResult> batchSize​(int batchSize)
        Deprecated. 
        Sets the number of documents to return per batch.
        Parameters:
        batchSize - the batch size
        Returns:
        this
        MongoDB documentation
        Batch Size
      • getBatchSize

        @Nullable
        Integer getBatchSize​()
        Deprecated. 
        Gets the number of documents to return per batch or null if not set.
        Returns:
        the batch size, which may be null
        Since:
        3.7
        MongoDB documentation
        Batch Size
      • batchCursor

        void batchCursor​(com.mongodb.async.SingleResultCallback<com.mongodb.async.AsyncBatchCursor<TResult>> callback)
        Deprecated. 
        Provide the underlying AsyncBatchCursor allowing fine grained control of the cursor.
        Parameters:
        callback - a callback that will be passed the AsyncBatchCursor