Package org.apache.pulsar.proxy.server
Class BrokerDiscoveryProvider
java.lang.Object
org.apache.pulsar.proxy.server.BrokerDiscoveryProvider
- All Implemented Interfaces:
Closeable,AutoCloseable
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 Summary
ConstructorsConstructorDescriptionBrokerDiscoveryProvider(ProxyConfiguration config, PulsarResources pulsarResources) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()List<? extends ServiceLookupData>Access the list of available brokers.
-
Constructor Details
-
BrokerDiscoveryProvider
public BrokerDiscoveryProvider(ProxyConfiguration config, PulsarResources pulsarResources) throws PulsarServerException - Throws:
PulsarServerException
-
-
Method Details
-
getAvailableBrokers
Access the list of available brokers. Used by Protocol Handlers- Returns:
- the list of available brokers
- Throws:
PulsarServerException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-