@Override public void closeEvent(TCConnectionEvent event) { synchronized (managedConnectionsMap) { Assert.eval(managedConnectionsMap.containsKey(event.getSource())); int closedCientWeight = managedConnectionsMap.get(event.getSource()); this.clientWeights -= closedCientWeight; managedConnectionsMap.remove(event.getSource()); event.getSource().removeListener(this); } }
@Override public void closeEvent(TCConnectionEvent event) { synchronized (states) { states.remove(event.getSource()); } }