| Constructor and Description | 
|---|
| FindOptions()Construct a new instance. | 
| FindOptions(FindOptions from)Construct a new instance by making a shallow copy of the given model. | 
| Modifier and Type | Method and Description | 
|---|---|
| FindOptions | batchSize(int batchSize)Sets the number of documents to return per batch. | 
| FindOptions | collation(Collation collation)Sets the collation options | 
| FindOptions | cursorType(CursorType cursorType)Sets the cursor type. | 
| int | getBatchSize()Gets the number of documents to return per batch. | 
| Collation | getCollation()Returns the collation options | 
| CursorType | getCursorType()Get the cursor type. | 
| int | getLimit()Gets the limit to apply. | 
| long | getMaxAwaitTime(TimeUnit timeUnit)The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor
 query. | 
| long | getMaxTime(TimeUnit timeUnit)Gets the maximum execution time on the server for this operation. | 
| Bson | getModifiers()Gets the query modifiers to apply to this operation. | 
| Bson | getProjection()Gets a document describing the fields to return for all matching documents. | 
| int | getSkip()Gets the number of documents to skip. | 
| Bson | getSort()Gets the sort criteria to apply to the query. | 
| boolean | isNoCursorTimeout()The server normally times out idle cursors after an inactivity period (10 minutes)
 to prevent excess memory use. | 
| boolean | isOplogReplay()Users should not set this under normal circumstances. | 
| boolean | isPartial()Get partial results from a sharded cluster if one or more shards are unreachable (instead of throwing an error). | 
| FindOptions | limit(int limit)Sets the limit to apply. | 
| FindOptions | maxAwaitTime(long maxAwaitTime,
            TimeUnit timeUnit)Sets the maximum await execution time on the server for this operation. | 
| FindOptions | maxTime(long maxTime,
       TimeUnit timeUnit)Sets the maximum execution time on the server for this operation. | 
| FindOptions | modifiers(Bson modifiers)Sets the query modifiers to apply to this operation. | 
| FindOptions | noCursorTimeout(boolean noCursorTimeout)The server normally times out idle cursors after an inactivity period (10 minutes)
 to prevent excess memory use. | 
| FindOptions | oplogReplay(boolean oplogReplay)Users should not set this under normal circumstances. | 
| FindOptions | partial(boolean partial)Get partial results from a sharded cluster if one or more shards are unreachable (instead of throwing an error). | 
| FindOptions | projection(Bson projection)Sets a document describing the fields to return for all matching documents. | 
| FindOptions | skip(int skip)Sets the number of documents to skip. | 
| FindOptions | sort(Bson sort)Sets the sort criteria to apply to the query. | 
| String | toString() | 
public FindOptions()
public FindOptions(FindOptions from)
from - model to copypublic int getLimit()
public FindOptions limit(int limit)
limit - the limit, which may be nullpublic int getSkip()
public FindOptions skip(int skip)
skip - the number of documents to skippublic long getMaxTime(TimeUnit timeUnit)
timeUnit - the time unit to return the result inpublic FindOptions maxTime(long maxTime, TimeUnit timeUnit)
maxTime - the max timetimeUnit - the time unit, which may not be nullpublic long getMaxAwaitTime(TimeUnit timeUnit)
timeUnit - the time unit to return the result inpublic FindOptions maxAwaitTime(long maxAwaitTime, TimeUnit timeUnit)
maxAwaitTime - the max await time.  A zero value will be ignored, and indicates that the driver should respect the server's
                      default valuetimeUnit - the time unit, which may not be nullpublic int getBatchSize()
public FindOptions batchSize(int batchSize)
batchSize - the batch sizepublic Bson getModifiers()
public FindOptions modifiers(Bson modifiers)
modifiers - the query modifiers to apply, which may be null.public Bson getProjection()
public FindOptions projection(Bson projection)
projection - the project document, which may be null.public Bson getSort()
public FindOptions sort(Bson sort)
sort - the sort criteria, which may be null.public boolean isNoCursorTimeout()
public FindOptions noCursorTimeout(boolean noCursorTimeout)
noCursorTimeout - true if cursor timeout is disabledpublic boolean isOplogReplay()
public FindOptions oplogReplay(boolean oplogReplay)
oplogReplay - if oplog replay is enabledpublic boolean isPartial()
public FindOptions partial(boolean partial)
partial - if partial results for sharded clusters is enabledpublic CursorType getCursorType()
public FindOptions cursorType(CursorType cursorType)
cursorType - the cursor typepublic Collation getCollation()
public FindOptions collation(Collation collation)
A null value represents the server default.
collation - the collation options to use