Java Code Examples for org.apache.curator.framework.recipes.cache.TreeCacheEvent.Type#NODE_REMOVED

The following examples show how to use org.apache.curator.framework.recipes.cache.TreeCacheEvent.Type#NODE_REMOVED . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GuaranteeListenerManager.java    From shardingsphere-elasticjob-lite with Apache License 2.0 5 votes vote down vote up
@Override
protected void dataChanged(final String path, final Type eventType, final String data) {
    if (Type.NODE_REMOVED == eventType && guaranteeNode.isStartedRootNode(path)) {
        for (ElasticJobListener each : elasticJobListeners) {
            if (each instanceof AbstractDistributeOnceElasticJobListener) {
                ((AbstractDistributeOnceElasticJobListener) each).notifyWaitingTaskStart();
            }
        }
    }
}
 
Example 2
Source File: GuaranteeListenerManager.java    From shardingsphere-elasticjob-lite with Apache License 2.0 5 votes vote down vote up
@Override
protected void dataChanged(final String path, final Type eventType, final String data) {
    if (Type.NODE_REMOVED == eventType && guaranteeNode.isCompletedRootNode(path)) {
        for (ElasticJobListener each : elasticJobListeners) {
            if (each instanceof AbstractDistributeOnceElasticJobListener) {
                ((AbstractDistributeOnceElasticJobListener) each).notifyWaitingTaskComplete();
            }
        }
    }
}
 
Example 3
Source File: ShutdownListenerManager.java    From shardingsphere-elasticjob-lite with Apache License 2.0 4 votes vote down vote up
private boolean isRemoveInstance(final String path, final Type eventType) {
    return instanceNode.isLocalInstancePath(path) && Type.NODE_REMOVED == eventType;
}
 
Example 4
Source File: ElectionListenerManager.java    From shardingsphere-elasticjob-lite with Apache License 2.0 4 votes vote down vote up
private boolean isLeaderCrashed(final String path, final Type eventType) {
    return leaderNode.isLeaderInstancePath(path) && Type.NODE_REMOVED == eventType;
}