Package org.fcrepo.persistence.ocfl.impl
Class ReindexWorker
- java.lang.Object
-
- org.fcrepo.persistence.ocfl.impl.ReindexWorker
-
- All Implemented Interfaces:
Runnable
public class ReindexWorker extends Object implements Runnable
A reindexing worker thread.- Author:
- whikloj
-
-
Constructor Summary
Constructors Constructor Description ReindexWorker(String name, ReindexManager reindexManager, ReindexService reindexService, TransactionManager transactionManager, DbTransactionExecutor dbTransactionExecutor, boolean failOnError)
Basic Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
join()
Join the thread.void
run()
void
start()
Start the thread with this Runnablevoid
stopThread()
Stop this thread from running once it has completed its current batch.
-
-
-
Constructor Detail
-
ReindexWorker
public ReindexWorker(String name, ReindexManager reindexManager, ReindexService reindexService, TransactionManager transactionManager, DbTransactionExecutor dbTransactionExecutor, boolean failOnError)
Basic Constructor- Parameters:
name
- the name of the worker -- used in loggingreindexManager
- the manager service.reindexService
- the reindexing service.transactionManager
- a transaction manager to generatedbTransactionExecutor
- manages db transactionsfailOnError
- whether the thread should fail on an error or log and continue.
-
-
Method Detail
-
join
public void join() throws InterruptedException
Join the thread.- Throws:
InterruptedException
- if the current thread is interrupted.
-
start
public void start()
Start the thread with this Runnable
-
stopThread
public void stopThread()
Stop this thread from running once it has completed its current batch.
-
-