Example usage for com.mongodb.client MongoCursor interface-usage

List of usage examples for com.mongodb.client MongoCursor interface-usage

Introduction

In this page you can find the example usage for com.mongodb.client MongoCursor interface-usage.

Usage

From source file io.dirigible.mongodb.jdbc.util.LocalIteratorMongoCursor.java

public class LocalIteratorMongoCursor implements MongoCursor<String> {

    Iterator<String> iterator;

    LocalIteratorMongoCursor(Iterator<String> iterator) {
        this.iterator = iterator;

From source file org.opencb.commons.datastore.mongodb.MongoPersistentCursor.java

/**
 * MongoDBCursor wrapper for queries that require a long time to process the results.
 * Avoids {@link MongoCursorNotFoundException}.
 * Will sort the results in natural order, to ensure that any value is returned twice.
 * Will fail if the projection excludes the "_id" field.
 * Can deal with a server shutdown that releases the cursor descriptor, but not with a {@link com.mongodb.MongoSocketOpenException}