|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sakaiproject.search.index.impl.BaseIndexStorage
org.sakaiproject.search.index.impl.ClusterFSIndexStorage
public class ClusterFSIndexStorage
Implementation of IndexStorage using a Cluster File system. This implementation performs all index write operations in a new temporary segment. On completion of the index operation it is merged with the current segment. If the current segment is larger than the threshold, a new segment is created. Managing the segments and how they relate to the cluster is delegated to the ClusterFilesystem
| Field Summary |
|---|
| Fields inherited from class org.sakaiproject.search.index.impl.BaseIndexStorage |
|---|
diagnostics |
| Constructor Summary | |
|---|---|
ClusterFSIndexStorage()
|
|
| Method Summary | |
|---|---|
boolean |
centralIndexExists()
A fast method that checks if the index exists in the cluster without opening or loading the index. |
void |
closeIndexReader(org.apache.lucene.index.IndexReader indexReader)
This will close the index reader and release any locks |
void |
closeIndexSearcher(org.apache.lucene.search.IndexSearcher indexSearcher)
|
void |
closeIndexWriter(org.apache.lucene.index.IndexWriter indexWrite)
this will close the index reader and release any locks |
void |
doPostIndexUpdate()
perform all operations necessary after an update cycle |
void |
doPreIndexUpdate()
perform all operations before an update cycle |
ClusterFilesystem |
getClusterFS()
|
org.apache.lucene.index.IndexReader |
getIndexReader()
get an Index Reader for the IndexStorage type |
protected org.apache.lucene.search.IndexSearcher |
getIndexSearcher()
|
org.apache.lucene.index.IndexWriter |
getIndexWriter(boolean create)
get an index writer, and create if asked to |
long |
getLastUpdate()
|
long |
getMaxMegeSegmentSize()
|
long |
getMaxSegmentSize()
|
List |
getSegmentInfoList()
|
long |
getSegmentThreshold()
|
org.apache.lucene.store.Directory |
getSpellDirectory()
get the spell index directory |
boolean |
indexExists()
Does the index exist |
void |
init()
|
boolean |
isMultipleIndexers()
Returns true if its ok to allow multiple indexers to run at the same time The index storage may manage its own locks. |
void |
setClusterFS(ClusterFilesystem clusterFS)
|
void |
setMaxMegeSegmentSize(long maxMegeSegmentSize)
|
void |
setMaxSegmentSize(long maxSegmentSize)
|
void |
setRecoverCorruptedIndex(boolean recover)
if set to true the IndexStorageWill automatically attempt to recover a corrupted index Not all IndexStorage implementations can do this, |
void |
setSegmentThreshold(long segmentThreshold)
|
| Methods inherited from class org.sakaiproject.search.index.impl.BaseIndexStorage |
|---|
addReloadListener, disableDiagnostics, enableDiagnostics, fireIndexReload, forceNextReload, getAnalyzer, getAnalyzerFactory, getIndexSearcher, getLastLoad, getLastLoadTime, hasDiagnostics, removeReloadListener, setAnalyzerFactory |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClusterFSIndexStorage()
| Method Detail |
|---|
public void init()
public org.apache.lucene.index.IndexReader getIndexReader()
throws IOException
IndexStorage
IOException
public org.apache.lucene.index.IndexWriter getIndexWriter(boolean create)
throws IOException
IndexStorage
IOException
protected org.apache.lucene.search.IndexSearcher getIndexSearcher()
throws IOException
getIndexSearcher in class BaseIndexStorageIOExceptionpublic boolean indexExists()
IndexStorage
public void doPreIndexUpdate()
throws IOException
IndexStorage
IOException
public void doPostIndexUpdate()
throws IOException
IndexStorage
IOExceptionpublic void setRecoverCorruptedIndex(boolean recover)
IndexStorage
public ClusterFilesystem getClusterFS()
public void setClusterFS(ClusterFilesystem clusterFS)
clusterFS - The clusterFS to set.public long getLastUpdate()
public List getSegmentInfoList()
public void closeIndexReader(org.apache.lucene.index.IndexReader indexReader)
throws IOException
IndexStorage
IOException
public void closeIndexWriter(org.apache.lucene.index.IndexWriter indexWrite)
throws IOException
IndexStorage
IOExceptionpublic boolean isMultipleIndexers()
IndexStorage
public void closeIndexSearcher(org.apache.lucene.search.IndexSearcher indexSearcher)
public long getMaxMegeSegmentSize()
public void setMaxMegeSegmentSize(long maxMegeSegmentSize)
maxMegeSegmentSize - the maxMegeSegmentSize to setpublic long getMaxSegmentSize()
public void setMaxSegmentSize(long maxSegmentSize)
maxSegmentSize - the maxSegmentSize to setpublic long getSegmentThreshold()
public void setSegmentThreshold(long segmentThreshold)
segmentThreshold - the segmentThreshold to setpublic boolean centralIndexExists()
IndexStorage
public org.apache.lucene.store.Directory getSpellDirectory()
IndexStorage
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||