Add support for watching change streams to MongoCollection

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None

      Add support for watch operations on collections.

      We should support the original watch API in a similar way to how we ported the MongoClient API's (i.e. replacing Task with RealmAsyncResultTask).

      The original stitch API's are described here:
      http://stitch-sdks.s3-website-us-east-1.amazonaws.com/stitch-sdks/java/4/com/mongodb/stitch/android/services/mongodb/remote/RemoteMongoCollection.html

      watch()
      watch​(BsonValue... ids)
      watch​(ObjectId... ids)
      watchWithFilter​(BsonDocument matchFilter)
      watchWithFilter​(Document matchFilter)
      

      From a quick glance, it looks like we need to port the following classes:

      • ChangeStream<EventT extends BaseChangeEvent>
      • AsyncChangeStream<DocumentT,​ChangeEventT extends BaseChangeEvent<DocumentT>>
      • BaseChangeEvent<DocumentT>
      • ChangeEvent<DocumentT>
      • BaseChangeEventListener<DocumentT,​ChangeEventT extends BaseChangeEvent<DocumentT>>
      • ExceptionListener

              Assignee:
              Clemente Tort
              Reporter:
              Eduardo López Gutiérrez (Inactive)
              Archiver:
              Marc Greenfield

                Created:
                Updated:
                Resolved:
                Archived: