Class NamespaceIsolationPolicies
java.lang.Object
org.apache.pulsar.common.policies.impl.NamespaceIsolationPolicies
Namespace isolation policies.
-
Constructor Summary
ConstructorDescriptionNamespaceIsolationPolicies
(Map<String, NamespaceIsolationDataImpl> policiesMap) -
Method Summary
Modifier and TypeMethodDescriptionvoid
assignBroker
(NamespaceName nsname, BrokerStatus brkStatus, SortedSet<BrokerStatus> primaryCandidates, SortedSet<BrokerStatus> secondaryCandidates, SortedSet<BrokerStatus> sharedCandidates) void
deletePolicy
(String policyName) Delete a policy.Get the full policy map.getPolicyByName
(String policyName) Access method to get the namespace isolation policy by the policy name.getPolicyByNamespace
(NamespaceName namespace) Get the namespace isolation policy for the specified namespace.boolean
isSharedBroker
(String host) Check to see whether a broker is in the shared broker pool or not.void
setPolicy
(String policyName, NamespaceIsolationData policyData) Set the policy data for a single policy.
-
Constructor Details
-
NamespaceIsolationPolicies
public NamespaceIsolationPolicies() -
NamespaceIsolationPolicies
-
-
Method Details
-
getPolicyByName
Access method to get the namespace isolation policy by the policy name.- Parameters:
policyName
-- Returns:
-
getPolicyByNamespace
Get the namespace isolation policy for the specified namespace.There should only be one namespace isolation policy defined for the specific namespace. If multiple policies match, the first one will be returned.
- Parameters:
namespace
-- Returns:
-
setPolicy
Set the policy data for a single policy.- Parameters:
policyName
-policyData
-
-
deletePolicy
Delete a policy.- Parameters:
policyName
-
-
getPolicies
Get the full policy map.- Returns:
- All policy data in a map
-
assignBroker
public void assignBroker(NamespaceName nsname, BrokerStatus brkStatus, SortedSet<BrokerStatus> primaryCandidates, SortedSet<BrokerStatus> secondaryCandidates, SortedSet<BrokerStatus> sharedCandidates)
-