Package org.hibernate.search.impl
Class SimpleIndexingProgressMonitor
java.lang.Object
org.hibernate.search.impl.SimpleIndexingProgressMonitor
- All Implemented Interfaces:
MassIndexerProgressMonitor
A very simple implementation of
MassIndexerProgressMonitor which
uses the logger at INFO level to output indexing speed statistics.-
Constructor Summary
ConstructorsConstructorDescriptionLogs progress of indexing job every 50 documents written.SimpleIndexingProgressMonitor(int loggingPeriod) Logs progress of indexing job everyloggingPerioddocuments written. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToTotalCount(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.voiddocumentsAdded(long increment) The number of documents sent to the backend; This is invoked several times during the indexing process.voiddocumentsBuilt(int number) The number of Documents built; This is invoked several times and concurrently during the indexing process.voidentitiesLoaded(int size) The number of entities loaded from database; This is invoked several times and concurrently during the indexing process.protected intvoidInvoked when the indexing is completed.protected voidprintStatusMessage(long starttime, long totalTodoCount, long doneCount)
-
Constructor Details
-
SimpleIndexingProgressMonitor
public SimpleIndexingProgressMonitor()Logs progress of indexing job every 50 documents written. -
SimpleIndexingProgressMonitor
public SimpleIndexingProgressMonitor(int loggingPeriod) Logs progress of indexing job everyloggingPerioddocuments written.- Parameters:
loggingPeriod- the logging period
-
-
Method Details
-
entitiesLoaded
public void entitiesLoaded(int size) Description copied from interface:MassIndexerProgressMonitorThe number of entities loaded from database; This is invoked several times and concurrently during the indexing process.- Specified by:
entitiesLoadedin interfaceMassIndexerProgressMonitor- Parameters:
size- number of entities loaded from database
-
documentsAdded
public void documentsAdded(long increment) Description copied from interface:MassIndexerProgressMonitorThe number of documents sent to the backend; This is invoked several times during the indexing process.- Specified by:
documentsAddedin interfaceMassIndexerProgressMonitor- Parameters:
increment- number of documents sent to backend
-
documentsBuilt
public void documentsBuilt(int number) Description copied from interface:MassIndexerProgressMonitorThe number of Documents built; This is invoked several times and concurrently during the indexing process.- Specified by:
documentsBuiltin interfaceMassIndexerProgressMonitor- Parameters:
number- number ofDocuments built
-
addToTotalCount
public void addToTotalCount(long count) Description copied from interface:MassIndexerProgressMonitorThe 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:
addToTotalCountin interfaceMassIndexerProgressMonitor- Parameters:
count- number of newly indexed entities which has to be added to total count
-
indexingCompleted
public void indexingCompleted()Description copied from interface:MassIndexerProgressMonitorInvoked when the indexing is completed.- Specified by:
indexingCompletedin interfaceMassIndexerProgressMonitor
-
getStatusMessagePeriod
protected int getStatusMessagePeriod() -
printStatusMessage
protected void printStatusMessage(long starttime, long totalTodoCount, long doneCount)
-