Interface EnsembleProvider

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
FixedEnsembleProvider

public interface EnsembleProvider extends Closeable
Abstraction that provides the ZooKeeper connection string
  • Method Details

    • start

      void start() throws Exception
      Curator will call this method when CuratorZookeeperClient.start() is called
      Throws:
      Exception - errors
    • getConnectionString

      String getConnectionString()
      Return the current connection string to use. Curator will call this each time it needs to create a ZooKeeper instance
      Returns:
      connection string (per ZooKeeper(String, int, Watcher) etc.)
    • close

      void close() throws IOException
      Curator will call this method when CuratorZookeeperClient.close() is called
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException - errors
    • setConnectionString

      void setConnectionString(String connectionString)
      A new connection string event was received
      Parameters:
      connectionString - the new connection string
    • updateServerListEnabled

      boolean updateServerListEnabled()
      Return true if this ensemble provider supports ZooKeeper.updateServerList(String)
      Returns:
      true/false