类 NamespaceIsolationPolicyImpl
java.lang.Object
org.apache.pulsar.common.policies.impl.NamespaceIsolationPolicyImpl
- 所有已实现的接口:
NamespaceIsolationPolicy
Implementation of the namespace isolation policy.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明booleanfindPrimaryBrokers(List<URL> availableBrokers, NamespaceName namespace) Get the list of primary brokers for the namespace according to the policy.findSecondaryBrokers(List<URL> availableBrokers, NamespaceName namespace) Get the list of secondary brokers for the namespace according to the policy.getAvailablePrimaryBrokers(SortedSet<BrokerStatus> primaryCandidates) According to the namespace isolation policy, find the allowed available primary brokers.Get the list of regex for the set of primary brokers.Get the list of regex for the set of secondary brokers.inthashCode()booleanisPrimaryBroker(String broker) Check to see whether the specific host is a primary broker.booleanisPrimaryBrokerAvailable(BrokerStatus brkStatus) booleanisSecondaryBroker(String broker) Check to see whether the specific host is a secondary broker.booleanshouldFailover(int totalPrimaryResourceUnits) Check to see whether the primary brokers can still handle a new namespace or has to failover.booleanshouldFailover(SortedSet<BrokerStatus> brokerStatus) Check to see whether the primary brokers can still handle a new namespace or has to failover.booleanshouldFallback(SortedSet<BrokerStatus> primaryBrokers) Check to see whether the namespace ownership should fallback to the primary brokers.toString()
-
构造器详细资料
-
NamespaceIsolationPolicyImpl
-
-
方法详细资料
-
getPrimaryBrokers
从接口复制的说明:NamespaceIsolationPolicyGet the list of regex for the set of primary brokers.- 指定者:
getPrimaryBrokers在接口中NamespaceIsolationPolicy- 返回:
-
getSecondaryBrokers
从接口复制的说明:NamespaceIsolationPolicyGet the list of regex for the set of secondary brokers.- 指定者:
getSecondaryBrokers在接口中NamespaceIsolationPolicy- 返回:
-
findPrimaryBrokers
从接口复制的说明:NamespaceIsolationPolicyGet the list of primary brokers for the namespace according to the policy.- 指定者:
findPrimaryBrokers在接口中NamespaceIsolationPolicy- 参数:
availableBrokers- brokers identified by service URL.namespace- the namespace- 返回:
- a list brokers by service URL.
-
findSecondaryBrokers
从接口复制的说明:NamespaceIsolationPolicyGet the list of secondary brokers for the namespace according to the policy.- 指定者:
findSecondaryBrokers在接口中NamespaceIsolationPolicy- 参数:
availableBrokers- brokers identified by service URL.namespace- the namespace- 返回:
- a list brokers by service URL.
-
shouldFallback
从接口复制的说明:NamespaceIsolationPolicyCheck to see whether the namespace ownership should fallback to the primary brokers.- 指定者:
shouldFallback在接口中NamespaceIsolationPolicy- 返回:
-
isPrimaryBroker
从接口复制的说明:NamespaceIsolationPolicyCheck to see whether the specific host is a primary broker.- 指定者:
isPrimaryBroker在接口中NamespaceIsolationPolicy- 返回:
-
isSecondaryBroker
从接口复制的说明:NamespaceIsolationPolicyCheck to see whether the specific host is a secondary broker.- 指定者:
isSecondaryBroker在接口中NamespaceIsolationPolicy- 返回:
-
hashCode
public int hashCode() -
equals
-
getAvailablePrimaryBrokers
public SortedSet<BrokerStatus> getAvailablePrimaryBrokers(SortedSet<BrokerStatus> primaryCandidates) 从接口复制的说明:NamespaceIsolationPolicyAccording to the namespace isolation policy, find the allowed available primary brokers.- 指定者:
getAvailablePrimaryBrokers在接口中NamespaceIsolationPolicy- 返回:
-
shouldFailover
从接口复制的说明:NamespaceIsolationPolicyCheck to see whether the primary brokers can still handle a new namespace or has to failover.- 指定者:
shouldFailover在接口中NamespaceIsolationPolicy- 返回:
-
shouldFailover
public boolean shouldFailover(int totalPrimaryResourceUnits) 从接口复制的说明:NamespaceIsolationPolicyCheck to see whether the primary brokers can still handle a new namespace or has to failover.- 指定者:
shouldFailover在接口中NamespaceIsolationPolicy- 返回:
-
isPrimaryBrokerAvailable
-
toString
-