Datasync Manager
class DatasyncManager
Content copied to clipboard
Handles a set of subscriptions to data nodes and authentication events.
This class is intended to work with UI views in the way that it can cancel all handled subscriptions as soon as the associated view is disposed (see the unsubscribeFromAllEvents method). Instances must be built using the DatasyncService.createManager method.
Functions
node
Link copied to clipboard
subscribeToStateChange
Link copied to clipboard
fun subscribeToStateChange(callback: (DatasyncState) -> Unit): Subscription
Content copied to clipboard
Subscribes to the DatasyncState of the DatasyncService associated with this DatasyncManager instance, and calls asynchronously the given callback each time this state changes.
unsubscribeFromAllEvents
Link copied to clipboard
fun unsubscribeFromAllEvents()
Content copied to clipboard
Cancels all the subscriptions managed by this DatasyncManager instance.
Properties
policy
Link copied to clipboard
The SubscriptionCancelationPolicy associated with this DatasyncManager instance, which controls the management of cached data when subscriptions are canceled.
service
Link copied to clipboard