Class BrokerDiscoveryProvider

java.lang.Object
org.apache.pulsar.proxy.server.BrokerDiscoveryProvider
All Implemented Interfaces:
Closeable, AutoCloseable

@Evolving @LimitedPrivate public class BrokerDiscoveryProvider extends Object implements Closeable
Maintains available active broker list and returns next active broker in round-robin for discovery service. This is an API used by Proxy Extensions.
  • Constructor Details

    • BrokerDiscoveryProvider

      public BrokerDiscoveryProvider(ProxyConfiguration config, org.apache.pulsar.broker.resources.PulsarResources pulsarResources) throws org.apache.pulsar.broker.PulsarServerException
      Throws:
      org.apache.pulsar.broker.PulsarServerException
  • Method Details

    • getAvailableBrokers

      public List<? extends org.apache.pulsar.policies.data.loadbalancer.ServiceLookupData> getAvailableBrokers() throws org.apache.pulsar.broker.PulsarServerException
      Access the list of available brokers. Used by Protocol Handlers
      Returns:
      the list of available brokers
      Throws:
      org.apache.pulsar.broker.PulsarServerException
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException