SubscriptionSet
A subscription set is an immutable view of all current Subscriptions for a given Realm that has been configured for Flexible Sync.
Flexible Sync is a way of defining which data gets synchronized to and from the device using RealmQuerys. The query and its metadata are represented by a Subscription.
A subscription set thus defines all the data that is available to the device and being synchronized with the server. If the subscription set encounters an error, e.g. by containing an invalid query, the entire subscription set will enter an SubscriptionSetState.ERROR state, and no synchronization will happen until the error has been fixed.
If a subscription is removed, so is the corresponding data, but it is only removed from the device. It isn't deleted on the server.
It is possible to modify a subscription set while offline, but a modification isn't accepted by the server before BaseSubscriptionSet.state returns SubscriptionSetState.COMPLETE, which requires that the device has been online.
It is possible to wait for the subscription set to be synchronized with the server by using waitForSynchronization.