Package com.artipie.npm.proxy
Class RxNpmProxyStorage
- java.lang.Object
-
- com.artipie.npm.proxy.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 Summary
Constructors Constructor Description RxNpmProxyStorage(com.artipie.asto.rx.RxStorage storage)
Ctor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.reactivex.Maybe<NpmAsset>
getAsset(String path)
Retrieve NPM asset by path.io.reactivex.Maybe<NpmPackage>
getPackage(String name)
Retrieve NPM package by name.io.reactivex.Completable
save(NpmAsset asset)
Persist NPM Asset.io.reactivex.Completable
save(NpmPackage pkg)
Persist NPM Package.
-
-
-
Method Detail
-
save
public io.reactivex.Completable save(NpmPackage pkg)
Description copied from interface:NpmProxyStorage
Persist NPM Package.- Specified by:
save
in interfaceNpmProxyStorage
- 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 interfaceNpmProxyStorage
- 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 interfaceNpmProxyStorage
- 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 interfaceNpmProxyStorage
- Parameters:
path
- Asset path- Returns:
- NPM asset or empty
-
-