Class NamespaceChangeStreamListener

    • Method Detail

      • start

        public void start()
        Opens the stream in a background thread.
      • stop

        public void stop()
        Stops the background stream thread.
      • isOpen

        public boolean isOpen()
        Whether or not the current stream is currently open.
        Returns:
        true if open, false if not
      • getUnprocessedEventForDocumentId

        @Nullable
        public CompactChangeEvent<BsonDocument> getUnprocessedEventForDocumentId​(BsonValue documentId)
        If there is an unprocessed change event for a particular document ID, fetch it from the change stream listener, and remove it. By reading the event here, we are assuming it will be processed by the consumer.
        Returns:
        the latest unprocessed change event for the given document ID, or null if none exists.