open class UuidsStorageEngineImplementation : GenericScalarStorageEngine<UUID>
(source)
UuidsStorageEngineImplementation(logger: Logger = Logger("glean/UuidsStorageEngine")) |
open val logger: Logger |
open lateinit var applicationContext: Context |
|
val dataStores: Array<GenericStorageMap<ScalarType>> |
|
val userLifetimeStorage: SharedPreferences |
open fun deserializeSingleMetric(value: Any?): UUID?
Implementor's provided function to convert deserialized 'user' lifetime data to the destination ScalarType. |
|
fun record(metricData: CommonMetricData, value: UUID): Unit
Record a uuid in the desired stores. |
open fun deserializeUserLifetime(): SharedPreferences
Deserialize the metrics with a lifetime = User that are on disk. This will be called the first time a metric is used or before a snapshot is taken. |
|
fun getSnapshot(storeName: String, clearStore: Boolean): GenericDataStorage<ScalarType>?
Retrieves the recorded metric data for the provided store name. |
|
open fun getSnapshotAsJSON(storeName: String, clearStore: Boolean): Any?
Get a snapshot of the stored data as a JSON object. |
|
fun recordScalar(metricData: CommonMetricData, value: ScalarType): Unit
Helper function for the derived classes. It can be used to record simple scalars to the internal storage. |
|
fun serializeSingleMetric(value: ScalarType): String?
Implementor's provided function to serialized 'user' lifetime data to String. |