Constructor and Description |
---|
DBCollectionCountOptions()
Construct a new instance
|
Modifier and Type | Method and Description |
---|---|
DBCollectionCountOptions |
collation(Collation collation)
Sets the collation
|
Collation |
getCollation()
Returns the collation options
|
DBObject |
getHint()
Gets the hint to apply.
|
String |
getHintString()
Gets the hint string to apply.
|
int |
getLimit()
Gets the limit to apply.
|
long |
getMaxTime(TimeUnit timeUnit)
Gets the maximum execution time on the server for this operation.
|
ReadConcern |
getReadConcern()
Returns the readConcern
|
ReadPreference |
getReadPreference()
Returns the readPreference
|
int |
getSkip()
Gets the number of documents to skip.
|
DBCollectionCountOptions |
hint(DBObject hint)
Sets the hint to apply.
|
DBCollectionCountOptions |
hintString(String hint)
Sets the hint to apply.
|
DBCollectionCountOptions |
limit(int limit)
Sets the limit to apply.
|
DBCollectionCountOptions |
limit(long limit)
Sets the limit to apply.
|
DBCollectionCountOptions |
maxTime(long maxTime,
TimeUnit timeUnit)
Sets the maximum execution time on the server for this operation.
|
DBCollectionCountOptions |
readConcern(ReadConcern readConcern)
Sets the readConcern
|
DBCollectionCountOptions |
readPreference(ReadPreference readPreference)
Sets the readPreference
|
DBCollectionCountOptions |
skip(int skip)
Sets the number of documents to skip.
|
DBCollectionCountOptions |
skip(long skip)
Sets the number of documents to skip.
|
public DBCollectionCountOptions()
public DBObject getHint()
public String getHintString()
public DBCollectionCountOptions hint(DBObject hint)
hint
- a document describing the index which should be used for this operation.public DBCollectionCountOptions hintString(String hint)
hint
- the name of the index which should be used for the operationpublic int getLimit()
public DBCollectionCountOptions limit(int limit)
limit
- the limitpublic int getSkip()
public DBCollectionCountOptions skip(int skip)
skip
- the number of documents to skippublic DBCollectionCountOptions limit(long limit)
limit
- the limitpublic DBCollectionCountOptions skip(long skip)
skip
- the number of documents to skippublic long getMaxTime(TimeUnit timeUnit)
timeUnit
- the time unit to return the result inpublic DBCollectionCountOptions maxTime(long maxTime, TimeUnit timeUnit)
maxTime
- the max timetimeUnit
- the time unit, which may not be nullpublic ReadPreference getReadPreference()
public DBCollectionCountOptions readPreference(ReadPreference readPreference)
readPreference
- the readPreferencepublic ReadConcern getReadConcern()
public DBCollectionCountOptions readConcern(ReadConcern readConcern)
readConcern
- the readConcernpublic Collation getCollation()
public DBCollectionCountOptions collation(Collation collation)
collation
- the collation