public class ConfigWatcher extends Object implements Closeable, org.apache.curator.framework.recipes.cache.TreeCacheListener, org.springframework.context.ApplicationEventPublisherAware
TreeCache for each context. It publishes events upon
element change in Zookeeper.| Constructor and Description |
|---|
ConfigWatcher(List<String> contexts,
org.apache.curator.framework.CuratorFramework source) |
| Modifier and Type | Method and Description |
|---|---|
void |
childEvent(org.apache.curator.framework.CuratorFramework client,
org.apache.curator.framework.recipes.cache.TreeCacheEvent event) |
void |
close() |
String |
getEventDesc(org.apache.curator.framework.recipes.cache.TreeCacheEvent event) |
void |
setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher publisher) |
void |
start() |
public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher publisher)
setApplicationEventPublisher in interface org.springframework.context.ApplicationEventPublisherAware@PostConstruct public void start()
public void close()
close in interface Closeableclose in interface AutoCloseablepublic void childEvent(org.apache.curator.framework.CuratorFramework client,
org.apache.curator.framework.recipes.cache.TreeCacheEvent event)
throws Exception
childEvent in interface org.apache.curator.framework.recipes.cache.TreeCacheListenerExceptionpublic String getEventDesc(org.apache.curator.framework.recipes.cache.TreeCacheEvent event)
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.