org.apache.maven.index.updater
Class DefaultIndexUpdater
java.lang.Object
org.codehaus.plexus.logging.AbstractLogEnabled
org.apache.maven.index.updater.DefaultIndexUpdater
- All Implemented Interfaces:
- IndexUpdater, org.codehaus.plexus.logging.LogEnabled
@Component(role=IndexUpdater.class)
public class DefaultIndexUpdater
- extends org.codehaus.plexus.logging.AbstractLogEnabled
- implements IndexUpdater
A default index updater implementation
- Author:
- Jason van Zyl, Eugene Kuleshov
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultIndexUpdater
public DefaultIndexUpdater(IncrementalHandler handler,
List<IndexUpdateSideEffect> mySideeffects)
DefaultIndexUpdater
public DefaultIndexUpdater()
fetchAndUpdateIndex
public IndexUpdateResult fetchAndUpdateIndex(IndexUpdateRequest updateRequest)
throws IOException
- Specified by:
fetchAndUpdateIndex
in interface IndexUpdater
- Returns:
- IndexUpdateResult
- Throws:
IOException
unpackIndexArchive
public static Date unpackIndexArchive(InputStream is,
org.apache.lucene.store.Directory directory,
IndexingContext context)
throws IOException
- Unpack legacy index archive into a specified Lucene
Directory
- Parameters:
is
- a ZipInputStream
with index datadirectory
- Lucene Directory
to unpack index data to
- Returns:
Date
of the index update or null if it can't be read
- Throws:
IOException
getTimestamp
public Date getTimestamp(Properties properties,
String key)
unpackIndexData
public static Date unpackIndexData(InputStream is,
org.apache.lucene.store.Directory d,
IndexingContext context)
throws IOException
- Unpack index data using specified Lucene Index writer
- Parameters:
is
- an input stream to unpack index data fromw
- a writer to save index dataics
- a collection of index creators for updating unpacked documents.
- Throws:
IOException
cleanCacheDirectory
protected void cleanCacheDirectory(File dir)
throws IOException
- Cleans specified cache directory. If present, Locker.LOCK_FILE will not be deleted.
- Throws:
IOException
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.