T - The type of documents the cursor containspublic interface AsyncBatchCursor<T>
extends java.io.Closeable
next method will return the first batch, and subsequent calls will trigger an asynchronous request to get the next batch
of results. Clients can control the batch size by setting the batchSize property between calls to next.| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
int |
getBatchSize()
Gets the batch size to use when requesting the next batch.
|
boolean |
isClosed()
Return true if the AsyncBatchCursor has been closed
|
void |
next(SingleResultCallback<java.util.List<T>> callback)
Returns the next batch of results.
|
void |
setBatchSize(int batchSize)
Sets the batch size to use when requesting the next batch.
|
void next(SingleResultCallback<java.util.List<T>> callback)
callback - callback to receive the next batch of resultsjava.util.NoSuchElementException - if no next batch existsvoid setBatchSize(int batchSize)
batchSize - the non-negative batch size. 0 means to use the server default.int getBatchSize()
boolean isClosed()
void close()
close 在接口中 java.lang.AutoCloseableclose 在接口中 java.io.Closeable