android-components / mozilla.components.service.fxa.sync / GlobalSyncableStoreProvider

GlobalSyncableStoreProvider

object GlobalSyncableStoreProvider (source)

A singleton registry of SyncableStore objects. WorkManagerSyncDispatcher will use this to access configured SyncableStore instances.

This pattern provides a safe way for library-defined background workers to access globally available instances of stores within an application.

Functions

Name Summary
configureStore fun configureStore(storePair: Pair<SyncEngine, Lazy<SyncableStore>>): Unit
Configure an instance of SyncableStore for a SyncEngine enum.

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.