</BUG>
listeners.add(listener);
addListenerToCandidates(listener);
} else {
<BUG>logger.warn("Adding a listener to ModelDistributer failed, duplicated listener! " + listener.toString());
</BUG>
}
}
}
private void addListenerToCandidates(DistributionRequest listener) {

private ConcurrentHashMap<DistributionRequest, DataEnumeratorIF> candidateListeners = new ConcurrentHashMap<DistributionRequest, DataEnumeratorIF>();
private ConcurrentHashMap<DistributionRequest, Boolean> candidatesForNextRound = new ConcurrentHashMap<DistributionRequest, Boolean>();
public void addListener(DistributionRequest listener) {
synchronized (listeners) {
if (!listeners.contains(listener)) {
logger.info("Adding a listener to ModelDistributer:" + listener.toString());
listeners.add(listener);
addListenerToCandidates(listener);
} else {
logger.info("Adding a listener to ModelDistributer failed, duplicated listener! " + listener.toString());
}
}
}
private void addListenerToCandidates(DistributionRequest listener) {
