接口 NamespaceIsolationPolicy
- 所有已知实现类:
NamespaceIsolationPolicyImpl
public interface NamespaceIsolationPolicy
Namespace isolation policy.
-
方法概要
修饰符和类型方法说明findPrimaryBrokers(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.booleanisPrimaryBroker(String brokerAddress) Check to see whether the specific host is a primary broker.booleanisPrimaryBrokerAvailable(BrokerStatus brkStatus) booleanisSecondaryBroker(String brokerAddress) Check to see whether the specific host is a secondary broker.booleanshouldFailover(int totalPrimaryCandidates) Check to see whether the primary brokers can still handle a new namespace or has to failover.booleanshouldFailover(SortedSet<BrokerStatus> primaryCandidates) 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.
-
方法详细资料
-
getPrimaryBrokers
Get the list of regex for the set of primary brokers.- 返回:
-
getSecondaryBrokers
Get the list of regex for the set of secondary brokers.- 返回:
-
findPrimaryBrokers
Get the list of primary brokers for the namespace according to the policy.- 参数:
availableBrokers- brokers identified by service URL.namespace- the namespace- 返回:
- a list brokers by service URL.
-
findSecondaryBrokers
Get the list of secondary brokers for the namespace according to the policy.- 参数:
availableBrokers- brokers identified by service URL.namespace- the namespace- 返回:
- a list brokers by service URL.
-
shouldFailover
Check to see whether the primary brokers can still handle a new namespace or has to failover.- 参数:
primaryCandidates-- 返回:
-
shouldFailover
boolean shouldFailover(int totalPrimaryCandidates) Check to see whether the primary brokers can still handle a new namespace or has to failover.- 参数:
totalPrimaryCandidates-- 返回:
-
shouldFallback
Check to see whether the namespace ownership should fallback to the primary brokers.- 参数:
primaryBrokers-- 返回:
-
isPrimaryBroker
Check to see whether the specific host is a primary broker.- 参数:
brokerAddress-- 返回:
-
isSecondaryBroker
Check to see whether the specific host is a secondary broker.- 参数:
brokerAddress-- 返回:
-
getAvailablePrimaryBrokers
According to the namespace isolation policy, find the allowed available primary brokers.- 参数:
primaryCandidates-- 返回:
-
isPrimaryBrokerAvailable
-