DittoSyncSubscription

A sync subscription configures Ditto to receive updates from remote peers about documents matching the subscription's query.

Create a sync subscription by calling DittoSync.registerSubscription. The subscription will remain active until either explicitly cancelled via close or the owning Ditto instance goes out of scope.

Since

4.5.0

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Convenience property, returns true if the sync subscription has been cancelled, otherwise returns false. Also, a sync subscription is considered cancelled if the owning Ditto instance goes out of scope.

Link copied to clipboard

The query arguments of the sync subscription (as passed while registering it).

Link copied to clipboard

Documents matching this query will be included in the subscription.

Functions

Link copied to clipboard
open override fun close()

Closes the sync subscription so that new changes matching the query are no longer received from other peers. No-op if it's already closed via a previous call or the owning Ditto instance has gone out of scope.