android-components / mozilla.components.browser.session.storage / SessionStorage

SessionStorage

class SessionStorage : Storage (source)

Session storage for persisting the state of a SessionManager to disk (browser and engine session states).

Constructors

Name Summary
<init> SessionStorage(context: Context, engine: Engine)
Session storage for persisting the state of a SessionManager to disk (browser and engine session states).

Functions

Name Summary
autoSave fun autoSave(sessionManager: SessionManager, interval: Long = AutoSave.DEFAULT_INTERVAL_MILLISECONDS, unit: TimeUnit = TimeUnit.MILLISECONDS): AutoSave
Starts configuring automatic saving of the state.
clear fun clear(): Unit
Clears the state saved on disk.
restore fun restore(): Snapshot?
Reads the saved state from disk. Returns null if no state was found on disk or if reading the file failed.
save fun save(snapshot: Snapshot): Boolean
Saves the given state to disk.