Skip to content

Instantly share code, notes, and snippets.

@anjanashankar9
Created December 20, 2019 09:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anjanashankar9/1dadf426c4feb9913f71c48e6db7e0a3 to your computer and use it in GitHub Desktop.
Save anjanashankar9/1dadf426c4feb9913f71c48e6db7e0a3 to your computer and use it in GitHub Desktop.
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