Interface EnsembleProvider

  • All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable
    All Known Implementing Classes:
    FixedEnsembleProvider

    public interface EnsembleProvider
    extends java.io.Closeable
    Abstraction that provides the ZooKeeper connection string
    • Method Detail

      • start

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

        java.lang.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 java.io.IOException
        Curator will call this method when CuratorZookeeperClient.close() is called
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException - errors
      • setConnectionString

        void setConnectionString​(java.lang.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