Package dev.morphia.aggregation.stages
Class Limit
- java.lang.Object
-
- dev.morphia.aggregation.stages.Stage
-
- dev.morphia.aggregation.stages.Limit
-
public class Limit extends Stage
Limits the number of documents passed to the next stage in the pipeline.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedLimit(long limit)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description longgetLimit()static Limitlimit(long limit)Creates the new stage.static Limitof(long limit)Deprecated, for removal: This API element is subject to removal in a future version.uselimit(long)-
Methods inherited from class dev.morphia.aggregation.stages.Stage
aggregation, stageName
-
-
-
-
Method Detail
-
limit
public static Limit limit(long limit)
Creates the new stage.- Parameters:
limit- the limit to apply- Returns:
- this
- Since:
- 2.2
-
of
@Deprecated(forRemoval=true) public static Limit of(long limit)
Deprecated, for removal: This API element is subject to removal in a future version.uselimit(long)Creates the new stage.- Parameters:
limit- the limit to apply- Returns:
- this
-
getLimit
@MorphiaInternal public long getLimit()
- Returns:
- the limit
Developer note.This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
-
-