List of utility methods to do AtomicInteger
CompletableFuture | waitForAll(List Return a future that represents the completion of the futures in the provided list if (futures.isEmpty()) { return CompletableFuture.completedFuture(null); final CompletableFuture<T> compositeFuture = new CompletableFuture<>(); final AtomicInteger count = new AtomicInteger(futures.size()); final AtomicReference<Throwable> exception = new AtomicReference<>(); for (CompletableFuture<T> future : futures) { future.whenComplete((r, ex) -> { ... |
void | waitForEvents(long sleepTime, AtomicBoolean condition, long timeout) wait For Events long currentWaitTime = 0; long startTime = System.currentTimeMillis(); while (!condition.get() && (currentWaitTime <= timeout)) { Thread.sleep(sleepTime); currentWaitTime = System.currentTimeMillis() - startTime; |
void | waitForEvents(long sleepTime, int expectedCount, AtomicInteger actualCount, long timeout) wait For Events long currentWaitTime = 0; long startTime = System.currentTimeMillis(); while ((actualCount.get() < expectedCount) && (currentWaitTime <= timeout)) { Thread.sleep(sleepTime); currentWaitTime = System.currentTimeMillis() - startTime; |
void | waitForEvents(long sleepTime, int expectedCount, AtomicInteger actualCount, long timeout) wait For Events long currentWaitTime = 0; long startTime = System.currentTimeMillis(); while ((actualCount.get() < expectedCount) && (currentWaitTime <= timeout)) { Thread.sleep(sleepTime); currentWaitTime = System.currentTimeMillis() - startTime; |