[JAVA-1623] BatchCursor callback should allow implementations of AsyncBatchCursor Created: 15/Jan/15  Updated: 03/Feb/15  Resolved: 03/Feb/15

Status: Closed
Project: Java Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 3.0.0

Type: Bug Priority: Major - P3
Reporter: Ross Lawley Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Does not compile:

collection.mapReduce("", "").batchCursor(new SingleResultCallback<MapReduceAsyncBatchCursor<Document>>() {
    @Override
    public void onResult(final MapReduceAsyncBatchCursor<Document> result, final Throwable t) {
        throw new UnsupportedOperationException("Not implemented yet!");
    }
});

Review the implementation the type checking also:
https://github.com/rozza/mongo-java-driver/blob/52dd64229932ce83acdb9a63f47ce198e89fec94/driver-async/src/main/com/mongodb/async/client/OperationIterable.java#L120-L124



 Comments   
Comment by Ross Lawley [ 03/Feb/15 ]

As we can't override the batchCursor method to return the MapReduceAsyncBatchCursor marking as won't fix.

Generated at Thu Feb 08 08:55:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.