Package org.apache.pulsar.proxy.server
Class BrokerDiscoveryProvider
- java.lang.Object
-
- org.apache.pulsar.proxy.server.BrokerDiscoveryProvider
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
@Evolving @LimitedPrivate public class BrokerDiscoveryProvider extends java.lang.Object implements java.io.CloseableMaintains 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
Constructors Constructor Description BrokerDiscoveryProvider(ProxyConfiguration config, org.apache.pulsar.broker.resources.PulsarResources pulsarResources)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckAuthorization(ProxyService service, org.apache.pulsar.common.naming.TopicName topicName, java.lang.String role, org.apache.pulsar.broker.authentication.AuthenticationDataSource authenticationData)voidclose()java.util.List<? extends org.apache.pulsar.policies.data.loadbalancer.ServiceLookupData>getAvailableBrokers()Access the list of available brokers.
-
-
-
Constructor Detail
-
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 Detail
-
getAvailableBrokers
public java.util.List<? extends org.apache.pulsar.policies.data.loadbalancer.ServiceLookupData> getAvailableBrokers() throws org.apache.pulsar.broker.PulsarServerExceptionAccess the list of available brokers. Used by Protocol Handlers- Returns:
- the list of available brokers
- Throws:
org.apache.pulsar.broker.PulsarServerException
-
checkAuthorization
protected void checkAuthorization(ProxyService service, org.apache.pulsar.common.naming.TopicName topicName, java.lang.String role, org.apache.pulsar.broker.authentication.AuthenticationDataSource authenticationData) throws java.lang.Exception
- Throws:
java.lang.Exception
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
-