Example usage for com.mongodb MapReduceOutput drop

List of usage examples for com.mongodb MapReduceOutput drop

Introduction

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

Prototype

public void drop() 

Source Link

Document

Drops the collection that holds the results.

Usage

From source file:org.iternine.jeppetto.dao.mongodb.projections.MapReduceCommand.java

License:Apache License

@Override
public final Object singleResult(DBCollection dbCollection) {
    MapReduceOutput output = dbCollection.mapReduce(createMapFunction(), createReduceFunction(), null, query);
    DBCursor cursor = output.results();/*from   ww w  .j  a v  a  2 s.co  m*/

    try {
        return transformToValue(cursor);
    } finally {
        output.drop();
    }
}