public class ResourceQuotaCache extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
RESOURCE_QUOTA_ROOT |
| Constructor and Description |
|---|
ResourceQuotaCache(ZooKeeperCache cache) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.pulsar.common.policies.data.ResourceQuota |
getDefaultQuota()
Get default resource quota..
|
static org.apache.pulsar.common.policies.data.ResourceQuota |
getInitialQuotaValue() |
org.apache.pulsar.common.policies.data.ResourceQuota |
getQuota(NamespaceBundle suName)
Get resource quota for a specified service unit.
|
org.apache.pulsar.common.policies.data.ResourceQuota |
getQuota(String suName)
Get resource quota for a specified service unit.
|
void |
initZK()
Initialize the resource quota root node in ZooKeeper.
|
void |
setDefaultQuota(org.apache.pulsar.common.policies.data.ResourceQuota quota)
Set default resource quota..
|
void |
setQuota(NamespaceBundle suName,
org.apache.pulsar.common.policies.data.ResourceQuota quota)
Set resource quota for a specified
ServiceUnit. |
void |
setQuota(String suName,
org.apache.pulsar.common.policies.data.ResourceQuota quota)
Set resource quota for a specified
ServiceUnit. |
void |
unsetQuota(NamespaceBundle suName)
Remove resource quota for a specified
ServiceUnit to use the default quota. |
void |
unsetQuota(String suName)
Remove resource quota for a specified
ServiceUnit to use the default quota. |
public static final String RESOURCE_QUOTA_ROOT
public ResourceQuotaCache(ZooKeeperCache cache)
public static org.apache.pulsar.common.policies.data.ResourceQuota getInitialQuotaValue()
public void initZK()
throws PulsarServerException
PulsarServerExceptionpublic org.apache.pulsar.common.policies.data.ResourceQuota getQuota(String suName)
suName - identifier of the ServiceUnitResourceQuota.public org.apache.pulsar.common.policies.data.ResourceQuota getQuota(NamespaceBundle suName)
suName - identifier of the ServiceUnitResourceQuota.public org.apache.pulsar.common.policies.data.ResourceQuota getDefaultQuota()
ResourceQuota.public void setQuota(String suName, org.apache.pulsar.common.policies.data.ResourceQuota quota) throws Exception
ServiceUnit.suName - identifier of the ServiceUnitquota - ResourceQuota to set.Exceptionpublic void setQuota(NamespaceBundle suName, org.apache.pulsar.common.policies.data.ResourceQuota quota) throws Exception
ServiceUnit.suName - identifier of the ServiceUnitquota - ResourceQuota to set.Exceptionpublic void setDefaultQuota(org.apache.pulsar.common.policies.data.ResourceQuota quota)
throws Exception
quota - ResourceQuota to set.Exceptionpublic void unsetQuota(String suName) throws Exception
ServiceUnit to use the default quota.suName - identifier of the ServiceUnitExceptionpublic void unsetQuota(NamespaceBundle suName) throws Exception
ServiceUnit to use the default quota.suName - identifier of the ServiceUnitExceptionCopyright © 2017–2021 Apache Software Foundation. All rights reserved.