T
- the document typeAsyncReadOperation<AsyncBatchCursor<T>>
, ReadOperation<BatchCursor<T>>
public class ListDatabasesOperation<T> extends Object implements AsyncReadOperation<AsyncBatchCursor<T>>, ReadOperation<BatchCursor<T>>
Constructor | Description |
---|---|
ListDatabasesOperationβ(Decoder<T> decoder) |
Construct a new instance.
|
Modifier and Type | Method | Description |
---|---|---|
BatchCursor<T> |
executeβ(ReadBinding binding) |
Executing this will return a list of all the databases names in the MongoDB instance.
|
void |
executeAsyncβ(AsyncReadBinding binding,
SingleResultCallback<AsyncBatchCursor<T>> callback) |
General execute which can return anything of type T
|
ListDatabasesOperation<T> |
filterβ(BsonDocument filter) |
Sets the query filter to apply to the returned database names.
|
BsonDocument |
getFilterβ() |
Gets the query filter to apply to the returned database names.
|
long |
getMaxTimeβ(TimeUnit timeUnit) |
Gets the maximum execution time on the server for this operation.
|
Boolean |
getNameOnlyβ() |
Gets the nameOnly flag that indicates whether the command should return just the database names or return the database names and
size information.
|
ListDatabasesOperation<T> |
maxTimeβ(long maxTime,
TimeUnit timeUnit) |
Sets the maximum execution time on the server for this operation.
|
ListDatabasesOperation<T> |
nameOnlyβ(Boolean nameOnly) |
Sets the nameOnly flag that indicates whether the command should return just the database names or return the database names and
size information.
|
public long getMaxTimeβ(TimeUnit timeUnit)
timeUnit
- the time unit to return the result inpublic ListDatabasesOperation<T> maxTimeβ(long maxTime, TimeUnit timeUnit)
maxTime
- the max timetimeUnit
- the time unit, which may not be nullpublic ListDatabasesOperation<T> filterβ(BsonDocument filter)
filter
- the filter, which may be null.public BsonDocument getFilterβ()
public ListDatabasesOperation<T> nameOnlyβ(Boolean nameOnly)
nameOnly
- the nameOnly flag, which may be nullpublic Boolean getNameOnlyβ()
public BatchCursor<T> executeβ(ReadBinding binding)
execute
in interface ReadOperation<T>
binding
- the binding.public void executeAsyncβ(AsyncReadBinding binding, SingleResultCallback<AsyncBatchCursor<T>> callback)
AsyncReadOperation
executeAsync
in interface AsyncReadOperation<T>
binding
- the binding to execute in the context ofcallback
- the callback to be called when the operation has been executed