Skip to content

Instantly share code, notes, and snippets.

@anjanashankar9
Created December 20, 2019 09:11
Embed
What would you like to do?
public class WatcherImpl implements Watcher{
@Override
public void process(WatchedEvent event) {
if(event.getType() == Event.EventType.NodeDataChanged) {
System.out.println("The Data has changed");
}
else if(event.getType() == Event.EventType.NodeChildrenChanged){
System.out.println("Children have changed");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment