public class LimitOperation extends Object implements AggregationOperation
$limit-operation.
We recommend to use the static factory method Aggregation.limit(long) instead of creating instances of this
class directly.
| Constructor and Description |
|---|
LimitOperation(long maxElements) |
| Modifier and Type | Method and Description |
|---|---|
org.bson.Document |
toDocument(AggregationOperationContext context)
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waittoPipelineStagespublic LimitOperation(long maxElements)
maxElements - Number of documents to consider.public org.bson.Document toDocument(AggregationOperationContext context)
AggregationOperationtoDocument in interface AggregationOperationcontext - the AggregationOperationContext to operate within. Must not be null.Copyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.