|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.confluence.content.render.xhtml.migration.WorkSourceBatchRunner<T>
T
- the type of item that will be in the batchespublic class WorkSourceBatchRunner<T>
This class is typically the basis for upgrade or migration tasks that need to manipulate a large amount of content.
It will use a parameterised number of worker threads to operate on batches of content as specified by a supplied
BatchableWorkSource
.
Each batch of work will occur within its own transaction.
Constructor Summary | |
---|---|
protected |
WorkSourceBatchRunner(org.springframework.transaction.PlatformTransactionManager transactionManager,
ExecutorService executor)
Constructor with injectable executor, exposed for unit tests |
|
WorkSourceBatchRunner(String threadName,
int numThreads,
org.springframework.transaction.PlatformTransactionManager transactionManager)
|
Method Summary | |
---|---|
List<Exception> |
run(BatchableWorkSource<T> workSource,
BatchTask<T> task)
Begin executing against all the work in the supplied work source. |
void |
setProgressWrapper(com.atlassian.core.util.ProgressMeter progress)
|
void |
shutdown()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WorkSourceBatchRunner(String threadName, int numThreads, org.springframework.transaction.PlatformTransactionManager transactionManager)
protected WorkSourceBatchRunner(org.springframework.transaction.PlatformTransactionManager transactionManager, ExecutorService executor)
Method Detail |
---|
public List<Exception> run(BatchableWorkSource<T> workSource, BatchTask<T> task) throws ExecutionException, InterruptedException
workSource
- task
- the task to be run on each item in the batches from the work source
ExecutionException
InterruptedException
Exception
- if there is any problem out with the actual execution of the the BatchTasks. (Problems within the
BatchTask are returned in the List of Exceptions.)public void shutdown()
public void setProgressWrapper(com.atlassian.core.util.ProgressMeter progress)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |