public interface CursorPreparer extends ReadPreferenceAware
FindIterable.| Modifier and Type | Field and Description |
|---|---|
static CursorPreparer |
NO_OP_PREPARER
Default
CursorPreparer just passing on the given FindIterable. |
| Modifier and Type | Method and Description |
|---|---|
default com.mongodb.ReadPreference |
getReadPreference() |
default com.mongodb.client.FindIterable<org.bson.Document> |
initiateFind(com.mongodb.client.MongoCollection<org.bson.Document> collection,
Function<com.mongodb.client.MongoCollection<org.bson.Document>,com.mongodb.client.FindIterable<org.bson.Document>> find)
Apply query specific settings to
MongoCollection and initate a find operation returning a
FindIterable via the given find function. |
com.mongodb.client.FindIterable<org.bson.Document> |
prepare(com.mongodb.client.FindIterable<org.bson.Document> iterable)
Prepare the given cursor (apply limits, skips and so on).
|
hasReadPreferencestatic final CursorPreparer NO_OP_PREPARER
CursorPreparer just passing on the given FindIterable.com.mongodb.client.FindIterable<org.bson.Document> prepare(com.mongodb.client.FindIterable<org.bson.Document> iterable)
iterable - must not be null.default com.mongodb.client.FindIterable<org.bson.Document> initiateFind(com.mongodb.client.MongoCollection<org.bson.Document> collection,
Function<com.mongodb.client.MongoCollection<org.bson.Document>,com.mongodb.client.FindIterable<org.bson.Document>> find)
MongoCollection and initate a find operation returning a
FindIterable via the given find function.collection - must not be null.find - must not be null.IllegalArgumentException - if one of the required arguments is null.@Nullable default com.mongodb.ReadPreference getReadPreference()
getReadPreference in interface ReadPreferenceAwareReadPreference to apply or null if none defined.Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.