|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.curator.ensemble.exhibitor.ExhibitorEnsembleProvider
public class ExhibitorEnsembleProvider
Ensemble provider that polls a cluster of Exhibitor (https://github.com/Netflix/exhibitor) instances for the connection string. If the set of instances should change, new ZooKeeper connections will use the new connection string.
| Constructor Summary | |
|---|---|
ExhibitorEnsembleProvider(Exhibitors exhibitors,
ExhibitorRestClient restClient,
String restUriPath,
int pollingMs,
RetryPolicy retryPolicy)
|
|
| Method Summary | |
|---|---|
void |
close()
Curator will call this method when CuratorZookeeperClient.close() is called |
String |
getConnectionString()
Return the current connection string to use. |
protected void |
poll()
|
void |
pollForInitialEnsemble()
Can be called prior to starting the Curator instance to set the current connection string |
void |
setExhibitors(Exhibitors newExhibitors)
Change the set of exhibitors to poll |
void |
start()
Curator will call this method when CuratorZookeeperClient.start() is
called |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ExhibitorEnsembleProvider(Exhibitors exhibitors,
ExhibitorRestClient restClient,
String restUriPath,
int pollingMs,
RetryPolicy retryPolicy)
exhibitors - the current set of exhibitor instances (can be changed later via setExhibitors(Exhibitors))restClient - the rest client to use (use DefaultExhibitorRestClient for most cases)restUriPath - the path of the REST call used to get the server set. Usually: /exhibitor/v1/cluster/listpollingMs - how ofter to poll the exhibitors for the listretryPolicy - retry policy to use when connecting to the exhibitors| Method Detail |
|---|
public void setExhibitors(Exhibitors newExhibitors)
newExhibitors - new set
public void pollForInitialEnsemble()
throws Exception
Exception - errors
public void start()
throws Exception
EnsembleProviderCuratorZookeeperClient.start() is
called
start in interface EnsembleProviderException - errors
public void close()
throws IOException
EnsembleProviderCuratorZookeeperClient.close() is called
close in interface Closeableclose in interface EnsembleProviderIOException - errorspublic String getConnectionString()
EnsembleProvider
getConnectionString in interface EnsembleProviderZooKeeper.ZooKeeper(String, int, Watcher) etc.)protected void poll()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||