* Update a modified child and republish a new snapshot. This may indicate
* a deleted child or a child with modified data.
*/
private void processChildEvent(WatchedEvent event) throws Exception {
HashMap<Integer, Long> cacheCopy = new HashMap<Integer, Long>(m_publicCache);
ByteArrayCallback cb = new ByteArrayCallback();
m_zk.getData(event.getPath(), m_childWatch, cb, null);
try {
// cb.getData() and cb.getPath() throw KeeperException
byte payload[] = cb.getData();
long HSId = Long.valueOf(new String(payload, "UTF-8"));
cacheCopy.put(getPartitionIdFromZKPath(cb.getPath()), HSId);
} catch (KeeperException.NoNodeException e) {
// rtb: I think result's path is the same as cb.getPath()?
cacheCopy.remove(getPartitionIdFromZKPath(event.getPath()));
}
m_publicCache = ImmutableMap.copyOf(cacheCopy);