Package org.apache.pulsar.client.admin
Interface ResourceQuotas
-
public interface ResourceQuotasAdmin interface on interacting with resource quotas.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ResourceQuotagetDefaultResourceQuota()Get default resource quota for new resource bundles.java.util.concurrent.CompletableFuture<ResourceQuota>getDefaultResourceQuotaAsync()Get default resource quota for new resource bundles asynchronously.ResourceQuotagetNamespaceBundleResourceQuota(java.lang.String namespace, java.lang.String bundle)Get resource quota of a namespace bundle.java.util.concurrent.CompletableFuture<ResourceQuota>getNamespaceBundleResourceQuotaAsync(java.lang.String namespace, java.lang.String bundle)Get resource quota of a namespace bundle asynchronously.voidresetNamespaceBundleResourceQuota(java.lang.String namespace, java.lang.String bundle)Reset resource quota for a namespace bundle to default value.java.util.concurrent.CompletableFuture<java.lang.Void>resetNamespaceBundleResourceQuotaAsync(java.lang.String namespace, java.lang.String bundle)Reset resource quota for a namespace bundle to default value asynchronously.voidsetDefaultResourceQuota(ResourceQuota quota)Set default resource quota for new namespace bundles.java.util.concurrent.CompletableFuture<java.lang.Void>setDefaultResourceQuotaAsync(ResourceQuota quota)Set default resource quota for new namespace bundles asynchronously.voidsetNamespaceBundleResourceQuota(java.lang.String namespace, java.lang.String bundle, ResourceQuota quota)Set resource quota for a namespace bundle.java.util.concurrent.CompletableFuture<java.lang.Void>setNamespaceBundleResourceQuotaAsync(java.lang.String namespace, java.lang.String bundle, ResourceQuota quota)Set resource quota for a namespace bundle asynchronously.
-
-
-
Method Detail
-
getDefaultResourceQuota
ResourceQuota getDefaultResourceQuota() throws PulsarAdminException
Get default resource quota for new resource bundles. Get default resource quota for new resource bundles. Response example:{ "msgRateIn" : 10, "msgRateOut" : 30, "bandwidthIn" : 10000, "bandwidthOut" : 30000, "memory" : 100, "dynamic" : true }- Throws:
PulsarAdminException.NotAuthorizedException- Permission deniedPulsarAdminException- Unexpected error
-
getDefaultResourceQuotaAsync
java.util.concurrent.CompletableFuture<ResourceQuota> getDefaultResourceQuotaAsync()
Get default resource quota for new resource bundles asynchronously. Get default resource quota for new resource bundles. Response example:{ "msgRateIn" : 10, "msgRateOut" : 30, "bandwidthIn" : 10000, "bandwidthOut" : 30000, "memory" : 100, "dynamic" : true }
-
setDefaultResourceQuota
void setDefaultResourceQuota(ResourceQuota quota) throws PulsarAdminException
Set default resource quota for new namespace bundles. Set default resource quota for new namespace bundles. The resource quota can be set with these properties:msgRateIn: The maximum incoming messages per second.msgRateOut: The maximum outgoing messages per second.bandwidthIn: The maximum inbound bandwidth used.bandwidthOut: The maximum outbound bandwidth used.memory: The maximum memory used.dynamic: allow the quota to be dynamically re-calculated.
{ "msgRateIn" : 10, "msgRateOut" : 30, "bandwidthIn" : 10000, "bandwidthOut" : 30000, "memory" : 100, "dynamic" : false }- Parameters:
quota- The new ResourceQuota- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException- Unexpected error
-
setDefaultResourceQuotaAsync
java.util.concurrent.CompletableFuture<java.lang.Void> setDefaultResourceQuotaAsync(ResourceQuota quota)
Set default resource quota for new namespace bundles asynchronously. Set default resource quota for new namespace bundles. The resource quota can be set with these properties:msgRateIn: The maximum incoming messages per second.msgRateOut: The maximum outgoing messages per second.bandwidthIn: The maximum inbound bandwidth used.bandwidthOut: The maximum outbound bandwidth used.memory: The maximum memory used.dynamic: allow the quota to be dynamically re-calculated.
{ "msgRateIn" : 10, "msgRateOut" : 30, "bandwidthIn" : 10000, "bandwidthOut" : 30000, "memory" : 100, "dynamic" : false }- Parameters:
quota- The new ResourceQuota
-
getNamespaceBundleResourceQuota
ResourceQuota getNamespaceBundleResourceQuota(java.lang.String namespace, java.lang.String bundle) throws PulsarAdminException
Get resource quota of a namespace bundle. Get resource quota of a namespace bundle. Response example:{ "msgRateIn" : 10, "msgRateOut" : 30, "bandwidthIn" : 10000, "bandwidthOut" : 30000, "memory" : 100, "dynamic" : true }- Parameters:
namespace- Namespace namebundle- Range of bundle {start}_{end}- Throws:
PulsarAdminException.NotAuthorizedException- Permission deniedPulsarAdminException.NotFoundException- Namespace does not existPulsarAdminException- Unexpected error
-
getNamespaceBundleResourceQuotaAsync
java.util.concurrent.CompletableFuture<ResourceQuota> getNamespaceBundleResourceQuotaAsync(java.lang.String namespace, java.lang.String bundle)
Get resource quota of a namespace bundle asynchronously. Get resource quota of a namespace bundle. Response example:{ "msgRateIn" : 10, "msgRateOut" : 30, "bandwidthIn" : 10000, "bandwidthOut" : 30000, "memory" : 100, "dynamic" : true }- Parameters:
namespace- Namespace namebundle- Range of bundle {start}_{end}
-
setNamespaceBundleResourceQuota
void setNamespaceBundleResourceQuota(java.lang.String namespace, java.lang.String bundle, ResourceQuota quota) throws PulsarAdminExceptionSet resource quota for a namespace bundle. Set resource quota for a namespace bundle. The resource quota can be set with these properties:msgRateIn: The maximum incoming messages per second.msgRateOut: The maximum outgoing messages per second.bandwidthIn: The maximum inbound bandwidth used.bandwidthOut: The maximum outbound bandwidth used.memory: The maximum memory used.dynamic: allow the quota to be dynamically re-calculated.
{ "msgRateIn" : 10, "msgRateOut" : 30, "bandwidthIn" : 10000, "bandwidthOut" : 30000, "memory" : 100, "dynamic" : false }- Parameters:
namespace- Namespace namebundle- Bundle range {start}_{end}quota- The new ResourceQuota- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Namespace does not existPulsarAdminException- Unexpected error
-
setNamespaceBundleResourceQuotaAsync
java.util.concurrent.CompletableFuture<java.lang.Void> setNamespaceBundleResourceQuotaAsync(java.lang.String namespace, java.lang.String bundle, ResourceQuota quota)Set resource quota for a namespace bundle asynchronously. Set resource quota for a namespace bundle. The resource quota can be set with these properties:msgRateIn: The maximum incoming messages per second.msgRateOut: The maximum outgoing messages per second.bandwidthIn: The maximum inbound bandwidth used.bandwidthOut: The maximum outbound bandwidth used.memory: The maximum memory used.dynamic: allow the quota to be dynamically re-calculated.
{ "msgRateIn" : 10, "msgRateOut" : 30, "bandwidthIn" : 10000, "bandwidthOut" : 30000, "memory" : 100, "dynamic" : false }- Parameters:
namespace- Namespace namebundle- Bundle range {start}_{end}quota- The new ResourceQuota
-
resetNamespaceBundleResourceQuota
void resetNamespaceBundleResourceQuota(java.lang.String namespace, java.lang.String bundle) throws PulsarAdminExceptionReset resource quota for a namespace bundle to default value. Reset resource quota for a namespace bundle to default value. The resource quota policy will fall back to the default.- Parameters:
namespace- Namespace namebundle- Bundle range {start}_{end}- Throws:
PulsarAdminException.NotAuthorizedException- Don't have admin permissionPulsarAdminException.NotFoundException- Namespace does not existPulsarAdminException- Unexpected error
-
resetNamespaceBundleResourceQuotaAsync
java.util.concurrent.CompletableFuture<java.lang.Void> resetNamespaceBundleResourceQuotaAsync(java.lang.String namespace, java.lang.String bundle)Reset resource quota for a namespace bundle to default value asynchronously. Reset resource quota for a namespace bundle to default value. The resource quota policy will fall back to the default.- Parameters:
namespace- Namespace namebundle- Bundle range {start}_{end}
-
-