T - the operations result type.public class ListIndexesOperation<T> extends java.lang.Object implements AsyncReadOperation<AsyncBatchCursor<T>>, ReadOperation<BatchCursor<T>>
| Modifier and Type | Field and Description |
|---|---|
private int |
batchSize |
private Decoder<T> |
decoder |
private long |
maxTimeMS |
private MongoNamespace |
namespace |
| Constructor and Description |
|---|
ListIndexesOperation(MongoNamespace namespace,
Decoder<T> decoder)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
private BsonDocument |
asQueryDocument(ConnectionDescription connectionDescription,
ReadPreference readPreference) |
private CommandOperationHelper.CommandTransformer<BsonDocument,AsyncBatchCursor<T>> |
asyncTransformer(AsyncConnectionSource source,
AsyncConnection connection) |
ListIndexesOperation<T> |
batchSize(int batchSize)
Sets the number of documents to return per batch.
|
private Codec<BsonDocument> |
createCommandDecoder() |
private AsyncBatchCursor<T> |
emptyAsyncCursor(AsyncConnectionSource source) |
BatchCursor<T> |
execute(ReadBinding binding)
General execute which can return anything of type T
|
void |
executeAsync(AsyncReadBinding binding,
SingleResultCallback<AsyncBatchCursor<T>> callback)
General execute which can return anything of type T
|
java.lang.Integer |
getBatchSize()
Gets the number of documents to return per batch.
|
private BsonDocument |
getCommand() |
private MongoNamespace |
getIndexNamespace() |
long |
getMaxTime(java.util.concurrent.TimeUnit timeUnit)
Gets the maximum execution time on the server for this operation.
|
ListIndexesOperation<T> |
maxTime(long maxTime,
java.util.concurrent.TimeUnit timeUnit)
Sets the maximum execution time on the server for this operation.
|
private CommandOperationHelper.CommandTransformer<BsonDocument,BatchCursor<T>> |
transformer(ConnectionSource source) |
private final MongoNamespace namespace
private int batchSize
private long maxTimeMS
public ListIndexesOperation(MongoNamespace namespace, Decoder<T> decoder)
namespace - the database and collection namespace for the operation.decoder - the decoder for the result documents.public java.lang.Integer getBatchSize()
public ListIndexesOperation<T> batchSize(int batchSize)
batchSize - the batch sizepublic long getMaxTime(java.util.concurrent.TimeUnit timeUnit)
timeUnit - the time unit to return the result inpublic ListIndexesOperation<T> maxTime(long maxTime, java.util.concurrent.TimeUnit timeUnit)
maxTime - the max timetimeUnit - the time unit, which may not be nullpublic BatchCursor<T> execute(ReadBinding binding)
ReadOperationexecute in interface ReadOperation<BatchCursor<T>>binding - the binding to execute in the context ofpublic void executeAsync(AsyncReadBinding binding, SingleResultCallback<AsyncBatchCursor<T>> callback)
AsyncReadOperationexecuteAsync in interface AsyncReadOperation<AsyncBatchCursor<T>>binding - the binding to execute in the context ofcallback - the callback to be called when the operation has been executedprivate AsyncBatchCursor<T> emptyAsyncCursor(AsyncConnectionSource source)
private BsonDocument asQueryDocument(ConnectionDescription connectionDescription, ReadPreference readPreference)
private MongoNamespace getIndexNamespace()
private BsonDocument getCommand()
private CommandOperationHelper.CommandTransformer<BsonDocument,BatchCursor<T>> transformer(ConnectionSource source)
private CommandOperationHelper.CommandTransformer<BsonDocument,AsyncBatchCursor<T>> asyncTransformer(AsyncConnectionSource source, AsyncConnection connection)
private Codec<BsonDocument> createCommandDecoder()