Package org.fcrepo.persistence.ocfl.impl
Class ReindexManager
java.lang.Object
org.fcrepo.persistence.ocfl.impl.ReindexManager
Class to coordinate the index rebuilding tasks.
- Since:
- 6.0.0
- Author:
- whikloj
-
Constructor Summary
ConstructorsConstructorDescriptionReindexManager(Stream<String> ids, ReindexService reindexService, org.fcrepo.config.OcflPropsConfig config, org.fcrepo.kernel.api.TransactionManager manager, org.fcrepo.common.db.DbTransactionExecutor dbTransactionExecutor) Basic constructor -
Method Summary
Modifier and TypeMethodDescriptionintintgetIds()Return a batch of OCFL ids to reindex.intvoidshutdown()Close stream.voidstart()Start reindexing.voidstop()Stop all threads.voidupdateComplete(int batchSuccessful, int batchErrors, int batchSkipped) Update the master list of reindexing states.
-
Constructor Details
-
ReindexManager
public ReindexManager(Stream<String> ids, ReindexService reindexService, org.fcrepo.config.OcflPropsConfig config, org.fcrepo.kernel.api.TransactionManager manager, org.fcrepo.common.db.DbTransactionExecutor dbTransactionExecutor) Basic constructor- Parameters:
ids- stream of ocfl ids.reindexService- the reindexing service.config- OCFL property config object.manager- the transaction manager object.dbTransactionExecutor- manages db transactions
-
-
Method Details
-
start
Start reindexing.- Throws:
InterruptedException- on an indexing error in a thread.
-
stop
Stop all threads. -
getIds
Return a batch of OCFL ids to reindex.- Returns:
- list of OCFL ids.
-
updateComplete
Update the master list of reindexing states.- Parameters:
batchSuccessful- how many items were completed successfully in the last batch.batchErrors- how many items had an error in the last batch.batchSkipped- how many items were skipped in the last batch.
-
getCompletedCount
- Returns:
- the count of items that completed successfully.
-
getErrorCount
- Returns:
- the count of items that had errors.
-
getSkippedCount
- Returns:
- the count of items skipped in this run.
-
shutdown
Close stream.
-