public void blockUntilFinished() { while (true) { if (executor.getActiveCount() + executor.getPendingTasks() == 0) break; try { Thread.sleep(100); } catch (InterruptedException e) { throw new RuntimeException(e); } } }
long completed = gossipStage.getCompletedTasks(); long active = gossipStage.getActiveCount(); long pending = gossipStage.getPendingTasks(); totalPolls++; if (active == 0 && pending == 0)
long nowNano = System.nanoTime(); long pending = ((JMXEnabledThreadPoolExecutor) StageManager.getStage(Stage.GOSSIP)).getPendingTasks(); if (pending > 0 && lastProcessedMessageAt < now - 1000)