Class ReindexManager

java.lang.Object
org.fcrepo.persistence.ocfl.impl.ReindexManager

public class ReindexManager extends Object
Class to coordinate the index rebuilding tasks.
Since:
6.0.0
Author:
whikloj
  • 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

      public void start() throws InterruptedException
      Start reindexing.
      Throws:
      InterruptedException - on an indexing error in a thread.
    • stop

      public void stop()
      Stop all threads.
    • getIds

      public List<String> getIds()
      Return a batch of OCFL ids to reindex.
      Returns:
      list of OCFL ids.
    • updateComplete

      public void updateComplete(int batchSuccessful, int batchErrors, int batchSkipped)
      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

      public int getCompletedCount()
      Returns:
      the count of items that completed successfully.
    • getErrorCount

      public int getErrorCount()
      Returns:
      the count of items that had errors.
    • getSkippedCount

      public int getSkippedCount()
      Returns:
      the count of items skipped in this run.
    • shutdown

      public void shutdown()
      Close stream.