Class IndexingProgressMonitor

java.lang.Object
org.hibernate.search.jmx.IndexingProgressMonitor
All Implemented Interfaces:
MassIndexerProgressMonitor, IndexingProgressMonitorMBean

public class IndexingProgressMonitor extends Object implements IndexingProgressMonitorMBean, MassIndexerProgressMonitor
A JMX based mass indexer progress monitor. This monitor will allow you to follow mass indexing progress via JMX.
  • Constructor Details

    • IndexingProgressMonitor

      public IndexingProgressMonitor()
  • Method Details

    • documentsAdded

      public final void documentsAdded(long increment)
      Description copied from interface: MassIndexerProgressMonitor
      The number of documents sent to the backend; This is invoked several times during the indexing process.
      Specified by:
      documentsAdded in interface MassIndexerProgressMonitor
      Parameters:
      increment - number of documents sent to backend
    • documentsBuilt

      public final void documentsBuilt(int number)
      Description copied from interface: MassIndexerProgressMonitor
      The number of Documents built; This is invoked several times and concurrently during the indexing process.
      Specified by:
      documentsBuilt in interface MassIndexerProgressMonitor
      Parameters:
      number - number of Documents built
    • entitiesLoaded

      public final void entitiesLoaded(int size)
      Description copied from interface: MassIndexerProgressMonitor
      The number of entities loaded from database; This is invoked several times and concurrently during the indexing process.
      Specified by:
      entitiesLoaded in interface MassIndexerProgressMonitor
      Parameters:
      size - number of entities loaded from database
    • addToTotalCount

      public final void addToTotalCount(long count)
      Description copied from interface: MassIndexerProgressMonitor
      The total count of entities to be indexed is added here; It could be called more than once, the implementation should add them up. This is invoked several times and concurrently during the indexing process.
      Specified by:
      addToTotalCount in interface MassIndexerProgressMonitor
      Parameters:
      count - number of newly indexed entities which has to be added to total count
    • indexingCompleted

      public final void indexingCompleted()
      Description copied from interface: MassIndexerProgressMonitor
      Invoked when the indexing is completed.
      Specified by:
      indexingCompleted in interface MassIndexerProgressMonitor
    • getLoadedEntitiesCount

      public final long getLoadedEntitiesCount()
      Specified by:
      getLoadedEntitiesCount in interface IndexingProgressMonitorMBean
      Returns:
      the number of entities loaded so far
    • getDocumentsAddedCount

      public final long getDocumentsAddedCount()
      Specified by:
      getDocumentsAddedCount in interface IndexingProgressMonitorMBean
      Returns:
      the number of Lucene Documents added so far
    • getNumberOfEntitiesToIndex

      public final long getNumberOfEntitiesToIndex()
      Specified by:
      getNumberOfEntitiesToIndex in interface IndexingProgressMonitorMBean
      Returns:
      the total number of entities which need indexing