public Watcher expirePart1(int which) {
String path = serverIds.get(which);
System.out.printf("before %s[%s] = %s\n", Thread.currentThread().getId(), System.identityHashCode(data), data);
data.remove(path);
System.out.printf("after %s[%s] = %s\n", Thread.currentThread().getId(), System.identityHashCode(data), data);
Watcher oldWatch = watchers.remove(which);
// notify all other nodes that node "which" has disappeared
String dir = path.replaceAll("^(.*?)(/[^/]*)?$", "$1");
if (watched.contains(dir)) {
for (Watcher watcher : Lists.newArrayList(watchers)) {