Package com.mongodb.client
Interface MapReduceIterable<TResult>
-
- Type Parameters:
TResult
- The type of the result.
- All Superinterfaces:
java.lang.Iterable<TResult>
,MongoIterable<TResult>
@Deprecated(since="2021-05-27") public interface MapReduceIterable<TResult> extends MongoIterable<TResult>
Deprecated.Usage of this API is not supported in AEM as a Cloud Service.Iterable for map-reduce.By default the
MapReduceIterable
returns the results inline. You can write map-reduce output to a collection by using thecollectionName(String)
method.- Since:
- 3.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description MapReduceIterable<TResult>
action(MapReduceAction action)
Deprecated.Specify theMapReduceAction
to be used when writing to a collection.MapReduceIterable<TResult>
batchSize(int batchSize)
Deprecated.Sets the number of documents to return per batch.MapReduceIterable<TResult>
bypassDocumentValidation(java.lang.Boolean bypassDocumentValidation)
Deprecated.Sets the bypass document level validation flag.MapReduceIterable<TResult>
collation(Collation collation)
Deprecated.Sets the collation optionsMapReduceIterable<TResult>
collectionName(java.lang.String collectionName)
Deprecated.Sets the collectionName for the output of the MapReduceMapReduceIterable<TResult>
databaseName(java.lang.String databaseName)
Deprecated.Sets the name of the database to output into.MapReduceIterable<TResult>
filter(Bson filter)
Deprecated.Sets the query filter to apply to the query.MapReduceIterable<TResult>
finalizeFunction(java.lang.String finalizeFunction)
Deprecated.Sets the JavaScript function that follows the reduce method and modifies the output.MapReduceIterable<TResult>
jsMode(boolean jsMode)
Deprecated.Sets the flag that specifies whether to convert intermediate data into BSON format between the execution of the map and reduce functions.MapReduceIterable<TResult>
limit(int limit)
Deprecated.Sets the limit to apply.MapReduceIterable<TResult>
maxTime(long maxTime, java.util.concurrent.TimeUnit timeUnit)
Deprecated.Sets the maximum execution time on the server for this operation.MapReduceIterable<TResult>
nonAtomic(boolean nonAtomic)
Deprecated.Sets if the post-processing step will prevent MongoDB from locking the database.MapReduceIterable<TResult>
scope(Bson scope)
Deprecated.Sets the global variables that are accessible in the map, reduce and finalize functions.MapReduceIterable<TResult>
sharded(boolean sharded)
Deprecated.Sets if the output database is shardedMapReduceIterable<TResult>
sort(Bson sort)
Deprecated.Sets the sort criteria to apply to the query.void
toCollection()
Deprecated.Aggregates documents to a collection according to the specified map-reduce function with the given options, which must specify a non-inline result.MapReduceIterable<TResult>
verbose(boolean verbose)
Deprecated.Sets whether to include the timing information in the result information.
-
-
-
Method Detail
-
toCollection
void toCollection()
Deprecated.Aggregates documents to a collection according to the specified map-reduce function with the given options, which must specify a non-inline result.- Throws:
java.lang.IllegalStateException
- if a collection name to write the results to has not been specified- Since:
- 3.4
- See Also:
collectionName(String)
-
collectionName
MapReduceIterable<TResult> collectionName(java.lang.String collectionName)
Deprecated.Sets the collectionName for the output of the MapReduceThe default action is replace the collection if it exists, to change this use
action(com.mongodb.client.model.MapReduceAction)
.- Parameters:
collectionName
- the name of the collection that you want the map-reduce operation to write its output.- Returns:
- this
-
finalizeFunction
MapReduceIterable<TResult> finalizeFunction(@Nullable java.lang.String finalizeFunction)
Deprecated.Sets the JavaScript function that follows the reduce method and modifies the output.- Parameters:
finalizeFunction
- the JavaScript function that follows the reduce method and modifies the output.- Returns:
- this
-
scope
MapReduceIterable<TResult> scope(@Nullable Bson scope)
Deprecated.Sets the global variables that are accessible in the map, reduce and finalize functions.- Parameters:
scope
- the global variables that are accessible in the map, reduce and finalize functions.- Returns:
- this
-
sort
MapReduceIterable<TResult> sort(@Nullable Bson sort)
Deprecated.Sets the sort criteria to apply to the query.- Parameters:
sort
- the sort criteria, which may be null.- Returns:
- this
-
filter
MapReduceIterable<TResult> filter(@Nullable Bson filter)
Deprecated.Sets the query filter to apply to the query.- Parameters:
filter
- the filter to apply to the query.- Returns:
- this
-
limit
MapReduceIterable<TResult> limit(int limit)
Deprecated.Sets the limit to apply.- Parameters:
limit
- the limit, which may be null- Returns:
- this
-
jsMode
MapReduceIterable<TResult> jsMode(boolean jsMode)
Deprecated.Sets the flag that specifies whether to convert intermediate data into BSON format between the execution of the map and reduce functions. Defaults to false.- Parameters:
jsMode
- the flag that specifies whether to convert intermediate data into BSON format between the execution of the map and reduce functions- Returns:
- jsMode
-
verbose
MapReduceIterable<TResult> verbose(boolean verbose)
Deprecated.Sets whether to include the timing information in the result information.- Parameters:
verbose
- whether to include the timing information in the result information.- Returns:
- this
-
maxTime
MapReduceIterable<TResult> maxTime(long maxTime, java.util.concurrent.TimeUnit timeUnit)
Deprecated.Sets the maximum execution time on the server for this operation.- Parameters:
maxTime
- the max timetimeUnit
- the time unit, which may not be null- Returns:
- this
-
action
MapReduceIterable<TResult> action(MapReduceAction action)
Deprecated.Specify theMapReduceAction
to be used when writing to a collection.- Parameters:
action
- anMapReduceAction
to perform on the collection- Returns:
- this
-
databaseName
MapReduceIterable<TResult> databaseName(@Nullable java.lang.String databaseName)
Deprecated.Sets the name of the database to output into.- Parameters:
databaseName
- the name of the database to output into.- Returns:
- this
-
sharded
MapReduceIterable<TResult> sharded(boolean sharded)
Deprecated.Sets if the output database is sharded- Parameters:
sharded
- if the output database is sharded- Returns:
- this
-
nonAtomic
MapReduceIterable<TResult> nonAtomic(boolean nonAtomic)
Deprecated.Sets if the post-processing step will prevent MongoDB from locking the database. Valid only with theMapReduceAction.MERGE
orMapReduceAction.REDUCE
actions.- Parameters:
nonAtomic
- if the post-processing step will prevent MongoDB from locking the database.- Returns:
- this
-
batchSize
MapReduceIterable<TResult> batchSize(int batchSize)
Deprecated.Sets the number of documents to return per batch.- Specified by:
batchSize
in interfaceMongoIterable<TResult>
- Parameters:
batchSize
- the batch size- Returns:
- this
-
bypassDocumentValidation
MapReduceIterable<TResult> bypassDocumentValidation(@Nullable java.lang.Boolean bypassDocumentValidation)
Deprecated.Sets the bypass document level validation flag.Note: This only applies when an $out stage is specified
.- Parameters:
bypassDocumentValidation
- If true, allows the write to opt-out of document level validation.- Returns:
- this
- Since:
- 3.2
-
collation
MapReduceIterable<TResult> collation(@Nullable Collation collation)
Deprecated.Sets the collation optionsA null value represents the server default.
- Parameters:
collation
- the collation options to use- Returns:
- this
- Since:
- 3.4
-
-