|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.pangaea.metadataportal.config.IndexConfig
public abstract class IndexConfig
Abstract configuration of an panFMP index. It not only configures its properties like name/id, it also contains methods to get some index access objects (IndexReader, Searcher) and status information.
| Field Summary | |
|---|---|
protected boolean |
checked
|
String |
displayName
|
String |
id
|
protected AutoCloseIndexReader |
indexReader
|
protected WeakReference<AutoCloseIndexReader> |
oldReaderRef
|
Config |
parent
|
| Constructor Summary | |
|---|---|
IndexConfig(Config parent)
Default constructor |
|
| Method Summary | |
|---|---|
void |
check()
Checks, if configuration is ok. |
protected void |
finalize()
|
abstract org.apache.lucene.index.IndexReader |
getSharedIndexReader()
returns a shared, read-only IndexReader. |
abstract boolean |
isIndexAvailable()
checks, if index is available (a segment file is available) |
boolean |
isSharedIndexCurrent()
checks, if shared IndexReader is current and the underlying disk store was not changed |
abstract org.apache.lucene.index.IndexReader |
newIndexReader(boolean readOnly)
returns a new IndexReader, optionally read-only. |
org.apache.lucene.search.Searcher |
newSearcher()
returns a Searcher on the shared IndexReader, should be closed after using. |
void |
releaseOldSharedReader()
called by LuceneCache to release the old reader, if not done automatically by GC. |
abstract void |
reopenSharedIndex()
reopens the shared index reader. |
protected void |
replaceSharedIndexReader(AutoCloseIndexReader indexReader)
this saves the old indexReader instance in a weak reference and replaces by new (reopened) one |
void |
setDisplayName(String v)
Sets the user-readable name of this index configuration. |
void |
setId(String v)
Sets the ID of this index configuration. |
abstract void |
warmSharedIndexReader()
called by SearchService to warm the shared index reader during webapp initialization |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected volatile AutoCloseIndexReader indexReader
protected volatile WeakReference<AutoCloseIndexReader> oldReaderRef
protected boolean checked
public String displayName
public String id
public final Config parent
| Constructor Detail |
|---|
public IndexConfig(Config parent)
| Method Detail |
|---|
public void setId(String v)
public void setDisplayName(String v)
public void check()
throws Exception
Exception
public org.apache.lucene.search.Searcher newSearcher()
throws IOException
IOException
public boolean isSharedIndexCurrent()
throws IOException
IOException
public abstract org.apache.lucene.index.IndexReader getSharedIndexReader()
throws IOException
IndexReader.close().
IOException
public abstract org.apache.lucene.index.IndexReader newIndexReader(boolean readOnly)
throws IOException
IOException
public abstract boolean isIndexAvailable()
throws IOException
IOException
public abstract void reopenSharedIndex()
throws IOException
IOException
public abstract void warmSharedIndexReader()
throws IOException
IOException
public void releaseOldSharedReader()
throws IOException
LuceneCache to release the old reader, if not done automatically by GC.
IOException
protected void replaceSharedIndexReader(AutoCloseIndexReader indexReader)
throws IOException
IOException
protected void finalize()
throws Throwable
finalize in class ObjectThrowable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||