Package org.apache.curator.ensemble
Interface EnsembleProvider
-
- All Superinterfaces:
java.lang.AutoCloseable,java.io.Closeable
- All Known Implementing Classes:
ExhibitorEnsembleProvider,FixedEnsembleProvider
public interface EnsembleProvider extends java.io.CloseableAbstraction that provides the ZooKeeper connection string
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Curator will call this method whenCuratorZookeeperClient.close()is calledjava.lang.StringgetConnectionString()Return the current connection string to use.voidsetConnectionString(java.lang.String connectionString)A new connection string event was receivedvoidstart()Curator will call this method whenCuratorZookeeperClient.start()is calledbooleanupdateServerListEnabled()Return true if this ensemble provider supportsZooKeeper.updateServerList(String)
-
-
-
Method Detail
-
start
void start() throws java.lang.ExceptionCurator will call this method whenCuratorZookeeperClient.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.IOExceptionCurator will call this method whenCuratorZookeeperClient.close()is called- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.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 supportsZooKeeper.updateServerList(String)- Returns:
- true/false
-
-