Interface PackagesManagement
-
- All Known Implementing Classes:
PackagesManagementImpl
public interface PackagesManagementPackagesManagement provides a way to manage the packages of function, sink, and source.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<java.lang.Void>delete(PackageName packageName)Delete a package.java.util.concurrent.CompletableFuture<java.lang.Void>download(PackageName packageName, java.io.OutputStream outputStream)Download a package of a given version to a given path.java.util.concurrent.CompletableFuture<org.apache.pulsar.packages.management.core.common.PackageMetadata>getMeta(PackageName packageName)Get the metadata of a package.voidinitialize(PackagesStorage storage)Initialize the packages management service with the given storage.java.util.concurrent.CompletableFuture<java.util.List<java.lang.String>>list(PackageName packageName)List all the versions of a package.java.util.concurrent.CompletableFuture<java.util.List<java.lang.String>>list(org.apache.pulsar.packages.management.core.common.PackageType type, java.lang.String tenant, java.lang.String namespace)List all the packages with the type of a namespace.java.util.concurrent.CompletableFuture<java.lang.Void>updateMeta(PackageName packageName, org.apache.pulsar.packages.management.core.common.PackageMetadata metadata)Update the metadata of a package.java.util.concurrent.CompletableFuture<java.lang.Void>upload(PackageName packageName, org.apache.pulsar.packages.management.core.common.PackageMetadata metadata, java.io.InputStream inputStream)Upload a package of a given version from a given path.
-
-
-
Method Detail
-
initialize
void initialize(PackagesStorage storage)
Initialize the packages management service with the given storage.- Parameters:
storage- the storage used to saving packages
-
getMeta
java.util.concurrent.CompletableFuture<org.apache.pulsar.packages.management.core.common.PackageMetadata> getMeta(PackageName packageName)
Get the metadata of a package.- Parameters:
packageName- package name- Returns:
-
updateMeta
java.util.concurrent.CompletableFuture<java.lang.Void> updateMeta(PackageName packageName, org.apache.pulsar.packages.management.core.common.PackageMetadata metadata)
Update the metadata of a package.- Parameters:
packageName- package namemetadata-- Returns:
-
download
java.util.concurrent.CompletableFuture<java.lang.Void> download(PackageName packageName, java.io.OutputStream outputStream)
Download a package of a given version to a given path.- Parameters:
packageName- package nameoutputStream-- Returns:
-
upload
java.util.concurrent.CompletableFuture<java.lang.Void> upload(PackageName packageName, org.apache.pulsar.packages.management.core.common.PackageMetadata metadata, java.io.InputStream inputStream)
Upload a package of a given version from a given path.- Parameters:
packageName- package namemetadata- metadata of a packageinputStream-- Returns:
-
delete
java.util.concurrent.CompletableFuture<java.lang.Void> delete(PackageName packageName)
Delete a package. It will delete all versions of a package if the version is not specified. Otherwise it will delete the specified version package.- Parameters:
packageName- package name type://tenant/namespace/name@version is delete a given version of the package type://tenant/namespace/name is delete all versions of the package- Returns:
-
list
java.util.concurrent.CompletableFuture<java.util.List<java.lang.String>> list(PackageName packageName)
List all the versions of a package.- Parameters:
packageName- package name without version- Returns:
- all the versions of the specified package
-
list
java.util.concurrent.CompletableFuture<java.util.List<java.lang.String>> list(org.apache.pulsar.packages.management.core.common.PackageType type, java.lang.String tenant, java.lang.String namespace)List all the packages with the type of a namespace.- Parameters:
type- the package typetenant- the tenant namenamespace- the namespace name- Returns:
- the packages name under the specified namespace
-
-