@rendley/sdk - v1.15.5
    Preparing search index...

    Class StorageController

    Coordinates one or more storage providers and applies them as a prioritized persistence stack.

    Index

    Constructors

    Properties

    storageStack: StorageProviderBase[]

    Methods

    • Notifies providers that a batched write sequence is starting.

      Returns Promise<void>

      A promise that resolves after all providers have been notified.

    • Destroys all registered providers and clears the provider stack.

      Returns Promise<void>

      A promise that resolves after teardown finishes.

    • Notifies providers that a batched write sequence has finished.

      Returns Promise<void>

      A promise that resolves after all providers have been notified.

    • Retrieves a media payload by hash.

      Parameters

      • mediaHash: string

        Media hash to look up.

      Returns Promise<null | StorageMediaData>

      A promise that resolves to the stored media payload, or null if no provider has it.

    • Returns the combined set of known media hashes from all registered providers.

      Returns Promise<string[]>

      A promise that resolves to the deduplicated media hash list.

    • Checks whether any active provider contains the requested media hash.

      Parameters

      • mediaHash: string

        Media hash to check.

      Returns Promise<boolean>

      A promise that resolves to true if the media exists in at least one provider.

    • Initializes each registered provider for the supplied project.

      Parameters

      • projectId: string

        Project ID used to scope persisted data.

      Returns Promise<void>

      A promise that resolves after all providers have been initialized.

    • Removes a media payload from all active providers.

      Parameters

      • mediaHash: string

        Media hash to remove.

      Returns Promise<void>

      A promise that resolves after the removal requests have been issued.

    • Stores a media payload using the provider stack.

      Parameters

      Returns Promise<boolean>

      A promise that resolves to true if at least one provider stored the media successfully.

    • Synchronizes all active providers against a master provider.

      Parameters

      Returns Promise<boolean>

      A promise that resolves to true if any provider reported changes during sync.