public class DBCollectionCountOptions
extends java.lang.Object
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.
|
public DBCollectionCountOptions()
@Nullable public DBObject getHint()
@Nullable public java.lang.String getHintString()
public DBCollectionCountOptions hint(@Nullable DBObject hint)
hint
- a document describing the index which should be used for this operation.public DBCollectionCountOptions hintString(@Nullable 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 null@Nullable public ReadPreference getReadPreference()
public DBCollectionCountOptions readPreference(@Nullable ReadPreference readPreference)
readPreference
- the readPreference@Nullable public ReadConcern getReadConcern()
public DBCollectionCountOptions readConcern(@Nullable ReadConcern readConcern)
readConcern
- the readConcern@Nullable public Collation getCollation()
public DBCollectionCountOptions collation(@Nullable Collation collation)
collation
- the collationCopyright © 2010 - 2020 Adobe. All Rights Reserved