org.hibernate.search.impl
public class SimpleIndexingProgressMonitor extends Object implements MassIndexerProgressMonitor
MassIndexerProgressMonitor which
uses the logger at INFO level to output indexing speed statistics.| Constructor and Description |
|---|
SimpleIndexingProgressMonitor()
Logs progress of indexing job every 50 documents written.
|
SimpleIndexingProgressMonitor(int logAfterNumberOfDocuments)
Logs progress of indexing job every
logAfterNumberOfDocuments
documents written. |
| Modifier and Type | Method and Description |
|---|---|
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.
|
protected int |
getStatusMessagePeriod() |
void |
indexingCompleted()
Invoked when the indexing is completed.
|
protected void |
printStatusMessage(long startTime,
long totalTodoCount,
long doneCount) |
public SimpleIndexingProgressMonitor()
public SimpleIndexingProgressMonitor(int logAfterNumberOfDocuments)
logAfterNumberOfDocuments
documents written.logAfterNumberOfDocuments - log each time the specified number of documents has been addedpublic void entitiesLoaded(int size)
MassIndexerProgressMonitorentitiesLoaded in interface MassIndexerProgressMonitorsize - number of entities loaded from databasepublic void documentsAdded(long increment)
IndexingMonitordocumentsAdded in interface IndexingMonitorincrement - number of documents add operations performedpublic void documentsBuilt(int number)
MassIndexerProgressMonitordocumentsBuilt in interface MassIndexerProgressMonitornumber - number of Documents builtpublic void addToTotalCount(long count)
MassIndexerProgressMonitoraddToTotalCount in interface MassIndexerProgressMonitorcount - number of newly indexed entities which has to
be added to total countpublic void indexingCompleted()
MassIndexerProgressMonitorindexingCompleted in interface MassIndexerProgressMonitorprotected int getStatusMessagePeriod()
protected void printStatusMessage(long startTime,
long totalTodoCount,
long doneCount)
Copyright © 2006-2015 Red Hat, Inc. All Rights Reserved