final class MongoIterableSubscription<TResult> extends AbstractSubscription<TResult>
Modifier and Type | Field and Description |
---|---|
private AsyncBatchCursor<TResult> |
batchCursor |
private boolean |
completed |
private boolean |
isReading |
private MongoIterable<TResult> |
mongoIterable |
Constructor and Description |
---|
MongoIterableSubscription(MongoIterable<TResult> mongoIterable,
Observer<? super TResult> observer) |
Modifier and Type | Method and Description |
---|---|
(package private) boolean |
checkCompleted() |
private int |
getBatchSize()
Returns the batchSize to be used with the cursor.
|
(package private) void |
postTerminate() |
(package private) void |
requestInitialData() |
(package private) void |
requestMoreData() |
addToQueue, addToQueue, getRequested, isTerminated, isUnsubscribed, onComplete, onError, onNext, request, unsubscribe
private final MongoIterable<TResult> mongoIterable
private boolean isReading
private boolean completed
private volatile AsyncBatchCursor<TResult> batchCursor
MongoIterableSubscription(MongoIterable<TResult> mongoIterable, Observer<? super TResult> observer)
void requestInitialData()
requestInitialData
in class AbstractSubscription<TResult>
boolean checkCompleted()
checkCompleted
in class AbstractSubscription<TResult>
void postTerminate()
postTerminate
in class AbstractSubscription<TResult>
void requestMoreData()
requestMoreData
in class AbstractSubscription<TResult>
private int getBatchSize()
Anything less than 2 would close the cursor so that is the minimum batchSize and `Integer.MAX_VALUE` is the maximum batchSize.