接口 Tenants
-
public interface TenantsAdmin interface for tenants management.
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 voidcreateTenant(java.lang.String tenant, TenantInfo config)Create a new tenant.java.util.concurrent.CompletableFuture<java.lang.Void>createTenantAsync(java.lang.String tenant, TenantInfo config)Create a new tenant asynchronously.voiddeleteTenant(java.lang.String tenant)Delete an existing tenant.voiddeleteTenant(java.lang.String tenant, boolean force)Delete an existing tenant.java.util.concurrent.CompletableFuture<java.lang.Void>deleteTenantAsync(java.lang.String tenant)Delete an existing tenant asynchronously.java.util.concurrent.CompletableFuture<java.lang.Void>deleteTenantAsync(java.lang.String tenant, boolean force)Delete an existing tenant asynchronously.TenantInfogetTenantInfo(java.lang.String tenant)Get the config of the tenant.java.util.concurrent.CompletableFuture<TenantInfo>getTenantInfoAsync(java.lang.String tenant)Get the config of the tenant asynchronously.java.util.List<java.lang.String>getTenants()Get the list of tenants.java.util.concurrent.CompletableFuture<java.util.List<java.lang.String>>getTenantsAsync()Get the list of tenants asynchronously.voidupdateTenant(java.lang.String tenant, TenantInfo config)Update the admins for a tenant.java.util.concurrent.CompletableFuture<java.lang.Void>updateTenantAsync(java.lang.String tenant, TenantInfo config)Update the admins for a tenant asynchronously.
-
-
-
方法详细资料
-
getTenants
java.util.List<java.lang.String> getTenants() throws PulsarAdminExceptionGet the list of tenants. Response Example:["my-tenant", "other-tenant", "third-tenant"]- 返回:
- the list of Pulsar tenants
- 抛出:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException- Unexpected error
-
getTenantsAsync
java.util.concurrent.CompletableFuture<java.util.List<java.lang.String>> getTenantsAsync()
Get the list of tenants asynchronously. Response Example:["my-tenant", "other-tenant", "third-tenant"]- 返回:
- the list of Pulsar tenants
-
getTenantInfo
TenantInfo getTenantInfo(java.lang.String tenant) throws PulsarAdminException
Get the config of the tenant. Get the admin configuration for a given tenant.- 参数:
tenant- Tenant name- 返回:
- the tenant configuration
- 抛出:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Tenant does not existPulsarAdminException- Unexpected error
-
getTenantInfoAsync
java.util.concurrent.CompletableFuture<TenantInfo> getTenantInfoAsync(java.lang.String tenant)
Get the config of the tenant asynchronously. Get the admin configuration for a given tenant.- 参数:
tenant- Tenant name- 返回:
- the tenant configuration
-
createTenant
void createTenant(java.lang.String tenant, TenantInfo config) throws PulsarAdminExceptionCreate a new tenant. Provisions a new tenant. This operation requires Pulsar super-user privileges.- 参数:
tenant- Tenant nameconfig- Config data- 抛出:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.ConflictException- Tenant already existsPulsarAdminException.PreconditionFailedException- Tenant name is not validPulsarAdminException- Unexpected error
-
createTenantAsync
java.util.concurrent.CompletableFuture<java.lang.Void> createTenantAsync(java.lang.String tenant, TenantInfo config)Create a new tenant asynchronously. Provisions a new tenant. This operation requires Pulsar super-user privileges.- 参数:
tenant- Tenant nameconfig- Config data
-
updateTenant
void updateTenant(java.lang.String tenant, TenantInfo config) throws PulsarAdminExceptionUpdate the admins for a tenant. This operation requires Pulsar super-user privileges.- 参数:
tenant- Tenant nameconfig- Config data- 抛出:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Tenant does not existPulsarAdminException- Unexpected error
-
updateTenantAsync
java.util.concurrent.CompletableFuture<java.lang.Void> updateTenantAsync(java.lang.String tenant, TenantInfo config)Update the admins for a tenant asynchronously. This operation requires Pulsar super-user privileges.- 参数:
tenant- Tenant nameconfig- Config data
-
deleteTenant
void deleteTenant(java.lang.String tenant) throws PulsarAdminExceptionDelete an existing tenant. Delete a tenant and all namespaces and topics under it.- 参数:
tenant- Tenant name- 抛出:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- The tenant does not existPulsarAdminException.ConflictException- The tenant still has active namespacesPulsarAdminException- Unexpected error
-
deleteTenant
void deleteTenant(java.lang.String tenant, boolean force) throws PulsarAdminExceptionDelete an existing tenant. Force flag delete a tenant forcefully and all namespaces and topics under it.- 参数:
tenant- Tenant nameforce- Delete tenant forcefully- 抛出:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- The tenant does not existPulsarAdminException.ConflictException- The tenant still has active namespacesPulsarAdminException- Unexpected error
-
deleteTenantAsync
java.util.concurrent.CompletableFuture<java.lang.Void> deleteTenantAsync(java.lang.String tenant)
Delete an existing tenant asynchronously. Delete a tenant and all namespaces and topics under it.- 参数:
tenant- Tenant name
-
deleteTenantAsync
java.util.concurrent.CompletableFuture<java.lang.Void> deleteTenantAsync(java.lang.String tenant, boolean force)Delete an existing tenant asynchronously. Force flag delete a tenant forcefully and all namespaces and topics under it.- 参数:
tenant- Tenant nameforce- Delete tenant forcefully
-
-