Class JobManager
java.lang.Object
net.sf.jailer.util.JobManager
Executes a job-list in a concurrent way.
- Author:
- Ralf Wisser
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecuteJobs(Collection<JobManager.Job> jobs) Executes a list of jobs.protected abstract voidCalled when a job throws an exception.voidshutdown()Shuts the manager down.
-
Constructor Details
-
JobManager
public JobManager(int threads) Constructor.- Parameters:
threads- number of threads
-
-
Method Details
-
executeJobs
Executes a list of jobs.- Parameters:
jobs- the job-list- Throws:
CancellationExceptionSQLException
-
shutdown
public void shutdown()Shuts the manager down. -
onException
Called when a job throws an exception.- Parameters:
t- the exception thrown by the job
-