public class MapReduceOptions extends Object
| Constructor and Description |
|---|
MapReduceOptions() |
| Modifier and Type | Method and Description |
|---|---|
MapReduceOptions |
action(com.mongodb.client.model.MapReduceAction action)
Specify the
MapReduceAction to be used when writing to a collection. |
<T> com.mongodb.reactivestreams.client.MapReducePublisher<T> |
apply(com.mongodb.reactivestreams.client.MapReducePublisher<T> stream) |
MapReduceOptions |
bypassDocumentValidation(boolean bypassDocumentValidation)
Sets the bypass document level validation flag.
|
MapReduceOptions |
collation(com.mongodb.client.model.Collation collation)
Sets the collation options
|
MapReduceOptions |
collectionName(String collectionName)
Sets the collectionName for the output of the MapReduce
|
MapReduceOptions |
databaseName(String databaseName)
Sets the name of the database to output into.
|
MapReduceOptions |
filter(org.bson.conversions.Bson filter)
Sets the query filter to apply to the query.
|
MapReduceOptions |
finalizeFunction(String finalizeFunction)
Sets the JavaScript function that follows the reduce method and modifies the output.
|
MapReduceOptions |
jsMode(boolean jsMode)
Sets the flag that specifies whether to convert intermediate data into BSON format between the execution of the
map and reduce functions.
|
MapReduceOptions |
limit(int limit)
Sets the limit to apply.
|
MapReduceOptions |
maxTime(long maxTime,
TimeUnit timeUnit)
Sets the maximum execution time on the server for this operation.
|
MapReduceOptions |
nonAtomic(boolean nonAtomic)
Sets if the post-processing step will prevent MongoDB from locking the database.
|
MapReduceOptions |
scope(org.bson.conversions.Bson scope)
Sets the global variables that are accessible in the map, reduce and finalize functions.
|
MapReduceOptions |
sharded(boolean sharded)
Sets if the output database is sharded
|
MapReduceOptions |
sort(org.bson.conversions.Bson sort)
Sets the sort criteria to apply to the query.
|
MapReduceOptions |
verbose(boolean verbose)
Sets whether to include the timing information in the result information.
|
public MapReduceOptions collectionName(String collectionName)
The default action is replace the collection if it exists, to change this use action.
collectionName - the name of the collection that you want the map-reduce operation to write its output.public MapReduceOptions finalizeFunction(String finalizeFunction)
finalizeFunction - the JavaScript function that follows the reduce method and modifies the output.public MapReduceOptions scope(org.bson.conversions.Bson scope)
scope - the global variables that are accessible in the map, reduce and finalize functions.public MapReduceOptions sort(org.bson.conversions.Bson sort)
sort - the sort criteria, which may be null.public MapReduceOptions filter(org.bson.conversions.Bson filter)
filter - the filter to apply to the query.public MapReduceOptions limit(int limit)
limit - the limit, which may be nullpublic MapReduceOptions jsMode(boolean jsMode)
jsMode - the flag that specifies whether to convert intermediate data into BSON format between the
execution of the map and reduce functionspublic MapReduceOptions verbose(boolean verbose)
verbose - whether to include the timing information in the result information.public MapReduceOptions maxTime(long maxTime, TimeUnit timeUnit)
maxTime - the max timetimeUnit - the time unit, which may not be nullpublic MapReduceOptions action(com.mongodb.client.model.MapReduceAction action)
MapReduceAction to be used when writing to a collection.action - an MapReduceAction to perform on the collectionpublic MapReduceOptions databaseName(String databaseName)
databaseName - the name of the database to output into.public MapReduceOptions sharded(boolean sharded)
sharded - if the output database is shardedpublic MapReduceOptions nonAtomic(boolean nonAtomic)
Valid only with the MapReduceAction.MERGE or MapReduceAction.REDUCE actions.
nonAtomic - if the post-processing step will prevent MongoDB from locking the database.public MapReduceOptions bypassDocumentValidation(boolean bypassDocumentValidation)
Note: This only applies when an $out stage is specified
.bypassDocumentValidation - If true, allows the write to opt-out of document level validation.public MapReduceOptions collation(com.mongodb.client.model.Collation collation)
A null value represents the server default.
collation - the collation options to usepublic <T> com.mongodb.reactivestreams.client.MapReducePublisher<T> apply(com.mongodb.reactivestreams.client.MapReducePublisher<T> stream)
Copyright © 2020 JBoss by Red Hat. All rights reserved.