public class ResourceQuotasImpl extends BaseResource implements ResourceQuotas
auth, readTimeoutMs| Constructor and Description |
|---|
ResourceQuotasImpl(javax.ws.rs.client.WebTarget web,
org.apache.pulsar.client.api.Authentication auth,
long readTimeoutMs) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.pulsar.common.policies.data.ResourceQuota |
getDefaultResourceQuota()
Get default resource quota for new resource bundles.
|
CompletableFuture<org.apache.pulsar.common.policies.data.ResourceQuota> |
getDefaultResourceQuotaAsync()
Get default resource quota for new resource bundles asynchronously.
|
org.apache.pulsar.common.policies.data.ResourceQuota |
getNamespaceBundleResourceQuota(String namespace,
String bundle)
Get resource quota of a namespace bundle.
|
CompletableFuture<org.apache.pulsar.common.policies.data.ResourceQuota> |
getNamespaceBundleResourceQuotaAsync(String namespace,
String bundle)
Get resource quota of a namespace bundle asynchronously.
|
void |
resetNamespaceBundleResourceQuota(String namespace,
String bundle)
Reset resource quota for a namespace bundle to default value.
|
CompletableFuture<Void> |
resetNamespaceBundleResourceQuotaAsync(String namespace,
String bundle)
Reset resource quota for a namespace bundle to default value asynchronously.
|
void |
setDefaultResourceQuota(org.apache.pulsar.common.policies.data.ResourceQuota quota)
Set default resource quota for new namespace bundles.
|
CompletableFuture<Void> |
setDefaultResourceQuotaAsync(org.apache.pulsar.common.policies.data.ResourceQuota quota)
Set default resource quota for new namespace bundles asynchronously.
|
void |
setNamespaceBundleResourceQuota(String namespace,
String bundle,
org.apache.pulsar.common.policies.data.ResourceQuota quota)
Set resource quota for a namespace bundle.
|
CompletableFuture<Void> |
setNamespaceBundleResourceQuotaAsync(String namespace,
String bundle,
org.apache.pulsar.common.policies.data.ResourceQuota quota)
Set resource quota for a namespace bundle asynchronously.
|
asyncDeleteRequest, asyncGetRequest, asyncPostRequest, asyncPutRequest, getApiException, getApiException, request, requestAsyncpublic ResourceQuotasImpl(javax.ws.rs.client.WebTarget web,
org.apache.pulsar.client.api.Authentication auth,
long readTimeoutMs)
public org.apache.pulsar.common.policies.data.ResourceQuota getDefaultResourceQuota()
throws PulsarAdminException
ResourceQuotas
{
"msgRateIn" : 10,
"msgRateOut" : 30,
"bandwidthIn" : 10000,
"bandwidthOut" : 30000,
"memory" : 100,
"dynamic" : true
}
getDefaultResourceQuota in interface ResourceQuotasPulsarAdminException.NotAuthorizedException - Permission deniedPulsarAdminException - Unexpected errorpublic CompletableFuture<org.apache.pulsar.common.policies.data.ResourceQuota> getDefaultResourceQuotaAsync()
ResourceQuotas
{
"msgRateIn" : 10,
"msgRateOut" : 30,
"bandwidthIn" : 10000,
"bandwidthOut" : 30000,
"memory" : 100,
"dynamic" : true
}
getDefaultResourceQuotaAsync in interface ResourceQuotaspublic void setDefaultResourceQuota(org.apache.pulsar.common.policies.data.ResourceQuota quota)
throws PulsarAdminException
ResourceQuotasmsgRateIn : 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
}
setDefaultResourceQuota in interface ResourceQuotasquota - The new ResourceQuotaPulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException - Unexpected errorpublic CompletableFuture<Void> setDefaultResourceQuotaAsync(org.apache.pulsar.common.policies.data.ResourceQuota quota)
ResourceQuotasmsgRateIn : 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
}
setDefaultResourceQuotaAsync in interface ResourceQuotasquota - The new ResourceQuotapublic org.apache.pulsar.common.policies.data.ResourceQuota getNamespaceBundleResourceQuota(String namespace, String bundle) throws PulsarAdminException
ResourceQuotas
{
"msgRateIn" : 10,
"msgRateOut" : 30,
"bandwidthIn" : 10000,
"bandwidthOut" : 30000,
"memory" : 100,
"dynamic" : true
}
getNamespaceBundleResourceQuota in interface ResourceQuotasnamespace - Namespace namebundle - Range of bundle {start}_{end}PulsarAdminException.NotAuthorizedException - Permission deniedPulsarAdminException.NotFoundException - Namespace does not existPulsarAdminException - Unexpected errorpublic CompletableFuture<org.apache.pulsar.common.policies.data.ResourceQuota> getNamespaceBundleResourceQuotaAsync(String namespace, String bundle)
ResourceQuotas
{
"msgRateIn" : 10,
"msgRateOut" : 30,
"bandwidthIn" : 10000,
"bandwidthOut" : 30000,
"memory" : 100,
"dynamic" : true
}
getNamespaceBundleResourceQuotaAsync in interface ResourceQuotasnamespace - Namespace namebundle - Range of bundle {start}_{end}public void setNamespaceBundleResourceQuota(String namespace, String bundle, org.apache.pulsar.common.policies.data.ResourceQuota quota) throws PulsarAdminException
ResourceQuotasmsgRateIn : 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
}
setNamespaceBundleResourceQuota in interface ResourceQuotasnamespace - Namespace namebundle - Bundle range {start}_{end}quota - The new ResourceQuotaPulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Namespace does not existPulsarAdminException - Unexpected errorpublic CompletableFuture<Void> setNamespaceBundleResourceQuotaAsync(String namespace, String bundle, org.apache.pulsar.common.policies.data.ResourceQuota quota)
ResourceQuotasmsgRateIn : 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
}
setNamespaceBundleResourceQuotaAsync in interface ResourceQuotasnamespace - Namespace namebundle - Bundle range {start}_{end}quota - The new ResourceQuotapublic void resetNamespaceBundleResourceQuota(String namespace, String bundle) throws PulsarAdminException
ResourceQuotasresetNamespaceBundleResourceQuota in interface ResourceQuotasnamespace - Namespace namebundle - Bundle range {start}_{end}PulsarAdminException.NotAuthorizedException - Don't have admin permissionPulsarAdminException.NotFoundException - Namespace does not existPulsarAdminException - Unexpected errorpublic CompletableFuture<Void> resetNamespaceBundleResourceQuotaAsync(String namespace, String bundle)
ResourceQuotasresetNamespaceBundleResourceQuotaAsync in interface ResourceQuotasnamespace - Namespace namebundle - Bundle range {start}_{end}Copyright © 2017–2021 Apache Software Foundation. All rights reserved.