Class AutoFailoverPolicy

java.lang.Object
org.apache.pulsar.common.policies.AutoFailoverPolicy
Direct Known Subclasses:
MinAvailablePolicy

public abstract class AutoFailoverPolicy extends Object
Basic definition of an auto-failover policy.
  • Constructor Details

    • AutoFailoverPolicy

      public AutoFailoverPolicy()
  • Method Details

    • shouldFailoverToSecondary

      public abstract boolean shouldFailoverToSecondary(SortedSet<BrokerStatus> brokerStatus)
      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

      public abstract boolean isBrokerAvailable(BrokerStatus brokerStatus)
      Determine whether a broker is considered available or not.
      Parameters:
      brokerStatus -
      Returns: