Example usage for com.mongodb MapReduceOutput MapReduceOutput

List of usage examples for com.mongodb MapReduceOutput MapReduceOutput

Introduction

In this page you can find the example usage for com.mongodb MapReduceOutput MapReduceOutput.

Prototype

MapReduceOutput(final DBObject command, final DBCursor resultsFromCollection,
        final MapReduceStatistics mapReduceStatistics, final DBCollection outputCollection) 

Source Link

Document

Constructor for use when the map reduce output was put into a collection

Usage

From source file:org.mongojack.JacksonDBCollection.java

License:Apache License

/**
 * Performs a map reduce operation//w w  w  . jav a  2  s .  co m
 *
 * @param command The command to execute
 * @return The output
 * @throws MongoException If an error occurred
 */
public <S, L> MapReduceOutput<S, L> mapReduce(MapReduce.MapReduceCommand<S, L> command) throws MongoException {
    return new MapReduceOutput<S, L>(this, dbCollection.mapReduce(command.build(this)), command.getResultType(),
            command.getKeyType());
}