|
Spring Data Document | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.data.mongodb.core.mapreduce.MapReduceOptions
public class MapReduceOptions
Constructor Summary | |
---|---|
MapReduceOptions()
|
Method Summary | |
---|---|
protected BasicDBObject |
createOutObject()
|
MapReduceOptions |
extraOption(String key,
Object value)
Add additional extra options that may not have a method on this class. |
MapReduceOptions |
finalizeFunction(String finalizeFunction)
Sets the finalize function |
Map<String,Object> |
getExtraOptions()
|
String |
getFinalizeFunction()
|
Boolean |
getJavaScriptMode()
|
DBObject |
getOptionsObject()
|
String |
getOutputCollection()
|
String |
getOutputDatabase()
|
Boolean |
getOutputSharded()
|
MapReduceCommand.OutputType |
getOutputType()
|
Map<String,Object> |
getScopeVariables()
|
MapReduceOptions |
javaScriptMode(boolean javaScriptMode)
Flag that toggles behavior in the map-reduce operation so as to avoid intermediate conversion to BSON between the map and reduce steps. |
MapReduceOptions |
limit(int limit)
Limit the number of objects to return from the collection that is fed into the map reduce operation Often used in conjunction with a query and sort option so as to reduce the portion of the data that will be processed. |
static MapReduceOptions |
options()
Static factory method to create a MapReduceOptions instance |
MapReduceOptions |
outputCollection(String collectionName)
The collection where the results from the map-reduce operation will be stored. |
MapReduceOptions |
outputDatabase(String outputDatabase)
The database where the results from the map-reduce operation will be stored. |
MapReduceOptions |
outputSharded(boolean outputShared)
If true and combined with an output mode that writes to a collection, the output collection will be sharded using the _id field. |
MapReduceOptions |
outputTypeInline()
With this option, no collection will be created, and the whole map-reduce operation will happen in RAM. |
MapReduceOptions |
outputTypeMerge()
This option will merge new data into the old output collection. |
MapReduceOptions |
outputTypeReduce()
If documents exists for a given key in the result set and in the old collection, then a reduce operation (using the specified reduce function) will be performed on the two values and the result will be written to the output collection. |
MapReduceOptions |
outputTypeReplace()
The output will be inserted into a collection which will atomically replace any existing collection with the same name. |
MapReduceOptions |
scopeVariables(Map<String,Object> scopeVariables)
Key-value pairs that are placed into JavaScript global scope and can be accessed from map, reduce, and finalize scripts. |
MapReduceOptions |
verbose(boolean verbose)
Flag to set that will provide statistics on job execution time. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MapReduceOptions()
Method Detail |
---|
public static MapReduceOptions options()
public MapReduceOptions limit(int limit)
limit
- Limit the number of objects to process
public MapReduceOptions outputCollection(String collectionName)
collectionName
- The name of the collection where the results of the map-reduce operation will be stored.
public MapReduceOptions outputDatabase(String outputDatabase)
outputDatabase
- The name of the database where the results of the map-reduce operation will be stored.
public MapReduceOptions outputTypeInline()
public MapReduceOptions outputTypeMerge()
public MapReduceOptions outputTypeReduce()
public MapReduceOptions outputTypeReplace()
public MapReduceOptions outputSharded(boolean outputShared)
outputShared
- if true, output will be sharded based on _id key.
public MapReduceOptions finalizeFunction(String finalizeFunction)
finalizeFunction
- The finalize function. Can be a JSON string or a Spring Resource URL
public MapReduceOptions scopeVariables(Map<String,Object> scopeVariables)
scopeVariables
- variables that can be accessed from map, reduce, and finalize scripts
public MapReduceOptions javaScriptMode(boolean javaScriptMode)
javaScriptMode
- if true, have the execution of map-reduce stay in JavaScript
public MapReduceOptions verbose(boolean verbose)
public MapReduceOptions extraOption(String key, Object value)
key
- The key optionvalue
- The value of the option
public Map<String,Object> getExtraOptions()
public String getFinalizeFunction()
public Boolean getJavaScriptMode()
public String getOutputCollection()
public String getOutputDatabase()
public Boolean getOutputSharded()
public MapReduceCommand.OutputType getOutputType()
public Map<String,Object> getScopeVariables()
public DBObject getOptionsObject()
protected BasicDBObject createOutObject()
|
Spring Data Document | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |