public class FixedEnsembleProvider extends Object implements EnsembleProvider
| Constructor and Description |
|---|
FixedEnsembleProvider(String connectionString)
The connection string to use
|
FixedEnsembleProvider(String connectionString,
boolean updateServerListEnabled)
The connection string to use
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Curator will call this method when
CuratorZookeeperClient.close() is called |
String |
getConnectionString()
Return the current connection string to use.
|
void |
setConnectionString(String connectionString)
A new connection string event was received
|
void |
start()
Curator will call this method when
CuratorZookeeperClient.start() is
called |
boolean |
updateServerListEnabled()
Return true if this ensemble provider supports
ZooKeeper.updateServerList(String) |
public FixedEnsembleProvider(String connectionString)
connectionString - connection stringpublic FixedEnsembleProvider(String connectionString, boolean updateServerListEnabled)
connectionString - connection stringupdateServerListEnabled - if true, allow Curator to call ZooKeeper.updateServerList(String)public void start()
throws Exception
EnsembleProviderCuratorZookeeperClient.start() is
calledstart in interface EnsembleProviderException - errorspublic void close()
throws IOException
EnsembleProviderCuratorZookeeperClient.close() is calledclose in interface Closeableclose in interface AutoCloseableclose in interface EnsembleProviderIOException - errorspublic void setConnectionString(String connectionString)
EnsembleProvidersetConnectionString in interface EnsembleProviderconnectionString - the new connection stringpublic String getConnectionString()
EnsembleProvidergetConnectionString in interface EnsembleProviderZooKeeper(String, int, Watcher) etc.)public boolean updateServerListEnabled()
EnsembleProviderZooKeeper.updateServerList(String)updateServerListEnabled in interface EnsembleProviderCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.