Interface ModularLoadManagerStrategy

  • All Known Implementing Classes:
    LeastLongTermMessageRate

    public interface ModularLoadManagerStrategy
    Interface which serves as a component for ModularLoadManagerImpl, flexibly allowing the injection of potentially complex strategies.
    • Method Detail

      • selectBroker

        java.util.Optional<java.lang.String> selectBroker​(java.util.Set<java.lang.String> candidates,
                                                          BundleData bundleToAssign,
                                                          LoadData loadData,
                                                          org.apache.pulsar.broker.ServiceConfiguration conf)
        Find a suitable broker to assign the given bundle to.
        Parameters:
        candidates - The candidates for which the bundle may be assigned.
        bundleToAssign - The data for the bundle to assign.
        loadData - The load data from the leader broker.
        conf - The service configuration.
        Returns:
        The name of the selected broker as it appears on ZooKeeper.
      • create

        static ModularLoadManagerStrategy create​(org.apache.pulsar.broker.ServiceConfiguration conf)
        Create a placement strategy using the configuration.
        Parameters:
        conf - ServiceConfiguration to use.
        Returns:
        A placement strategy from the given configurations.