private final class ListCollectionsOperation.ProjectingAsyncBatchCursor extends java.lang.Object implements AsyncBatchCursor<T>
Modifier and Type | Field and Description |
---|---|
private AsyncBatchCursor<BsonDocument> |
delegate |
Modifier | Constructor and Description |
---|---|
private |
ProjectingAsyncBatchCursor(AsyncBatchCursor<BsonDocument> delegate) |
Modifier and Type | Method and Description |
---|---|
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.
|
private final AsyncBatchCursor<BsonDocument> delegate
private ProjectingAsyncBatchCursor(AsyncBatchCursor<BsonDocument> delegate)
public void next(SingleResultCallback<java.util.List<T>> callback)
AsyncBatchCursor
next
in interface AsyncBatchCursor<T>
callback
- callback to receive the next batch of resultspublic void setBatchSize(int batchSize)
AsyncBatchCursor
setBatchSize
in interface AsyncBatchCursor<T>
batchSize
- the non-negative batch size. 0 means to use the server default.public int getBatchSize()
AsyncBatchCursor
getBatchSize
in interface AsyncBatchCursor<T>
public boolean isClosed()
AsyncBatchCursor
isClosed
in interface AsyncBatchCursor<T>
public void close()
close
in interface AsyncBatchCursor<T>
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable