We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
private void fireDataChangedEvents(final String path, Set<IZkDataListener> listeners) { for (final IZkDataListener listener : listeners) { _eventThread.send(new ZkEvent("Data of " + path + " changed sent to " + listener) { @Override public void run() throws Exception { // reinstall watch exists(path, true); try { Object data = readData(path, null, true); listener.handleDataChange(path, data); } catch (ZkNoNodeException e) { listener.handleDataDeleted(path); } } }); } }
maybe modify as:
private void fireDataChangedEvents(final String path, Set<IZkDataListener> listeners) { for (final IZkDataListener listener : listeners) { _eventThread.send(new ZkEvent("Data of " + path + " changed sent to " + listener) { @Override public void run() throws Exception { try { Object data = readData(path, null, true); listener.handleDataChange(path, data); } catch (ZkNoNodeException e) { exists(path, true); listener.handleDataDeleted(path); } } }); } }
The text was updated successfully, but these errors were encountered:
No, you can't. Think of the case that the node is created between the readData and exists where you will not be notified of the data change.
Sorry, something went wrong.
No branches or pull requests
maybe modify as:
The text was updated successfully, but these errors were encountered: