public final class DBCollectionChangeStreamOptions extends Object
Constructor and Description |
---|
DBCollectionChangeStreamOptions()
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
DBCollectionChangeStreamOptions |
batchSize(Integer batchSize)
Sets the batchSize
|
DBCollectionChangeStreamOptions |
collation(Collation collation)
Sets the collation
|
DBCollectionChangeStreamOptions |
fullDocument(FullDocument fullDocument)
Sets the fullDocument
|
Integer |
getBatchSize()
Returns the batchSize
|
Collation |
getCollation()
Returns the collation
|
FullDocument |
getFullDocument()
Returns the fullDocument
|
long |
getMaxAwaitTime(TimeUnit timeUnit)
The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor
query.
|
ReadConcern |
getReadConcern()
Gets the read concern
|
ReadPreference |
getReadPreference()
Returns the readPreference
|
DBObject |
getResumeToken()
Returns the resumeToken
|
DBCollectionChangeStreamOptions |
maxAwaitTime(long maxAwaitTime,
TimeUnit timeUnit)
Sets the maximum await execution time on the server for this operation.
|
DBCollectionChangeStreamOptions |
readConcern(ReadConcern readConcern)
Sets the read concern
|
DBCollectionChangeStreamOptions |
readPreference(ReadPreference readPreference)
Sets the readPreference
|
DBCollectionChangeStreamOptions |
resumeToken(DBObject resumeToken)
Sets the resumeToken
|
public DBCollectionChangeStreamOptions()
public Integer getBatchSize()
public DBCollectionChangeStreamOptions batchSize(Integer batchSize)
batchSize
- the batchSizepublic Collation getCollation()
public DBCollectionChangeStreamOptions collation(Collation collation)
collation
- the collationpublic FullDocument getFullDocument()
public DBCollectionChangeStreamOptions fullDocument(FullDocument fullDocument)
fullDocument
- the fullDocumentpublic long getMaxAwaitTime(TimeUnit timeUnit)
A zero value will be ignored.
timeUnit
- the time unit to return the result inpublic DBCollectionChangeStreamOptions 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 ReadConcern getReadConcern()
public DBCollectionChangeStreamOptions readConcern(ReadConcern readConcern)
readConcern
- the read concernpublic ReadPreference getReadPreference()
public DBCollectionChangeStreamOptions readPreference(ReadPreference readPreference)
readPreference
- the readPreferencepublic DBObject getResumeToken()
public DBCollectionChangeStreamOptions resumeToken(DBObject resumeToken)
resumeToken
- the resumeToken