Package org.appng.search.indexer
Class FileSystemProvider
- java.lang.Object
-
- org.appng.search.indexer.FileSystemProvider
-
- All Implemented Interfaces:
DocumentProvider
public class FileSystemProvider extends Object implements DocumentProvider
-
-
Constructor Summary
Constructors Constructor Description FileSystemProvider(IndexConfig config, List<String> extensions, long timeout, String jspExtension, File dataDir, Collection<? extends File> protectedFolders)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterable<DocumentProducer>
getDocumentProducers(Site site, Application application)
Returns someDocumentProducer
s to take into account when building theSite
's global lucene index.Iterable<DocumentProducer>
indexDirectory(int documentQueueSize)
Performs the actual indexing.
-
-
-
Constructor Detail
-
FileSystemProvider
public FileSystemProvider(IndexConfig config, List<String> extensions, long timeout, String jspExtension, File dataDir, Collection<? extends File> protectedFolders)
-
-
Method Detail
-
getDocumentProducers
public Iterable<DocumentProducer> getDocumentProducers(Site site, Application application) throws InterruptedException, TimeoutException
Description copied from interface:DocumentProvider
Returns someDocumentProducer
s to take into account when building theSite
's global lucene index.- Specified by:
getDocumentProducers
in interfaceDocumentProvider
- Parameters:
site
- the currentSite
application
- the currentApplication
- Returns:
- some
DocumentProducer
s - Throws:
InterruptedException
TimeoutException
-
indexDirectory
public Iterable<DocumentProducer> indexDirectory(int documentQueueSize) throws InterruptedException, TimeoutException
Performs the actual indexing.- Parameters:
documentQueueSize
- the initial queue size for eachDocumentProducer
- Returns:
- an
Iterable
ofDocumentProducer
s - Throws:
InterruptedException
- if such an exception occurs while adding aDocumentEvent
to the indexerTimeoutException
- if such an exception occurs while adding aDocumentEvent
to the indexer
-
-