Class RxNpmProxyStorage

  • All Implemented Interfaces:
    NpmProxyStorage

    public final class RxNpmProxyStorage
    extends Object
    implements NpmProxyStorage
    Base NPM Proxy storage implementation. It encapsulates storage format details and allows to handle both primary data and metadata files within one calls. It uses underlying RxStorage and works in Rx-way.
    Since:
    0.1
    • Constructor Detail

      • RxNpmProxyStorage

        public RxNpmProxyStorage​(com.artipie.asto.rx.RxStorage storage)
        Ctor.
        Parameters:
        storage - Underlying storage
    • Method Detail

      • save

        public io.reactivex.Completable save​(NpmPackage pkg)
        Description copied from interface: NpmProxyStorage
        Persist NPM Package.
        Specified by:
        save in interface NpmProxyStorage
        Parameters:
        pkg - Package to persist
        Returns:
        Completion or error signal
      • save

        public io.reactivex.Completable save​(NpmAsset asset)
        Description copied from interface: NpmProxyStorage
        Persist NPM Asset.
        Specified by:
        save in interface NpmProxyStorage
        Parameters:
        asset - Asset to persist
        Returns:
        Completion or error signal
      • getPackage

        public io.reactivex.Maybe<NpmPackage> getPackage​(String name)
        Description copied from interface: NpmProxyStorage
        Retrieve NPM package by name.
        Specified by:
        getPackage in interface NpmProxyStorage
        Parameters:
        name - Package name
        Returns:
        NPM package or empty
      • getAsset

        public io.reactivex.Maybe<NpmAsset> getAsset​(String path)
        Description copied from interface: NpmProxyStorage
        Retrieve NPM asset by path.
        Specified by:
        getAsset in interface NpmProxyStorage
        Parameters:
        path - Asset path
        Returns:
        NPM asset or empty