Package org.aksw.commons.util.concurrent
Class CompletionTracker
- java.lang.Object
-
- org.aksw.commons.util.concurrent.CompletionTracker
-
-
Field Summary
Fields Modifier and Type Field Description protected longcounterprotected Executorexecutorprotected booleanisShutDownprotected Map<Long,CompletableFuture<?>>pendingprotected List<Throwable>raisedExceptions
-
Constructor Summary
Constructors Constructor Description CompletionTracker(Executor executor)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidawaitTermination()protected voidcheckTerminationCondition()voidexecute(Runnable runnable)static CompletionTrackerfrom(Executor executor)List<Throwable>getRaisedExceptions()protected booleanisTerminated()voidshutdown()
-
-
-
Constructor Detail
-
CompletionTracker
public CompletionTracker(Executor executor)
-
-
Method Detail
-
from
public static CompletionTracker from(Executor executor)
-
shutdown
public void shutdown()
-
isTerminated
protected boolean isTerminated()
-
checkTerminationCondition
protected void checkTerminationCondition()
-
awaitTermination
public void awaitTermination() throws InterruptedException- Throws:
InterruptedException
-
-