/** * {@inheritDoc} */ @Override public void addLocation(long nodeId, NodeLocation nodeLocation) { nodeLocations.add(nodeId, new CompactPersistentNodeLocation(nodeLocation)); }
/** * {@inheritDoc} */ @Override public NodeLocation getNodeLocation(long nodeId) { if (nodeLocationsReader == null) { nodeLocations.complete(); nodeLocationsReader = nodeLocations.createReader(); } try { return nodeLocationsReader.get(nodeId).getNodeLocation(); } catch (NoSuchIndexElementException e) { return new NodeLocation(); } }