Class Sample
- java.lang.Object
-
- dev.morphia.aggregation.experimental.stages.Stage
-
- dev.morphia.aggregation.experimental.stages.Sample
-
public class Sample extends Stage
Randomly selects the specified number of documents from its input.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Sample(long size)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getSize()
static Sample
of(long size)
Creates a new stage with the given sample size.-
Methods inherited from class dev.morphia.aggregation.experimental.stages.Stage
getStageName
-
-
-
-
Method Detail
-
of
public static Sample of(long size)
Creates a new stage with the given sample size.- Parameters:
size
- the sample size- Returns:
- the new stage
-
getSize
public long getSize()
- Returns:
- the size
Developer note.This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
-
-