Package com.mongodb
Class ParallelScanOptions
- java.lang.Object
-
- com.mongodb.ParallelScanOptions
-
@Immutable public final class ParallelScanOptions extends java.lang.Object
The options to use for a parallel collection scan.- Since:
- 2.12
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ParallelScanOptions.Builder
A builder for the options
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ParallelScanOptions.Builder
builder()
Create a builder for the optionsint
getBatchSize()
Gets the batch size to use for each cursor.int
getNumCursors()
Gets the number of cursors requested.ReadPreference
getReadPreference()
Gets the read preference to use.
-
-
-
Method Detail
-
builder
public static ParallelScanOptions.Builder builder()
Create a builder for the options- Returns:
- the builder
-
getNumCursors
public int getNumCursors()
Gets the number of cursors requested. The default value is 1.- Returns:
- number of cursors requested.
-
getBatchSize
public int getBatchSize()
Gets the batch size to use for each cursor. The default value is 0, which tells the server to use its own default batch size.- Returns:
- batch size
-
getReadPreference
@Nullable public ReadPreference getReadPreference()
Gets the read preference to use.- Returns:
- read preference
-
-