T - the document type@Deprecated public class ListCollectionsOperation<T> extends java.lang.Object implements AsyncReadOperation<AsyncBatchCursor<T>>, ReadOperation<BatchCursor<T>>
name field of each returned document is the simple name of the collection rather than the full
namespace.| Constructor and Description |
|---|
ListCollectionsOperation(java.lang.String databaseName,
Decoder<T> decoder)
Deprecated.
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
ListCollectionsOperation<T> |
batchSize(int batchSize)
Deprecated.
Sets the number of documents to return per batch.
|
BatchCursor<T> |
execute(ReadBinding binding)
Deprecated.
General execute which can return anything of type T
|
void |
executeAsync(AsyncReadBinding binding,
SingleResultCallback<AsyncBatchCursor<T>> callback)
Deprecated.
General execute which can return anything of type T
|
ListCollectionsOperation<T> |
filter(BsonDocument filter)
Deprecated.
Sets the query filter to apply to the query.
|
java.lang.Integer |
getBatchSize()
Deprecated.
Gets the number of documents to return per batch.
|
BsonDocument |
getFilter()
Deprecated.
Gets the query filter.
|
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.
|
boolean |
isNameOnly()
Deprecated.
Gets whether only the collection names should be returned.
|
ListCollectionsOperation<T> |
maxTime(long maxTime,
java.util.concurrent.TimeUnit timeUnit)
Deprecated.
Sets the maximum execution time on the server for this operation.
|
ListCollectionsOperation<T> |
nameOnly(boolean nameOnly)
Deprecated.
Sets the query filter to apply to the query.
|
ListCollectionsOperation<T> |
retryReads(boolean retryReads)
Deprecated.
Enables retryable reads if a read fails due to a network error.
|
public BsonDocument getFilter()
public boolean isNameOnly()
public ListCollectionsOperation<T> filter(BsonDocument filter)
filter - the filter, which may be null.public ListCollectionsOperation<T> nameOnly(boolean nameOnly)
Note: this is advisory only, and should be considered an optimization. Server versions prior to MongoDB 4.0 will ignore this request.
nameOnly - true if only the collection names should be requested from the serverpublic java.lang.Integer getBatchSize()
public ListCollectionsOperation<T> batchSize(int batchSize)
batchSize - the batch sizepublic long getMaxTime(java.util.concurrent.TimeUnit timeUnit)
timeUnit - the time unit to return the result inpublic ListCollectionsOperation<T> maxTime(long maxTime, java.util.concurrent.TimeUnit timeUnit)
maxTime - the max timetimeUnit - the time unit, which may not be nullpublic ListCollectionsOperation<T> retryReads(boolean retryReads)
retryReads - true if reads should be retriedpublic boolean getRetryReads()
public 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 executedCopyright © 2010 - 2023 Adobe. All Rights Reserved