@Deprecated public class CountOperation extends java.lang.Object implements AsyncReadOperation<java.lang.Long>, ReadOperation<java.lang.Long>
| Constructor and Description |
|---|
CountOperation(MongoNamespace namespace)
Deprecated.
Construct a new instance.
|
CountOperation(MongoNamespace namespace,
com.mongodb.internal.client.model.CountStrategy countStrategy)
Deprecated.
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
ReadOperation<BsonDocument> |
asExplainableOperation(ExplainVerbosity explainVerbosity)
Deprecated.
Gets an operation whose execution explains this operation.
|
AsyncReadOperation<BsonDocument> |
asExplainableOperationAsync(ExplainVerbosity explainVerbosity)
Deprecated.
Gets an operation whose execution explains this operation.
|
CountOperation |
collation(Collation collation)
Deprecated.
Sets the collation options
|
java.lang.Long |
execute(ReadBinding binding)
Deprecated.
General execute which can return anything of type T
|
void |
executeAsync(AsyncReadBinding binding,
SingleResultCallback<java.lang.Long> callback)
Deprecated.
General execute which can return anything of type T
|
CountOperation |
filter(BsonDocument filter)
Deprecated.
Sets the filter to apply to the query.
|
Collation |
getCollation()
Deprecated.
Returns the collation options
|
BsonDocument |
getFilter()
Deprecated.
Gets the query filter.
|
BsonValue |
getHint()
Deprecated.
Gets the hint to apply.
|
long |
getLimit()
Deprecated.
Gets the limit to apply.
|
long |
getMaxTime(java.util.concurrent.TimeUnit timeUnit)
Deprecated.
Gets the maximum execution time on the server for this operation.
|
boolean |
getRetryReads()
Deprecated.
Gets the value for retryable reads.
|
long |
getSkip()
Deprecated.
Gets the number of documents to skip.
|
CountOperation |
hint(BsonValue hint)
Deprecated.
Sets the hint to apply.
|
CountOperation |
limit(long limit)
Deprecated.
Sets the limit to apply.
|
CountOperation |
maxTime(long maxTime,
java.util.concurrent.TimeUnit timeUnit)
Deprecated.
Sets the maximum execution time on the server for this operation.
|
CountOperation |
retryReads(boolean retryReads)
Deprecated.
Enables retryable reads if a read fails due to a network error.
|
CountOperation |
skip(long skip)
Deprecated.
Sets the number of documents to skip.
|
public CountOperation(MongoNamespace namespace)
namespace - the database and collection namespace for the operation.public CountOperation(MongoNamespace namespace, com.mongodb.internal.client.model.CountStrategy countStrategy)
namespace - the database and collection namespace for the operation.countStrategy - the strategy to use for calculating the count.public BsonDocument getFilter()
public CountOperation filter(BsonDocument filter)
filter - the filter, which may be null.public CountOperation retryReads(boolean retryReads)
retryReads - true if reads should be retriedpublic boolean getRetryReads()
public BsonValue getHint()
public CountOperation hint(BsonValue hint)
hint - a value describing the index which should be used for this operation.public long getLimit()
public CountOperation limit(long limit)
limit - the limitpublic long getSkip()
public CountOperation 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 CountOperation maxTime(long maxTime, java.util.concurrent.TimeUnit timeUnit)
maxTime - the max timetimeUnit - the time unit, which may not be nullpublic Collation getCollation()
public CountOperation collation(Collation collation)
A null value represents the server default.
collation - the collation options to usepublic java.lang.Long execute(ReadBinding binding)
ReadOperationexecute in interface ReadOperation<java.lang.Long>binding - the binding to execute in the context ofpublic void executeAsync(AsyncReadBinding binding, SingleResultCallback<java.lang.Long> callback)
AsyncReadOperationexecuteAsync in interface AsyncReadOperation<java.lang.Long>binding - the binding to execute in the context ofcallback - the callback to be called when the operation has been executedpublic ReadOperation<BsonDocument> asExplainableOperation(ExplainVerbosity explainVerbosity)
explainVerbosity - the explain verbositypublic AsyncReadOperation<BsonDocument> asExplainableOperationAsync(ExplainVerbosity explainVerbosity)
explainVerbosity - the explain verbosityCopyright © 2010 - 2023 Adobe. All Rights Reserved