public class DBCollectionCountOptions
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private Collation |
collation |
private DBObject |
hint |
private java.lang.String |
hintString |
private int |
limit |
private long |
maxTimeMS |
private ReadConcern |
readConcern |
private ReadPreference |
readPreference |
private int |
skip |
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.
|
java.lang.String |
getHintString()
Gets the hint string to apply.
|
int |
getLimit()
Gets the limit to apply.
|
long |
getMaxTime(java.util.concurrent.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(java.lang.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,
java.util.concurrent.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.
|
private DBObject hint
private java.lang.String hintString
private int limit
private int skip
private long maxTimeMS
private ReadPreference readPreference
private ReadConcern readConcern
private Collation collation
public DBCollectionCountOptions()
public DBObject getHint()
public java.lang.String getHintString()
public DBCollectionCountOptions hint(DBObject hint)
hint
- a document describing the index which should be used for this operation.public DBCollectionCountOptions hintString(java.lang.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(java.util.concurrent.TimeUnit timeUnit)
timeUnit
- the time unit to return the result inpublic DBCollectionCountOptions maxTime(long maxTime, java.util.concurrent.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