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 void
close()
void
interruptAllJobs()
<T> Future<T>
runGlobalTaskAsync(Callable<T> task, String info)
<T> Future<T>
runTaskAsync(Callable<T> task, String info)
int
waitUntilAllGlobalJobsComplete()
void
waitUntilAllStageJobsComplete()
void
waitUntilAllStageJobsComplete(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:
close
in interfaceAutoCloseable
- Throws:
InterruptedException
-
-