TResult - The type of the result.public interface MapReducePublisher<TResult>
extends org.reactivestreams.Publisher<TResult>
| Modifier and Type | Method and Description |
|---|---|
MapReducePublisher<TResult> |
action(MapReduceAction action)
Specify the
MapReduceAction to be used when writing to a collection. |
MapReducePublisher<TResult> |
batchSize(int batchSize)
Sets the number of documents to return per batch.
|
MapReducePublisher<TResult> |
bypassDocumentValidation(java.lang.Boolean bypassDocumentValidation)
Sets the bypass document level validation flag.
|
MapReducePublisher<TResult> |
collation(Collation collation)
Sets the collation options
|
MapReducePublisher<TResult> |
collectionName(java.lang.String collectionName)
Sets the collectionName for the output of the MapReduce
|
MapReducePublisher<TResult> |
databaseName(java.lang.String databaseName)
Sets the name of the database to output into.
|
MapReducePublisher<TResult> |
filter(Bson filter)
Sets the query filter to apply to the query.
|
MapReducePublisher<TResult> |
finalizeFunction(java.lang.String finalizeFunction)
Sets the JavaScript function that follows the reduce method and modifies the output.
|
org.reactivestreams.Publisher<TResult> |
first()
Helper to return a publisher limited to the first result.
|
MapReducePublisher<TResult> |
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.
|
MapReducePublisher<TResult> |
limit(int limit)
Sets the limit to apply.
|
MapReducePublisher<TResult> |
maxTime(long maxTime,
java.util.concurrent.TimeUnit timeUnit)
Sets the maximum execution time on the server for this operation.
|
MapReducePublisher<TResult> |
nonAtomic(boolean nonAtomic)
Sets if the post-processing step will prevent MongoDB from locking the database.
|
MapReducePublisher<TResult> |
scope(Bson scope)
Sets the global variables that are accessible in the map, reduce and finalize functions.
|
MapReducePublisher<TResult> |
sharded(boolean sharded)
Sets if the output database is sharded
|
MapReducePublisher<TResult> |
sort(Bson sort)
Sets the sort criteria to apply to the query.
|
org.reactivestreams.Publisher<Success> |
toCollection()
Aggregates documents to a collection according to the specified map-reduce function with the given options, which must specify a
non-inline result.
|
MapReducePublisher<TResult> |
verbose(boolean verbose)
Sets whether to include the timing information in the result information.
|
MapReducePublisher<TResult> collectionName(java.lang.String collectionName)
The default action is replace the collection if it exists, to change this use action(com.mongodb.client.model.MapReduceAction).
collectionName - the name of the collection that you want the map-reduce operation to write its output.MapReducePublisher<TResult> finalizeFunction(java.lang.String finalizeFunction)
finalizeFunction - the JavaScript function that follows the reduce method and modifies the output.MapReducePublisher<TResult> scope(Bson scope)
scope - the global variables that are accessible in the map, reduce and finalize functions.MapReducePublisher<TResult> sort(Bson sort)
sort - the sort criteria, which may be null.MapReducePublisher<TResult> filter(Bson filter)
filter - the filter to apply to the query.MapReducePublisher<TResult> limit(int limit)
limit - the limit, which may be nullMapReducePublisher<TResult> jsMode(boolean jsMode)
jsMode - the flag that specifies whether to convert intermediate data into BSON format between the execution of the map and
reduce functionsMapReducePublisher<TResult> verbose(boolean verbose)
verbose - whether to include the timing information in the result information.MapReducePublisher<TResult> maxTime(long maxTime, java.util.concurrent.TimeUnit timeUnit)
maxTime - the max timetimeUnit - the time unit, which may not be nullMapReducePublisher<TResult> action(MapReduceAction action)
MapReduceAction to be used when writing to a collection.action - an MapReduceAction to perform on the collectionMapReducePublisher<TResult> databaseName(java.lang.String databaseName)
databaseName - the name of the database to output into.MapReducePublisher<TResult> sharded(boolean sharded)
sharded - if the output database is shardedMapReducePublisher<TResult> nonAtomic(boolean nonAtomic)
MapReduceAction.MERGE or MapReduceAction.REDUCE actions.nonAtomic - if the post-processing step will prevent MongoDB from locking the database.MapReducePublisher<TResult> bypassDocumentValidation(java.lang.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.org.reactivestreams.Publisher<Success> toCollection()
MapReducePublisher<TResult> collation(Collation collation)
A null value represents the server default.
collation - the collation options to useMapReducePublisher<TResult> batchSize(int batchSize)
Overrides the Subscription.request(long) value for setting the batch size, allowing for fine grained
control over the underlying cursor.
batchSize - the batch sizeorg.reactivestreams.Publisher<TResult> first()