Uploaded image for project: 'Realm Java SDK'
  1. Realm Java SDK
  2. RJAVA-611

Add support for watching change streams to MongoCollection

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown 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@mongodb.com Clemente Tort Barbero
            Reporter:
            eduardo.lopezgutierrez@mongodb.com Eduardo López Gutiérrez (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: