android-components / mozilla.components.service.glean.storages / GenericScalarStorageEngine / getSnapshot

getSnapshot

@Synchronized fun getSnapshot(storeName: String, clearStore: Boolean): GenericDataStorage<ScalarType>? (source)

Retrieves the recorded metric data for the provided store name.

Please note that the Lifetime.Application lifetime is handled implicitly by never clearing its data. It will naturally clear out when restarting the application.

Parameters

storeName - the name of the desired store

clearStore - whether or not to clear the requested store. Not that only metrics stored with a lifetime of Lifetime.Ping will be cleared.

Return
the ScalarType recorded in the requested store