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 Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
static ParallelTasksExecutor
create(int threadsNumber, String threadNamePrefix)
static ParallelTasksExecutor
create(BackupRestoreJob job, int threadsNumber)
void
interruptAllJobs()
<T> Future<T>
runTaskAsync(Callable<T> task, String info)
void
waitUntilAllJobsComplete()
-
-
-
Method Detail
-
create
public static ParallelTasksExecutor create(BackupRestoreJob job, int threadsNumber)
-
create
public static ParallelTasksExecutor create(int threadsNumber, String threadNamePrefix)
-
interruptAllJobs
public void interruptAllJobs()
-
waitUntilAllJobsComplete
public void waitUntilAllJobsComplete() throws ExecutionException, InterruptedException, TimeoutException
-
close
public void close() throws InterruptedException
- Specified by:
close
in interfaceAutoCloseable
- Throws:
InterruptedException
-
-