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.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classParallelTasksExecutor.TaskInfo
-
Constructor Summary
Constructors Constructor Description ParallelTasksExecutor(int threadsNumber)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidinterruptAllJobs()Future<?>runTaskAsync(Callable<Void> task, String info)voidshutdown()voidwaitUntilAllJobsComplete()
-
-
-
Method Detail
-
shutdown
public void shutdown() throws InterruptedException- Throws:
InterruptedException
-
interruptAllJobs
public void interruptAllJobs()
-
waitUntilAllJobsComplete
public void waitUntilAllJobsComplete() throws ExecutionException, InterruptedException
-
close
public void close() throws InterruptedException- Specified by:
closein interfaceAutoCloseable- Throws:
InterruptedException
-
-