private AggregateOperation<BsonDocument> getAggregateOperation() { return new AggregateOperation<BsonDocument>(namespace, getPipeline(), DECODER) .collation(collation) .hint(hint) .maxTime(maxTimeMS, TimeUnit.MILLISECONDS); }
@SuppressWarnings("deprecation") <TResult> AggregateOperation<TResult> aggregate(final List<? extends Bson> pipeline, final Class<TResult> resultClass, final long maxTimeMS, final long maxAwaitTimeMS, final Integer batchSize, final Collation collation, final Bson hint, final String comment, final Boolean allowDiskUse, final Boolean useCursor, final AggregationLevel aggregationLevel) { return new AggregateOperation<TResult>(namespace, toBsonDocumentList(pipeline), codecRegistry.get(resultClass), aggregationLevel) .maxTime(maxTimeMS, MILLISECONDS) .maxAwaitTime(maxAwaitTimeMS, MILLISECONDS) .allowDiskUse(allowDiskUse) .batchSize(batchSize) .useCursor(useCursor) .collation(collation) .hint(hint == null ? null : hint.toBsonDocument(documentClass, codecRegistry)) .comment(comment); }
private AggregateOperation<BsonDocument> getAggregateOperation() { return new AggregateOperation<BsonDocument>(namespace, getPipeline(), DECODER) .collation(collation) .hint(hint) .maxTime(maxTimeMS, TimeUnit.MILLISECONDS); }
@SuppressWarnings("deprecation") <TResult> AggregateOperation<TResult> aggregate(final List<? extends Bson> pipeline, final Class<TResult> resultClass, final long maxTimeMS, final long maxAwaitTimeMS, final Integer batchSize, final Collation collation, final Bson hint, final String comment, final Boolean allowDiskUse, final Boolean useCursor, final AggregationLevel aggregationLevel) { return new AggregateOperation<TResult>(namespace, toBsonDocumentList(pipeline), codecRegistry.get(resultClass), aggregationLevel) .maxTime(maxTimeMS, MILLISECONDS) .maxAwaitTime(maxAwaitTimeMS, MILLISECONDS) .allowDiskUse(allowDiskUse) .batchSize(batchSize) .useCursor(useCursor) .collation(collation) .hint(hint == null ? null : hint.toBsonDocument(documentClass, codecRegistry)) .comment(comment); }