private LinkedBlockingQueue<DistributionRequest> locker = new LinkedBlockingQueue<DistributionRequest>();
private ConcurrentHashMap<DistributionRequest, Boolean> candidatesForNextRound = new ConcurrentHashMap<DistributionRequest, Boolean>();
public void addListener(DistributionRequest listener) {
synchronized (listeners) {
if (!listeners.contains(listener)) {
<BUG>logger.warn("Adding a listener to Distributer:" + listener.toString());
</BUG>
boolean needsAnd = SQLValidator.removeSingleQuotes(SQLValidator.removeQuotes(listener.getQuery())).indexOf(" where ") > 0;
String query = SQLValidator.addPkField(listener.getQuery());
if (needsAnd)

private LinkedBlockingQueue<DistributionRequest> locker = new LinkedBlockingQueue<DistributionRequest>();
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 Distributer:" + listener.toString());
boolean needsAnd = SQLValidator.removeSingleQuotes(SQLValidator.removeQuotes(listener.getQuery())).indexOf(" where ") > 0;
String query = SQLValidator.addPkField(listener.getQuery());
if (needsAnd)
