@Configuration(proxyBeanMethods=false) @ConditionalOnBean(name="org.springframework.cloud.zookeeper.discovery.ZookeeperDiscoveryAutoConfiguration") public class DubboServiceDiscoveryAutoConfiguration.ZookeeperConfiguration extends Object implements org.springframework.context.ApplicationListener<org.springframework.cloud.client.discovery.event.InstanceRegisteredEvent>
| Modifier and Type | Field and Description |
|---|---|
static String |
CHILD_EVENT_POINTCUT_EXPRESSION
The pointcut expression for
ZookeeperServiceWatch.childEvent(CuratorFramework, TreeCacheEvent). |
static String |
NODE_PATH_SEPARATOR
The path separator of Zookeeper node.
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterChildEvent(org.apache.curator.framework.CuratorFramework client,
org.apache.curator.framework.recipes.cache.TreeCacheEvent event) |
void |
beforeChildEvent(org.apache.curator.framework.CuratorFramework client,
org.apache.curator.framework.recipes.cache.TreeCacheEvent event)
Try to
dispatch ServiceInstancesChangedEvent before
ZookeeperServiceWatch.childEvent(CuratorFramework, TreeCacheEvent)
execution if required. |
Predicate<org.springframework.cloud.client.discovery.event.HeartbeatEvent> |
heartbeatEventChangedPredicate()
Zookeeper uses
TreeCacheEvent to trigger
#dispatchServiceInstancesChangedEvent(String, Collection) , thus
HeartbeatEvent handle is always ignored. |
void |
onApplicationEvent(org.springframework.cloud.client.discovery.event.InstanceRegisteredEvent event)
Handle on
InstanceRegisteredEvent after
ZookeeperServiceWatch.onApplicationEvent(InstanceRegisteredEvent). |
public static final String CHILD_EVENT_POINTCUT_EXPRESSION
ZookeeperServiceWatch.childEvent(CuratorFramework, TreeCacheEvent).public static final String NODE_PATH_SEPARATOR
@Bean public Predicate<org.springframework.cloud.client.discovery.event.HeartbeatEvent> heartbeatEventChangedPredicate()
TreeCacheEvent to trigger
#dispatchServiceInstancesChangedEvent(String, Collection) , thus
HeartbeatEvent handle is always ignored.false foreverpublic void onApplicationEvent(org.springframework.cloud.client.discovery.event.InstanceRegisteredEvent event)
InstanceRegisteredEvent after
ZookeeperServiceWatch.onApplicationEvent(InstanceRegisteredEvent).onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.cloud.client.discovery.event.InstanceRegisteredEvent>event - InstanceRegisteredEventreattachTreeCacheListeners()public void beforeChildEvent(org.apache.curator.framework.CuratorFramework client,
org.apache.curator.framework.recipes.cache.TreeCacheEvent event)
dispatch ServiceInstancesChangedEvent before
ZookeeperServiceWatch.childEvent(CuratorFramework, TreeCacheEvent)
execution if required.client - CuratorFrameworkevent - TreeCacheEventpublic void afterChildEvent(org.apache.curator.framework.CuratorFramework client,
org.apache.curator.framework.recipes.cache.TreeCacheEvent event)
Copyright © 2021 Pivotal Software, Inc.. All rights reserved.