|
SPT Object Database API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
com.sptci.prevayler.IndexCloser
class IndexCloser
A thread used to close an IndexReader and
its associated IndexSearcher after all
references to the index reader have been cleared.
© Copyright 2008 Sans Pareil Technologies, Inc.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
Thread.State, Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
private org.apache.lucene.index.IndexReader |
reader
The index reader that is to be closed. |
private org.apache.lucene.search.IndexSearcher |
searcher
The index search to be closed after the reader is closed. |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
IndexCloser(org.apache.lucene.index.IndexReader reader,
org.apache.lucene.search.IndexSearcher searcher)
Create a new index closer to close the specified reader and searchers. |
|
| Method Summary | |
|---|---|
private void |
checkClosed()
Loop through until the reader has been closed. |
private void |
closeReader()
Close the reader instance. |
private void |
closeSearcher()
Close the searcher instance. |
void |
run()
Close the index reader and then sleep until the reader has really been closed. |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private final org.apache.lucene.index.IndexReader reader
private final org.apache.lucene.search.IndexSearcher searcher
| Constructor Detail |
|---|
IndexCloser(org.apache.lucene.index.IndexReader reader,
org.apache.lucene.search.IndexSearcher searcher)
reader - The reader instance to close.searcher - The searcher instance to close.| Method Detail |
|---|
public void run()
run in interface Runnablerun in class ThreadcloseReader(),
checkClosed()private void closeReader()
reader instance.
private void checkClosed()
reader has been closed.
private void closeSearcher()
searcher instance.
|
SPT Object Database API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||