Class MetadataStoreCacheLoader
java.lang.Object
org.apache.pulsar.broker.resources.MetadataStoreCacheLoader
- All Implemented Interfaces:
Closeable,AutoCloseable
Connects with MetadataStore and sets watch to listen changes for active broker list.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMetadataStoreCacheLoader(PulsarResources pulsarResources, int operationTimeoutMs) -
Method Summary
-
Field Details
-
LOADBALANCE_BROKERS_ROOT
- See Also:
-
-
Constructor Details
-
MetadataStoreCacheLoader
public MetadataStoreCacheLoader(PulsarResources pulsarResources, int operationTimeoutMs) throws Exception - Throws:
Exception
-
-
Method Details
-
init
Initialize ZooKeeper session and creates broker cache list.- Throws:
Exception
-
getAvailableBrokers
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-