Class AutoFailoverPolicy
java.lang.Object
org.apache.pulsar.common.policies.AutoFailoverPolicy
- Direct Known Subclasses:
MinAvailablePolicy
Basic definition of an auto-failover policy.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
isBrokerAvailable
(BrokerStatus brokerStatus) Determine whether a broker is considered available or not.abstract boolean
shouldFailoverToSecondary
(int totalPrimaryCandidates) abstract boolean
shouldFailoverToSecondary
(SortedSet<BrokerStatus> brokerStatus) Checks to see whether the new namespace ownership should be failed over to the secondary brokers.
-
Constructor Details
-
AutoFailoverPolicy
public AutoFailoverPolicy()
-
-
Method Details
-
shouldFailoverToSecondary
Checks to see whether the new namespace ownership should be failed over to the secondary brokers.- Parameters:
brokerStatus
-- Returns:
-
shouldFailoverToSecondary
public abstract boolean shouldFailoverToSecondary(int totalPrimaryCandidates) -
isBrokerAvailable
Determine whether a broker is considered available or not.- Parameters:
brokerStatus
-- Returns:
-