public enum MapReduceAction extends Enum<MapReduceAction>
These actions are only available when passing out a collection that already exists. This option is not available on secondary members of replica sets. The Enum values dictate what to do with the output collection if it already exists when the map reduce is run.
Enum Constant and Description |
---|
MERGE
Merge the new result with the existing result if the output collection already exists.
|
REDUCE
Merge the new result with the existing result if the output collection already exists.
|
REPLACE
Replace the contents of the
collectionName if the collection with the collectionName exists. |
Modifier and Type | Method and Description |
---|---|
String |
getValue() |
static MapReduceAction |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MapReduceAction[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MapReduceAction REPLACE
collectionName
if the collection with the collectionName
exists.public static final MapReduceAction MERGE
public static final MapReduceAction REDUCE
public static MapReduceAction[] values()
for (MapReduceAction c : MapReduceAction.values()) System.out.println(c);
public static MapReduceAction valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getValue()