@Override public void attributes(final Map<String, ?> newAttributes) { super.attributes(newAttributes); synchronized (ConcurrentServiceWatcher.this) { if (null != currentExport && thisImport.equals(currentImport)) { currentExport.attributes(newAttributes); } // has ranking changed? updateBestService(); } }
@Override @SuppressWarnings("unchecked") public void put(final T newInstance) { super.put(newInstance); synchronized (ConcurrentServiceWatcher.this) { if (null != currentExport && thisImport.equals(currentImport)) { currentExport.put((S) newInstance); // is this being removed? if (null == newInstance) { updateBestService(); } } } }