Class ParallelCollectionScanOperation<T>

  • Type Parameters:
    T - the operations result type.
    All Implemented Interfaces:
    <<BatchCursor<T>>>

    public class ParallelCollectionScanOperation<T>
    extends 
    implements <<BatchCursor<T>>>
    Deprecated.
    Return a list of cursors over the collection that can be used to scan it in parallel.

    Note: As of MongoDB 2.6, this operation will work against a mongod, but not a mongos.

    Since:
    3.0
    MongoDB documentation
    Since server release
    • Constructor Detail

      • ParallelCollectionScanOperation

        public ParallelCollectionScanOperation​(MongoNamespace namespace,
                                               int numCursors,
                                               Decoder<T> decoder)
        Deprecated.
        Construct a new instance.
        Parameters:
        namespace - the database and collection namespace for the operation.
        numCursors - The maximum number of cursors to return. Must be between 1 and 10000, inclusive.
        decoder - the decoder for the result documents.
    • Method Detail

      • getNumCursors

        public int getNumCursors()
        Deprecated.
        Gets the number of cursors requested.
        Returns:
        number of cursors requested.
      • getBatchSize

        public int getBatchSize()
        Deprecated.
        Gets the batch size to use for each cursor. The default value is 0, which tells the server to use its own default batch size.
        Returns:
        batch size
        MongoDB documentation
      • batchSize

        public ParallelCollectionScanOperation<T> batchSize​(int batchSize)
        Deprecated.
        The batch size to use for each cursor.
        Parameters:
        batchSize - the batch size, which must be greater than or equal to 0
        Returns:
        this
        MongoDB documentation
      • retryReads

        public ParallelCollectionScanOperation<T> retryReads​(boolean retryReads)
        Deprecated.
        Enables retryable reads if a read fails due to a network error.
        Parameters:
        retryReads - true if reads should be retried
        Returns:
        this
        Since:
        3.11
      • getRetryReads

        public boolean getRetryReads()
        Deprecated.
        Gets the value for retryable reads. The default is true.
        Returns:
        the retryable reads value
        Since:
        3.11
      • execute

        public <BatchCursor<T>> execute​(ReadBinding binding)
        Deprecated.
        Description copied from interface: ReadOperation
        General execute which can return anything of type T
        Specified by:
        execute in interface ReadOperation<T>
        Parameters:
        binding - the binding to execute in the context of
        Returns:
        T, the result of the execution
      • executeAsync

        public void executeAsync​(AsyncReadBinding binding,
                                 <AsyncBatchCursor<T>>> callback)
        Deprecated.
        Description copied from interface: AsyncReadOperation
        General execute which can return anything of type T
        Specified by:
        executeAsync in interface AsyncReadOperation<T>
        Parameters:
        binding - the binding to execute in the context of
        callback - the callback to be called when the operation has been executed