-
- All Implemented Interfaces:
-
com.amplitude.core.Storage,com.amplitude.core.utilities.EventsFileStorage
public final class AndroidStorageV2 implements Storage, EventsFileStorage
-
-
Field Summary
Fields Modifier and Type Field Description private final SharedPreferencessharedPreferences
-
Constructor Summary
Constructors Constructor Description AndroidStorageV2(String storageKey, Logger logger, SharedPreferences sharedPreferences, File storageDirectory, Diagnostics diagnostics)
-
Method Summary
Modifier and Type Method Description final SharedPreferencesgetSharedPreferences()A place where the storage stores some metadata to manage this storage UnitwriteEvent(BaseEvent event)Unitwrite(Storage.Constants key, String value)Unitremove(Storage.Constants key)Unitrollover()Stringread(Storage.Constants key)List<Object>readEventsContent()UnitreleaseFile(String filePath)StringgetEventsString(Object filePath)ResponseHandlergetResponseHandler(EventPipeline eventPipeline, Configuration configuration, CoroutineScope scope, CoroutineDispatcher storageDispatcher)BooleanremoveFile(String filePath)<ERROR CLASS>getEventCallback(String insertId)UnitremoveEventCallback(String insertId)UnitsplitEventFile(String filePath, JSONArray events)final UnitcleanupMetadata()-
-
Constructor Detail
-
AndroidStorageV2
AndroidStorageV2(String storageKey, Logger logger, SharedPreferences sharedPreferences, File storageDirectory, Diagnostics diagnostics)
-
-
Method Detail
-
getSharedPreferences
final SharedPreferences getSharedPreferences()
A place where the storage stores some metadata to manage this storage
-
writeEvent
Unit writeEvent(BaseEvent event)
-
readEventsContent
List<Object> readEventsContent()
-
releaseFile
Unit releaseFile(String filePath)
-
getEventsString
String getEventsString(Object filePath)
-
getResponseHandler
ResponseHandler getResponseHandler(EventPipeline eventPipeline, Configuration configuration, CoroutineScope scope, CoroutineDispatcher storageDispatcher)
-
removeFile
Boolean removeFile(String filePath)
-
getEventCallback
<ERROR CLASS> getEventCallback(String insertId)
-
removeEventCallback
Unit removeEventCallback(String insertId)
-
splitEventFile
Unit splitEventFile(String filePath, JSONArray events)
-
cleanupMetadata
final Unit cleanupMetadata()
-
-
-
-