public class IndexListener extends Object implements FileProcessor.ErrorHandler
Constructor and Description |
---|
IndexListener() |
Modifier and Type | Method and Description |
---|---|
void |
charsDone(long charsDone)
Some number of characters has been processed.
|
void |
closeEnd()
The close process ended
|
void |
closeStart()
The close process started
|
void |
documentDone(String name)
A document was processed.
|
void |
documentStarted(String name)
We started processing a document
Synchronized to allow parallel indexing.
|
boolean |
errorOccurred(Throwable e,
String path,
File f)
Report an error and decide whether to continue or not.
|
void |
fileDone(String name) |
void |
fileStarted(String name)
Started processing a file.
|
long |
getCharsProcessed()
Get the number of characters processed so far.
|
long |
getCloseTime() |
long |
getDocsDone()
Get the number of documents processed so far.
|
int |
getErrors() |
long |
getFilesProcessed()
Get the number of files processed so far.
|
long |
getIndexStartTime() |
long |
getIndexTime() |
long |
getOptimizeTime() |
long |
getTokensProcessed()
Get the number of characters processed so far.
|
long |
getTotalTime() |
void |
indexEnd()
The indexing process ended
|
void |
indexerClosed() |
void |
indexerCreated(Indexer indexer) |
void |
indexStart()
The indexing process started
|
void |
luceneDocumentAdded() |
void |
rollbackEnd()
Changes have been rolled back (called after an error).
|
void |
rollbackStart()
Changes will be rolled back (called after an error).
|
void |
tokensDone(int n) |
void |
warning(String string) |
public long getIndexStartTime()
public void fileStarted(String name)
name
- name of the filepublic void fileDone(String name)
public void charsDone(long charsDone)
charsDone
- the number of characters processed since the last callpublic void documentStarted(String name)
name
- name of the documentpublic void documentDone(String name)
name
- name of the documentpublic long getFilesProcessed()
public long getCharsProcessed()
public long getTokensProcessed()
public long getDocsDone()
public void indexStart()
public void indexEnd()
public void closeStart()
public void closeEnd()
public long getIndexTime()
public long getOptimizeTime()
public long getCloseTime()
public void indexerCreated(Indexer indexer)
public void indexerClosed()
public long getTotalTime()
public void luceneDocumentAdded()
public void tokensDone(int n)
public boolean errorOccurred(Throwable e, String path, File f)
FileProcessor.ErrorHandler
errorOccurred
in interface FileProcessor.ErrorHandler
e
- the exceptionpath
- path to the file that the error occurred in. This includes
pathing in archives if the file is inside an archive.f
- (optional, if known) the file from which the InputStream was built,
or - if the InputStream is a file within an archive - the archive.public int getErrors()
public void rollbackStart()
public void rollbackEnd()
public void warning(String string)
Copyright © 2020 Instituut voor Nederlandse Taal (INT). All rights reserved.