public String getNodeName() { int index = path.lastIndexOf(SEPARATOR); return decode(path.substring(index + 1)); }
public String getNodeName() { int index = path.lastIndexOf(SEPARATOR); return decode(path.substring(index + 1)); }
public <T> List<T> getChildren(NodePath path, NodeMapper<T> mapper) throws ServiceLocatorException, InterruptedException { List<String> encoded; try { encoded = zk.getChildren(path.toString(), false); } catch (KeeperException e) { throw locatorException(e); } List<T> boundChildren = new ArrayList<T>(encoded.size()); for (String oneEncoded : encoded) { String notEncoded = NodePath.decode(oneEncoded); T boundChild = mapper.map(notEncoded); boundChildren.add(boundChild); } return boundChildren; }
public <T> List<T> getChildren(NodePath path, NodeMapper<T> mapper) throws ServiceLocatorException, InterruptedException { List<String> encoded; try { encoded = zk.getChildren(path.toString(), false); } catch (KeeperException e) { throw locatorException(e); } List<T> boundChildren = new ArrayList<T>(encoded.size()); for (String oneEncoded : encoded) { String notEncoded = NodePath.decode(oneEncoded); T boundChild = mapper.map(notEncoded); boundChildren.add(boundChild); } return boundChildren; }