class DistinctIterableImpl<TDocument,TResult> extends MongoIterableImpl<TResult> implements DistinctIterable<TResult>
Modifier and Type | Field and Description |
---|---|
private CodecRegistry |
codecRegistry |
private Collation |
collation |
private java.lang.Class<TDocument> |
documentClass |
private java.lang.String |
fieldName |
private Bson |
filter |
private long |
maxTimeMS |
private MongoNamespace |
namespace |
private java.lang.Class<TResult> |
resultClass |
Constructor and Description |
---|
DistinctIterableImpl(ClientSession clientSession,
MongoNamespace namespace,
java.lang.Class<TDocument> documentClass,
java.lang.Class<TResult> resultClass,
CodecRegistry codecRegistry,
ReadPreference readPreference,
ReadConcern readConcern,
AsyncOperationExecutor executor,
java.lang.String fieldName,
Bson filter) |
Modifier and Type | Method and Description |
---|---|
(package private) AsyncReadOperation<AsyncBatchCursor<TResult>> |
asAsyncReadOperation() |
DistinctIterable<TResult> |
batchSize(int batchSize)
Sets the number of documents to return per batch.
|
DistinctIterable<TResult> |
collation(Collation collation)
Sets the collation options
|
DistinctIterable<TResult> |
filter(Bson filter)
Sets the query filter to apply to the query.
|
DistinctIterable<TResult> |
maxTime(long maxTime,
java.util.concurrent.TimeUnit timeUnit)
Sets the maximum execution time on the server for this operation.
|
batchCursor, first, forEach, getBatchSize, getClientSession, getExecutor, getReadConcern, getReadPreference, into, map, toBsonDocumentOrNull, toBsonDocumentOrNull
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
batchCursor, first, forEach, into, map
private final MongoNamespace namespace
private final java.lang.Class<TDocument> documentClass
private final java.lang.Class<TResult> resultClass
private final CodecRegistry codecRegistry
private final java.lang.String fieldName
private Bson filter
private long maxTimeMS
private Collation collation
DistinctIterableImpl(ClientSession clientSession, MongoNamespace namespace, java.lang.Class<TDocument> documentClass, java.lang.Class<TResult> resultClass, CodecRegistry codecRegistry, ReadPreference readPreference, ReadConcern readConcern, AsyncOperationExecutor executor, java.lang.String fieldName, Bson filter)
public DistinctIterable<TResult> filter(Bson filter)
DistinctIterable
filter
in interface DistinctIterable<TResult>
filter
- the filter, which may be null.public DistinctIterable<TResult> maxTime(long maxTime, java.util.concurrent.TimeUnit timeUnit)
DistinctIterable
maxTime
in interface DistinctIterable<TResult>
maxTime
- the max timetimeUnit
- the time unit, which may not be nullpublic DistinctIterable<TResult> batchSize(int batchSize)
MongoIterable
batchSize
in interface DistinctIterable<TResult>
batchSize
in interface MongoIterable<TResult>
batchSize
in class MongoIterableImpl<TResult>
batchSize
- the batch sizepublic DistinctIterable<TResult> collation(Collation collation)
DistinctIterable
A null value represents the server default.
collation
in interface DistinctIterable<TResult>
collation
- the collation options to useAsyncReadOperation<AsyncBatchCursor<TResult>> asAsyncReadOperation()
asAsyncReadOperation
in class MongoIterableImpl<TResult>