Class ParallelTasksExecutor
- java.lang.Object
-
- com.atlassian.confluence.impl.backuprestore.ParallelTasksExecutor
-
- All Implemented Interfaces:
AutoCloseable
public class ParallelTasksExecutor extends Object implements AutoCloseable
Allows to multiple tasks in parallel. Creates a queue for tasks.- Since:
- 7.20
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidinterruptAllJobs()<T> Future<T>runGlobalTaskAsync(Callable<T> task, String info)<T> Future<T>runTaskAsync(Callable<T> task, String info)intwaitUntilAllGlobalJobsComplete()voidwaitUntilAllStageJobsComplete()voidwaitUntilAllStageJobsComplete(Duration jobTimeout)
-
-
-
Method Detail
-
interruptAllJobs
public void interruptAllJobs() throws InterruptedException- Throws:
InterruptedException
-
waitUntilAllStageJobsComplete
public void waitUntilAllStageJobsComplete(@Nullable Duration jobTimeout) throws ExecutionException, InterruptedException, TimeoutException
-
waitUntilAllGlobalJobsComplete
public int waitUntilAllGlobalJobsComplete() throws ExecutionException, InterruptedException, TimeoutException
-
waitUntilAllStageJobsComplete
public void waitUntilAllStageJobsComplete() throws ExecutionException, InterruptedException, TimeoutException
-
close
public void close() throws InterruptedException- Specified by:
closein interfaceAutoCloseable- Throws:
InterruptedException
-
-