File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
driver-core/src/main/com/mongodb/internal/operation Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -33,8 +33,8 @@ static BsonDocument getCursorDocumentFromBatchSize(@Nullable final Integer batch
33
33
return batchSize == null ? new BsonDocument () : new BsonDocument ("batchSize" , new BsonInt32 (batchSize ));
34
34
}
35
35
36
- public static void exhaustCursorAsync (final AsyncBatchCursor <BsonDocument > cursor , final SingleResultCallback <List <List <BsonDocument >>> finalCallback ) {
37
- List <List <BsonDocument >> results = new ArrayList <>();
36
+ public static < T > void exhaustCursorAsync (final AsyncBatchCursor <T > cursor , final SingleResultCallback <List <List <T >>> finalCallback ) {
37
+ List <List <T >> results = new ArrayList <>();
38
38
39
39
beginAsync ().thenRunDoWhileLoop (iterationCallback -> {
40
40
beginAsync ().
@@ -46,7 +46,7 @@ public static void exhaustCursorAsync(final AsyncBatchCursor<BsonDocument> curso
46
46
callback .complete (callback );
47
47
}).finish (iterationCallback );
48
48
}, () -> !cursor .isClosed ())
49
- .<List <List <BsonDocument >>>thenSupply (callback -> {
49
+ .<List <List <T >>>thenSupply (callback -> {
50
50
callback .complete (results );
51
51
}).finish (finalCallback );
52
52
}
You can’t perform that action at this time.
0 commit comments