Class ParallelTasksExecutor
java.lang.Object
com.atlassian.confluence.impl.backuprestore.ParallelTasksExecutor
- All Implemented Interfaces:
AutoCloseable
Allows to multiple tasks in parallel. Creates a queue for tasks.
- Since:
- 7.20
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
<T> Future<T>
runGlobalTaskAsync
(Callable<T> task, String info) <T> Future<T>
runTaskAsync
(Callable<T> task, String info) int
void
void
waitUntilAllStageJobsComplete
(@Nullable Duration jobTimeout)
-
Method Details
-
runTaskAsync
-
runGlobalTaskAsync
-
interruptAllJobs
- 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
- Specified by:
close
in interfaceAutoCloseable
- Throws:
InterruptedException
-