Class MongoIterableImpl<TResult>

  • Type Parameters:
    TResult - the result type
    All Implemented Interfaces:
    com.mongodb.client.MongoIterable<TResult>, java.lang.Iterable<TResult>

    public abstract class MongoIterableImpl<TResult>
    extends java.lang.Object
    implements com.mongodb.client.MongoIterable<TResult>
    Copied from the Java driver
    Developer note. This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
    • Constructor Summary

      Constructors 
      Constructor Description
      MongoIterableImpl​(com.mongodb.client.ClientSession clientSession, com.mongodb.client.internal.OperationExecutor executor, com.mongodb.ReadConcern readConcern, com.mongodb.ReadPreference readPreference)  
    • Constructor Detail

      • MongoIterableImpl

        public MongoIterableImpl​(@Nullable
                                 com.mongodb.client.ClientSession clientSession,
                                 com.mongodb.client.internal.OperationExecutor executor,
                                 com.mongodb.ReadConcern readConcern,
                                 com.mongodb.ReadPreference readPreference)
    • Method Detail

      • asReadOperation

        public abstract com.mongodb.operation.ReadOperation<com.mongodb.operation.BatchCursor<TResult>> asReadOperation()
      • getClientSession

        @Nullable
        protected com.mongodb.client.ClientSession getClientSession()
      • getExecutor

        protected com.mongodb.client.internal.OperationExecutor getExecutor()
      • getReadPreference

        protected com.mongodb.ReadPreference getReadPreference()
      • getReadConcern

        protected com.mongodb.ReadConcern getReadConcern()
      • getBatchSize

        @Nullable
        public java.lang.Integer getBatchSize()
      • batchSize

        public com.mongodb.client.MongoIterable<TResult> batchSize​(int batchSize)
        Specified by:
        batchSize in interface com.mongodb.client.MongoIterable<TResult>
      • iterator

        public com.mongodb.client.MongoCursor<TResult> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<TResult>
        Specified by:
        iterator in interface com.mongodb.client.MongoIterable<TResult>
      • first

        @Nullable
        public TResult first()
        Specified by:
        first in interface com.mongodb.client.MongoIterable<TResult>
      • map

        public <U> com.mongodb.client.MongoIterable<U> map​(com.mongodb.Function<TResult,​U> mapper)
        Specified by:
        map in interface com.mongodb.client.MongoIterable<TResult>
      • forEach

        public void forEach​(com.mongodb.Block<? super TResult> block)
        Specified by:
        forEach in interface com.mongodb.client.MongoIterable<TResult>
      • into

        public <A extends java.util.Collection<? super TResult>> A into​(A target)
        Specified by:
        into in interface com.mongodb.client.MongoIterable<TResult>
      • execute

        protected com.mongodb.operation.BatchCursor<TResult> execute()