org.hibernate.search.jmx
Class IndexingProgressMonitor

java.lang.Object
  extended by org.hibernate.search.jmx.IndexingProgressMonitor
All Implemented Interfaces:
IndexingMonitor, 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.

Author:
Hardy Ferentschik

Field Summary
 
Fields inherited from interface org.hibernate.search.jmx.IndexingProgressMonitorMBean
INDEXING_PROGRESS_MONITOR_MBEAN_OBJECT_NAME
 
Constructor Summary
IndexingProgressMonitor()
           
 
Method Summary
 void addToTotalCount(long count)
          The total count of entities to be indexed is added here; It could be called more than once, the implementation should add them up.
 void documentsAdded(long increment)
          Notify the IndexingMonitor of the number of documents added to the index.
 void documentsBuilt(int number)
          The number of Documents built; This is invoked several times and concurrently during the indexing process.
 void entitiesLoaded(int size)
          The number of entities loaded from database; This is invoked several times and concurrently during the indexing process.
 long getDocumentsAddedCount()
           
 long getLoadedEntitiesCount()
           
 long getNumberOfEntitiesToIndex()
           
 void indexingCompleted()
          Invoked when the indexing is completed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexingProgressMonitor

public IndexingProgressMonitor()
Method Detail

documentsAdded

public final void documentsAdded(long increment)
Description copied from interface: IndexingMonitor
Notify the IndexingMonitor of the number of documents added to the index. This can be invoked several times during the indexing process, and could be invoked concurrently by different threads.

Specified by:
documentsAdded in interface IndexingMonitor
Parameters:
increment - number of documents add operations performed

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


Copyright © 2006-2013 Red Hat Middleware, LLC. All Rights Reserved