public class FixedEnsembleProvider extends Object implements EnsembleProvider
Constructor and Description |
---|
FixedEnsembleProvider(String connectionString)
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 |
start()
Curator will call this method when
CuratorZookeeperClient.start() is
called |
public FixedEnsembleProvider(String connectionString)
connectionString
- connection stringpublic void start() throws Exception
EnsembleProvider
CuratorZookeeperClient.start()
is
calledstart
in interface EnsembleProvider
Exception
- errorspublic void close() throws IOException
EnsembleProvider
CuratorZookeeperClient.close()
is calledclose
in interface Closeable
close
in interface AutoCloseable
close
in interface EnsembleProvider
IOException
- errorspublic String getConnectionString()
EnsembleProvider
getConnectionString
in interface EnsembleProvider
ZooKeeper.ZooKeeper(String, int, Watcher)
etc.)Copyright © 2011–2019 The Apache Software Foundation. All rights reserved.