@Override public List<String> getNeighborLocationIds() throws CouldNotPerformException { List<String> neighborIdList = new ArrayList<>(); try { for (UnitConfig locationConfig : Registries.getLocationRegistry().getNeighborLocations(getId())) { neighborIdList.add(locationConfig.getId()); } } catch (InterruptedException ex) { Thread.currentThread().interrupt(); } return neighborIdList; }
public List<LocationRemote> getNeighborLocationList(final boolean waitForData) throws CouldNotPerformException { final List<LocationRemote> neighborList = new ArrayList<>(); try { for (UnitConfig locationUnitConfig : CachedLocationRegistryRemote.getRegistry().getNeighborLocations(getId())) { neighborList.add(Units.getUnit(locationUnitConfig, waitForData, LOCATION)); } } catch (InterruptedException ex) { throw new CouldNotPerformException("Could not get all neighbors!", ex); } return neighborList; }
/** * * @return * @throws CouldNotPerformException * @deprecated please use Registries.getLocationRegistry().getNeighborLocations(String locationId) instead. */ @Override @Deprecated public List<String> getNeighborLocationIds() throws CouldNotPerformException { final List<String> neighborIdList = new ArrayList<>(); try { for (UnitConfig locationConfig : CachedLocationRegistryRemote.getRegistry().getNeighborLocations(getId())) { neighborIdList.add(locationConfig.getId()); } } catch (InterruptedException ex) { throw new CouldNotPerformException("Could not get CachedLocationRegistryRemote!", ex); } return neighborIdList; }
for (UnitConfig neighborConfig : Registries.getLocationRegistry().getNeighborLocations(locationRemote.getId())) {