if (run && queue.size() < triggerReloadQueueLength) {
try {
List<AdapterCall> newElements = ctrl.run(new DatabaseTransaction<List<AdapterCall>>() {
@Override
public List<AdapterCall> run(Connection con) throws Exception {
Selector s = persistence.createSelector();
return s.dequeue(con, adapterIds, transientQueueLength-queue.size());
}
});
if (!newElements.isEmpty())
waitMillis = 1;
queue.addAll(