public final class StorageController extends Object
GeckoRuntime.getStorageController()
.Modifier and Type | Class and Description |
---|---|
static class |
StorageController.ClearFlags
Flags used for data clearing operations.
|
Constructor and Description |
---|
StorageController() |
Modifier and Type | Method and Description |
---|---|
GeckoResult<Void> |
clearData(long flags)
Clear data for all hosts.
|
void |
clearDataForSessionContext(String contextId)
Clear data for the given context ID.
|
GeckoResult<Void> |
clearDataFromHost(String host,
long flags)
Clear data owned by the given host.
|
@AnyThread @NonNull public GeckoResult<Void> clearData(long flags)
flags
- Combination of StorageController.ClearFlags
.GeckoResult
that will complete when clearing has
finished.@AnyThread @NonNull public GeckoResult<Void> clearDataFromHost(@NonNull String host, long flags)
host
- The host to be used.flags
- Combination of StorageController.ClearFlags
.GeckoResult
that will complete when clearing has
finished.@AnyThread public void clearDataForSessionContext(@NonNull String contextId)
GeckoSessionSettings.Builder.contextId(java.lang.String)
.to set a context ID
for a session.
Note: Any open session may re-accumulate previously cleared data. To
ensure that no persistent data is left behind, you need to close all
sessions for the given context prior to clearing data.contextId
- The context ID for the storage data to be deleted.