org.sakaiproject.search.index.impl
Class BaseIndexStorage

java.lang.Object
  extended by org.sakaiproject.search.index.impl.BaseIndexStorage
All Implemented Interfaces:
Diagnosable, IndexStorage
Direct Known Subclasses:
ClusterFSIndexStorage, FSIndexStorage

public abstract class BaseIndexStorage
extends Object
implements IndexStorage

Author:
ieb

Field Summary
protected  boolean diagnostics
           
 
Constructor Summary
BaseIndexStorage()
           
 
Method Summary
 void addReloadListener(IndexReloadListener indexReloadListener)
           
 void disableDiagnostics()
           
 void enableDiagnostics()
           
protected  void fireIndexReload(long reloadStart, long reloadEnd)
           
 void forceNextReload()
           
 org.apache.lucene.analysis.Analyzer getAnalyzer()
          Get an analyzer correct for the indexer being used.
 AnalyzerFactory getAnalyzerFactory()
           
protected abstract  org.apache.lucene.search.IndexSearcher getIndexSearcher()
           
 org.apache.lucene.search.IndexSearcher getIndexSearcher(boolean reload)
          get an index searcher
 long getLastLoad()
          When the index was last loaded
 long getLastLoadTime()
          The ammount of time (ms) that it took to load the index last time
 boolean hasDiagnostics()
           
 void removeReloadListener(IndexReloadListener indexReloadListener)
           
 void setAnalyzerFactory(AnalyzerFactory analzyserFactory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.sakaiproject.search.index.IndexStorage
centralIndexExists, closeIndexReader, closeIndexSearcher, closeIndexWriter, doPostIndexUpdate, doPreIndexUpdate, getIndexReader, getIndexWriter, getLastUpdate, getSegmentInfoList, getSpellDirectory, indexExists, isMultipleIndexers, setRecoverCorruptedIndex
 

Field Detail

diagnostics

protected boolean diagnostics
Constructor Detail

BaseIndexStorage

public BaseIndexStorage()
Method Detail

getIndexSearcher

public org.apache.lucene.search.IndexSearcher getIndexSearcher(boolean reload)
                                                        throws IOException
Description copied from interface: IndexStorage
get an index searcher

Specified by:
getIndexSearcher in interface IndexStorage
Parameters:
reload - force a reload of the searcher, if the implementation is caching a searcher
Returns:
Throws:
IOException

getIndexSearcher

protected abstract org.apache.lucene.search.IndexSearcher getIndexSearcher()
                                                                    throws IOException
Returns:
Throws:
IOException

fireIndexReload

protected void fireIndexReload(long reloadStart,
                               long reloadEnd)
Parameters:
reloadStart2 -
reloadEnd2 -

getLastLoad

public long getLastLoad()
Description copied from interface: IndexStorage
When the index was last loaded

Specified by:
getLastLoad in interface IndexStorage
Returns:

getLastLoadTime

public long getLastLoadTime()
Description copied from interface: IndexStorage
The ammount of time (ms) that it took to load the index last time

Specified by:
getLastLoadTime in interface IndexStorage
Returns:

addReloadListener

public void addReloadListener(IndexReloadListener indexReloadListener)
Specified by:
addReloadListener in interface IndexStorage
See Also:
IndexStorage.addReloadListener(IndexReloadListener indexReloadListener)

removeReloadListener

public void removeReloadListener(IndexReloadListener indexReloadListener)
Specified by:
removeReloadListener in interface IndexStorage
See Also:
IndexStorage.removeReloadListener(IndexReloadListener indexReloadListener)

forceNextReload

public void forceNextReload()
Specified by:
forceNextReload in interface IndexStorage
See Also:
IndexStorage.forceNextReload()

disableDiagnostics

public void disableDiagnostics()
Specified by:
disableDiagnostics in interface Diagnosable

enableDiagnostics

public void enableDiagnostics()
Specified by:
enableDiagnostics in interface Diagnosable

hasDiagnostics

public boolean hasDiagnostics()
Specified by:
hasDiagnostics in interface Diagnosable

getAnalyzerFactory

public AnalyzerFactory getAnalyzerFactory()
Returns:
Returns the analzyserFactory.

setAnalyzerFactory

public void setAnalyzerFactory(AnalyzerFactory analzyserFactory)
Parameters:
analzyserFactory - The analzyserFactory to set.

getAnalyzer

public org.apache.lucene.analysis.Analyzer getAnalyzer()
Description copied from interface: IndexStorage
Get an analyzer correct for the indexer being used.

Specified by:
getAnalyzer in interface IndexStorage
Returns:


Copyright © 2003-2012 Sakai Project. All Rights Reserved.