Class Limit
- java.lang.Object
-
- dev.morphia.aggregation.experimental.stages.Stage
-
- dev.morphia.aggregation.experimental.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 protected
Limit(long limit)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description long
getLimit()
static Limit
limit(long limit)
Creates the new stage.static Limit
of(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.experimental.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
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.
-
-