Store that for every call acquires a lock before executing it on the requested resource, and releases it afterwards. In case the request returns a Representation the lock will only be released when the data stream is finished.

For auxiliary resources the lock will be applied to the subject resource. The actual operation is still executed on the auxiliary resource.

Hierarchy

  • LockingResourceStore

Implements

Constructors

Properties

auxiliaryStrategy: AuxiliaryIdentifierStrategy
logger: Logger = ...

Methods

  • Returns a promise that resolve when the source stream is finished, either by ending or emitting an error. In the case of an error the stream will be destroyed if it hasn't been already.

    Parameters

    • source: Readable

      The input stream.

    Returns Promise<void>