Class MetadataStoreCacheLoader

java.lang.Object
org.apache.pulsar.broker.resources.MetadataStoreCacheLoader
All Implemented Interfaces:
Closeable, AutoCloseable

public class MetadataStoreCacheLoader extends Object implements Closeable
Connects with MetadataStore and sets watch to listen changes for active broker list.
  • Field Details

  • Constructor Details

  • Method Details

    • init

      public void init() throws Exception
      Initialize ZooKeeper session and creates broker cache list.
      Throws:
      Exception
    • getAvailableBrokers

      public List<org.apache.pulsar.policies.data.loadbalancer.LoadManagerReport> getAvailableBrokers()
    • close

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