activate

abstract suspend fun activate(identity: TransportIdentity): DeviceStorage(source)

Activate storage for a specific transport identity.

Called before transport.connect(), allowing storage to prepare resources (open database, create directories, etc.).

Cancellation: if the calling coroutine is cancelled while activate is suspended the implementation should release any partially acquired resources and rethrow kotlin.coroutines.cancellation.CancellationException. The engine treats cancellation as "storage was never activated" and will not call DeviceStorage.close.

Return

a DeviceStorage instance ready for use

Parameters

identity

the TransportIdentity derived from the TransportSpec

Throws

if the backend cannot be initialized