T - the document typepublic class ListDatabasesOperation<T> extends Object implements AsyncReadOperation<AsyncBatchCursor<T>>, ReadOperation<BatchCursor<T>>
| Constructor and Description | 
|---|
| ListDatabasesOperation(Decoder<T> decoder)Construct a new instance. | 
| Modifier and Type | Method and 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 | 
| long | getMaxTime(TimeUnit timeUnit)Gets the maximum execution time on the server for this operation. | 
| ListDatabasesOperation<T> | maxTime(long maxTime,
       TimeUnit timeUnit)Sets the maximum execution time on the server for this operation. | 
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 BatchCursor<T> execute(ReadBinding binding)
execute in interface ReadOperation<BatchCursor<T>>binding - the binding.public 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 executed