org.eaglei.search.provider.lucene
Class LuceneSearchProviderIndexUpdater

java.lang.Object
  extended by org.eaglei.search.provider.lucene.LuceneSearchProviderIndexUpdater
All Implemented Interfaces:
java.lang.Runnable

public final class LuceneSearchProviderIndexUpdater
extends java.lang.Object
implements java.lang.Runnable

Runnable that periodically updates the Lucene index.

Author:
frost

Constructor Summary
LuceneSearchProviderIndexUpdater(org.eaglei.search.provider.SearchProvider nestedProvider, LuceneSearchProviderIndexer indexer)
          Creates an index updater
 
Method Summary
 long getUpdateFrequency()
           
 void run()
           
 void setUpdateFrequency(long updateFrequency)
          Sets the frequency for updating the lucene index from the embedded provider.
 void updateIndex()
          Dynamically builds the Lucene index from results retrieved from the nested SearchProvider
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LuceneSearchProviderIndexUpdater

public LuceneSearchProviderIndexUpdater(org.eaglei.search.provider.SearchProvider nestedProvider,
                                        LuceneSearchProviderIndexer indexer)
Creates an index updater

Parameters:
nestedProvider - Provider that is queried to populate the index.
indexer - The indexer.
Method Detail

setUpdateFrequency

public void setUpdateFrequency(long updateFrequency)
Sets the frequency for updating the lucene index from the embedded provider.

Parameters:
updateFrequency - Update frequency in msec.

getUpdateFrequency

public long getUpdateFrequency()
See Also:
setUpdateFrequency(long)

updateIndex

public void updateIndex()
                 throws java.io.IOException
Dynamically builds the Lucene index from results retrieved from the nested SearchProvider

Throws:
java.io.IOException

run

public void run()
Specified by:
run in interface java.lang.Runnable


Copyright © 2009-2010 Eagle-I. All Rights Reserved.