Skip to content

Instantly share code, notes, and snippets.

@trnl
Created March 14, 2012 14:44
Show Gist options
  • Save trnl/2036955 to your computer and use it in GitHub Desktop.
Save trnl/2036955 to your computer and use it in GitHub Desktop.
DBCollection c = mongo.getDB(Constants.DB_NAME).getCollection("B");
for (int i = 0; i < 100; i++) {
cursors.add(c.find().limit(10).batchSize(1));
}
for (int i = 0; i < 10; i++) {
for (DBCursor cursor : cursors) {
cursor.next();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment