// Something very wrong
LOG.error("The same watcher has been used for different event type.");
return;
}
NodeChildren oldNodeChildren = (NodeChildren) oldResult;
if (!result.getChildren().equals(oldNodeChildren.getChildren())) {
process(new WatchedEvent(Event.EventType.NodeChildrenChanged, Event.KeeperState.SyncConnected, path));
} else {
process(new WatchedEvent(Event.EventType.NodeDataChanged, Event.KeeperState.SyncConnected, path));
}
}