Package com.mongodb.async.client
Interface MongoIterable<TResult>
-
- Type Parameters:
TResult
- the result type
- All Known Subinterfaces:
AggregateIterable<TResult>
,ChangeStreamIterable<TResult>
,DistinctIterable<TResult>
,FindIterable<T>
,GridFSFindIterable
,ListCollectionsIterable<TResult>
,ListDatabasesIterable<T>
,ListIndexesIterable<TResult>
,MapReduceIterable<TResult>
@Deprecated public interface MongoIterable<TResult>
Deprecated.Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)Operations that allow asynchronous iteration over a collection view.- Since:
- 3.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
batchCursor(SingleResultCallback<AsyncBatchCursor<TResult>> callback)
Deprecated.Provide the underlyingAsyncBatchCursor
allowing fine grained control of the cursor.MongoIterable<TResult>
batchSize(int batchSize)
Deprecated.Sets the number of documents to return per batch.void
first(SingleResultCallback<TResult> callback)
Deprecated.Helper to return the first item in the iterator or null.void
forEach(Block<? super TResult> block, 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>>
voidinto(A target, SingleResultCallback<A> callback)
Deprecated.Iterates over all the documents, adding each to the given target.<U> MongoIterable<U>
map(Function<TResult,U> mapper)
Deprecated.Maps this iterable from the source document type to the target document type.
-
-
-
Method Detail
-
first
void first(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(Block<? super TResult> block, 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 documentcallback
- a callback that completed once the iteration has completed
-
into
<A extends Collection<? super TResult>> void into(A target, 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 intocallback
- a callback that will be passed the target containing all documents
-
map
<U> MongoIterable<U> map(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(SingleResultCallback<AsyncBatchCursor<TResult>> callback)
Deprecated.Provide the underlyingAsyncBatchCursor
allowing fine grained control of the cursor.- Parameters:
callback
- a callback that will be passed the AsyncBatchCursor
-
-