Class AggregateOperation<T>

    • Constructor Detail

      • AggregateOperation

        public AggregateOperation​(MongoNamespace namespace,
                                  List<BsonDocument> pipeline,
                                  Decoder<T> decoder)
        Deprecated. 
        Construct a new instance.
        Parameters:
        namespace - the database and collection namespace for the operation.
        pipeline - the aggregation pipeline.
        decoder - the decoder for the result documents.
      • AggregateOperation

        public AggregateOperation​(MongoNamespace namespace,
                                  List<BsonDocument> pipeline,
                                  Decoder<T> decoder,
                                  AggregationLevel aggregationLevel)
        Deprecated. 
        Construct a new instance.
        Parameters:
        namespace - the database and collection namespace for the operation.
        pipeline - the aggregation pipeline.
        decoder - the decoder for the result documents.
        aggregationLevel - the aggregation level
        Since:
        3.10
    • Method Detail

      • getAllowDiskUse

        public Boolean getAllowDiskUse​()
        Deprecated. 
        Whether writing to temporary files is enabled. A null value indicates that it's unspecified.
        Returns:
        true if writing to temporary files is enabled
        MongoDB documentation
        Aggregation
        Since server release
        2.6
      • allowDiskUse

        public AggregateOperation<T> allowDiskUse​(Boolean allowDiskUse)
        Deprecated. 
        Enables writing to temporary files. A null value indicates that it's unspecified.
        Parameters:
        allowDiskUse - true if writing to temporary files is enabled
        Returns:
        this
        MongoDB documentation
        Aggregation
        Since server release
        2.6
      • getBatchSize

        public Integer getBatchSize​()
        Deprecated. 
        Gets the number of documents to return per batch. Default to 0, which indicates that the server chooses an appropriate batch size.
        Returns:
        the batch size, which may be null
        MongoDB documentation
        Batch Size
      • batchSize

        public AggregateOperation<T> batchSize​(Integer batchSize)
        Deprecated. 
        Sets the number of documents to return per batch.
        Parameters:
        batchSize - the batch size
        Returns:
        this
        MongoDB documentation
        Batch Size
      • getMaxAwaitTime

        public long getMaxAwaitTime​(TimeUnit timeUnit)
        Deprecated. 
        The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor query. This only applies to a TAILABLE_AWAIT cursor. When the cursor is not a TAILABLE_AWAIT cursor, this option is ignored. A zero value will be ignored.
        Parameters:
        timeUnit - the time unit to return the result in
        Returns:
        the maximum await execution time in the given time unit
        MongoDB documentation
        Max Time
        Since server release
        3.6
      • maxAwaitTime

        public AggregateOperation<T> maxAwaitTime​(long maxAwaitTime,
                                                  TimeUnit timeUnit)
        Deprecated. 
        Sets the maximum await execution time on the server for this operation.
        Parameters:
        maxAwaitTime - the max await time. A value less than one will be ignored, and indicates that the driver should respect the server's default value
        timeUnit - the time unit, which may not be null
        Returns:
        this
        Since server release
        3.6
      • getMaxTime

        public long getMaxTime​(TimeUnit timeUnit)
        Deprecated. 
        Gets the maximum execution time on the server for this operation. The default is 0, which places no limit on the execution time.
        Parameters:
        timeUnit - the time unit to return the result in
        Returns:
        the maximum execution time in the given time unit
        MongoDB documentation
        Max Time
      • maxTime

        public AggregateOperation<T> maxTime​(long maxTime,
                                             TimeUnit timeUnit)
        Deprecated. 
        Sets the maximum execution time on the server for this operation.
        Parameters:
        maxTime - the max time
        timeUnit - the time unit, which may not be null
        Returns:
        this
        MongoDB documentation
        Max Time
      • getUseCursor

        @Deprecated
        public Boolean getUseCursor​()
        Deprecated. There is no replacement for this. Applications can assume that the driver will use a cursor for server versions that support it (>= 2.6). The driver will ignore this as of MongoDB 3.6, which does not support inline results for the aggregate command.
        Gets whether the server should use a cursor to return results. The default value is null, in which case a cursor will be used if the server supports it.
        Returns:
        whether the server should use a cursor to return results
        MongoDB documentation
        Aggregation
        Since server release
        2.6
      • useCursor

        @Deprecated
        public AggregateOperation<T> useCursor​(Boolean useCursor)
        Deprecated. There is no replacement for this. Applications can assume that the driver will use a cursor for server versions that support it (>= 2.6). The driver will ignore this as of MongoDB 3.6, which does not support inline results for the aggregate command.
        Sets whether the server should use a cursor to return results.
        Parameters:
        useCursor - whether the server should use a cursor to return results
        Returns:
        this
        MongoDB documentation
        Aggregation
        Since server release
        2.6
      • getCollation

        public Collation getCollation​()
        Deprecated. 
        Returns the collation options
        Returns:
        the collation options
        Since:
        3.4
        MongoDB documentation
        Aggregation
        Since server release
        3.4
      • collation

        public AggregateOperation<T> collation​(Collation collation)
        Deprecated. 
        Sets the collation options

        A null value represents the server default.

        Parameters:
        collation - the collation options to use
        Returns:
        this
        Since:
        3.4
        MongoDB documentation
        Aggregation
        Since server release
        3.4
      • getComment

        public String getComment​()
        Deprecated. 
        Returns the comment to send with the aggregate. The default is not to include a comment with the aggregation.
        Returns:
        the comment
        Since:
        3.6
        Since server release
        3.6
      • comment

        public AggregateOperation<T> comment​(String comment)
        Deprecated. 
        Sets the comment to the aggregation. A null value means no comment is set.
        Parameters:
        comment - the comment
        Returns:
        this
        Since:
        3.6
        Since server release
        3.6
      • getHint

        public BsonDocument getHint​()
        Deprecated. 
        Returns the hint for which index to use. The default is not to set a hint.
        Returns:
        the hint
        Since:
        3.6
        Since server release
        3.6
      • getHintBsonValue

        public BsonValue getHintBsonValue​()
        Deprecated. 
        Returns the hint BsonValue for which index to use. The default is not to set a hint.

        Hints can either be a BsonString or a BsonDocument.

        Returns:
        the hint
        Since:
        3.8
        Since server release
        3.6
      • hint

        public AggregateOperation<T> hint​(BsonValue hint)
        Deprecated. 
        Sets the hint for which index to use. A null value means no hint is set.
        Parameters:
        hint - the hint
        Returns:
        this
        Since:
        3.6
        Since server release
        3.6
      • 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
      • asExplainableOperation

        public ReadOperation<BsonDocument> asExplainableOperation​(ExplainVerbosity explainVerbosity)
        Deprecated. 
        Gets an operation whose execution explains this operation.
        Parameters:
        explainVerbosity - the explain verbosity
        Returns:
        a read operation that when executed will explain this operation
      • asExplainableOperationAsync

        public AsyncReadOperation<BsonDocument> asExplainableOperationAsync​(ExplainVerbosity explainVerbosity)
        Deprecated. 
        Gets an operation whose execution explains this operation.
        Parameters:
        explainVerbosity - the explain verbosity
        Returns:
        a read operation that when executed will explain this operation