Constructor and Description |
---|
CountOptions() |
Modifier and Type | Method and Description |
---|---|
CountOptions |
collation(Collation collation)
Sets the collation options
|
Collation |
getCollation()
Returns the collation options
|
Bson |
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.
|
int |
getSkip()
Gets the number of documents to skip.
|
CountOptions |
hint(Bson hint)
Sets the hint to apply.
|
CountOptions |
hintString(String hint)
Sets the hint to apply.
|
CountOptions |
limit(int limit)
Sets the limit to apply.
|
CountOptions |
maxTime(long maxTime,
TimeUnit timeUnit)
Sets the maximum execution time on the server for this operation.
|
CountOptions |
skip(int skip)
Sets the number of documents to skip.
|
public Bson getHint()
public String getHintString()
public CountOptions hint(Bson hint)
hint
- a document describing the index which should be used for this operation.public CountOptions hintString(String hint)
hint
- the name of the index which should be used for the operationpublic int getLimit()
public CountOptions limit(int limit)
limit
- the limitpublic int getSkip()
public CountOptions skip(int skip)
skip
- the number of documents to skippublic long getMaxTime(TimeUnit timeUnit)
timeUnit
- the time unit to return the result inpublic CountOptions maxTime(long maxTime, TimeUnit timeUnit)
maxTime
- the max timetimeUnit
- the time unit, which may not be nullpublic Collation getCollation()
public CountOptions collation(Collation collation)
A null value represents the server default.
collation
- the collation options to use