Class FixedEnsembleProvider
java.lang.Object
org.apache.curator.ensemble.fixed.FixedEnsembleProvider
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- EnsembleProvider
Standard ensemble provider that wraps a fixed connection string
- 
Constructor SummaryConstructorsConstructorDescriptionFixedEnsembleProvider(String connectionString) The connection string to useFixedEnsembleProvider(String connectionString, boolean updateServerListEnabled) The connection string to use
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()Curator will call this method whenCuratorZookeeperClient.close()is calledReturn the current connection string to use.voidsetConnectionString(String connectionString) A new connection string event was receivedvoidstart()Curator will call this method whenCuratorZookeeperClient.start()is calledbooleanReturn true if this ensemble provider supportsZooKeeper.updateServerList(String)
- 
Constructor Details- 
FixedEnsembleProviderThe connection string to use- Parameters:
- connectionString- connection string
 
- 
FixedEnsembleProviderThe connection string to use- Parameters:
- connectionString- connection string
- updateServerListEnabled- if true, allow Curator to call- ZooKeeper.updateServerList(String)
 
 
- 
- 
Method Details- 
startDescription copied from interface:EnsembleProviderCurator will call this method whenCuratorZookeeperClient.start()is called- Specified by:
- startin interface- EnsembleProvider
- Throws:
- Exception- errors
 
- 
closeDescription copied from interface:EnsembleProviderCurator will call this method whenCuratorZookeeperClient.close()is called- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Specified by:
- closein interface- EnsembleProvider
- Throws:
- IOException- errors
 
- 
setConnectionStringDescription copied from interface:EnsembleProviderA new connection string event was received- Specified by:
- setConnectionStringin interface- EnsembleProvider
- Parameters:
- connectionString- the new connection string
 
- 
getConnectionStringDescription copied from interface:EnsembleProviderReturn the current connection string to use. Curator will call this each time it needs to create a ZooKeeper instance- Specified by:
- getConnectionStringin interface- EnsembleProvider
- Returns:
- connection string (per ZooKeeper(String, int, Watcher)etc.)
 
- 
updateServerListEnabledpublic boolean updateServerListEnabled()Description copied from interface:EnsembleProviderReturn true if this ensemble provider supportsZooKeeper.updateServerList(String)- Specified by:
- updateServerListEnabledin interface- EnsembleProvider
- Returns:
- true/false
 
 
-