Interface PersistenceManager<T>

Provide logic to save and retrieve a value from storage.

Type Parameters

  • T

Hierarchy

  • PersistenceManager

Properties

clear: (() => void)

Type declaration

    • (): void
    • When this method is called if a persisted value is available it must be erased.

      Returns void

loadValue: (() => Promise<void | TimestampedValue<T>>)

Type declaration

    • (): Promise<void | TimestampedValue<T>>
    • This method must load the value from storage. If no value is available return a rejected promise without error.

      Returns Promise<void | TimestampedValue<T>>

saveValue: ((value: TimestampedValue<T>) => Promise<any>)

Type declaration

Generated using TypeDoc