Package org.apache.maven.index.updater
Class DefaultIndexUpdater
java.lang.Object
org.apache.maven.index.updater.DefaultIndexUpdater
- All Implemented Interfaces:
IndexUpdater
A default index updater implementation
- Author:
- Jason van Zyl, Eugene Kuleshov
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Filesystem-based ResourceFetcher implementation -
Constructor Summary
ConstructorDescriptionDefaultIndexUpdater
(IncrementalHandler incrementalHandler, List<IndexUpdateSideEffect> sideEffects) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
cleanCacheDirectory
(File dir) Cleans specified cache directory.fetchAndUpdateIndex
(IndexUpdateRequest updateRequest) protected org.slf4j.Logger
getTimestamp
(Properties properties, String key) unpackIndexData
(InputStream is, int threads, org.apache.lucene.store.Directory d, IndexingContext context) unpackIndexData
(InputStream is, IndexUpdateRequest request, org.apache.lucene.store.Directory d, IndexingContext context)
-
Constructor Details
-
DefaultIndexUpdater
@Inject public DefaultIndexUpdater(IncrementalHandler incrementalHandler, List<IndexUpdateSideEffect> sideEffects)
-
-
Method Details
-
getLogger
protected org.slf4j.Logger getLogger() -
fetchAndUpdateIndex
- Specified by:
fetchAndUpdateIndex
in interfaceIndexUpdater
- Returns:
- IndexUpdateResult
- Throws:
IOException
-
getTimestamp
-
unpackIndexData
public static IndexDataReader.IndexDataReadResult unpackIndexData(InputStream is, int threads, org.apache.lucene.store.Directory d, IndexingContext context) throws IOException - Parameters:
is
- an input stream to unpack index data fromthreads
- thread count to used
-context
-- Throws:
IOException
-
unpackIndexData
public static IndexDataReader.IndexDataReadResult unpackIndexData(InputStream is, IndexUpdateRequest request, org.apache.lucene.store.Directory d, IndexingContext context) throws IOException - Parameters:
is
- an input stream to unpack index data fromrequest
- IndexUpdateRequest for configurationd
-context
-- Throws:
IOException
-
cleanCacheDirectory
Cleans specified cache directory. If present, Locker.LOCK_FILE will not be deleted.- Throws:
IOException
-