org.sakaiproject.search.journal.impl
Class RefCountMultiReader

java.lang.Object
  extended by org.apache.lucene.index.IndexReader
      extended by org.apache.lucene.index.MultiReader
          extended by org.sakaiproject.search.journal.impl.RefCountMultiReader
All Implemented Interfaces:
Cloneable, IndexCloser, ThreadBinder, org.sakaiproject.thread_local.api.ThreadBound

public class RefCountMultiReader
extends org.apache.lucene.index.MultiReader
implements org.sakaiproject.thread_local.api.ThreadBound, ThreadBinder, IndexCloser

Author:
ieb

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.lucene.index.IndexReader
org.apache.lucene.index.IndexReader.FieldOption
 
Field Summary
 
Fields inherited from class org.apache.lucene.index.MultiReader
subReaders
 
Fields inherited from class org.apache.lucene.index.IndexReader
hasChanges
 
Constructor Summary
RefCountMultiReader(org.apache.lucene.index.IndexReader[] indexReaders, JournaledFSIndexStorage storage)
           
 
Method Summary
 void addParent(Object searcher)
           
 void bind(org.sakaiproject.thread_local.api.ThreadLocalManager tlm)
           
 boolean canClose()
           
protected  void doClose()
           
 boolean doFinalClose()
           
 boolean forceClose()
           
 String getName()
           
static int getOpened()
           
 boolean isCurrent()
          The isCurrent method in 1.9.1 has a NPE bug, this fixes it
 void removeParent(Object searcher)
           
 void unbind()
           
 
Methods inherited from class org.apache.lucene.index.MultiReader
clone, docFreq, doCommit, doCommit, document, doDelete, doReopen, doSetNorm, doUndeleteAll, getFieldNames, getSequentialSubReaders, getTermFreqVector, getTermFreqVector, getTermFreqVector, getTermFreqVectors, getVersion, hasDeletions, hasNorms, isDeleted, isOptimized, maxDoc, norms, norms, numDocs, reopen, termDocs, termPositions, terms, terms
 
Methods inherited from class org.apache.lucene.index.IndexReader
acquireWriteLock, clone, close, commit, commit, decRef, deleteDocument, deleteDocuments, directory, document, ensureOpen, flush, flush, getCommitUserData, getCommitUserData, getCurrentVersion, getCurrentVersion, getCurrentVersion, getDeletesCacheKey, getDisableFakeNorms, getFieldCacheKey, getIndexCommit, getRefCount, getTermInfosIndexDivisor, getUniqueTermCount, incRef, indexExists, indexExists, indexExists, isLocked, isLocked, lastModified, lastModified, lastModified, listCommits, main, numDeletedDocs, open, open, open, open, open, open, open, open, open, open, open, open, open, open, reopen, reopen, setDisableFakeNorms, setNorm, setNorm, setTermInfosIndexDivisor, termDocs, termPositions, undeleteAll, unlock
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RefCountMultiReader

public RefCountMultiReader(org.apache.lucene.index.IndexReader[] indexReaders,
                           JournaledFSIndexStorage storage)
                    throws IOException
Parameters:
arg0 -
storage -
Throws:
IOException
Method Detail

doClose

protected void doClose()
                throws IOException
Overrides:
doClose in class org.apache.lucene.index.MultiReader
Throws:
IOException

doFinalClose

public boolean doFinalClose()
Specified by:
doFinalClose in interface IndexCloser

forceClose

public boolean forceClose()
Specified by:
forceClose in interface IndexCloser

isCurrent

public boolean isCurrent()
                  throws IOException
The isCurrent method in 1.9.1 has a NPE bug, this fixes it

Overrides:
isCurrent in class org.apache.lucene.index.MultiReader
Throws:
IOException
See Also:
IndexReader.isCurrent()

unbind

public void unbind()
Specified by:
unbind in interface org.sakaiproject.thread_local.api.ThreadBound

bind

public void bind(org.sakaiproject.thread_local.api.ThreadLocalManager tlm)
Specified by:
bind in interface ThreadBinder

canClose

public boolean canClose()
Specified by:
canClose in interface IndexCloser

addParent

public void addParent(Object searcher)
Specified by:
addParent in interface IndexCloser

removeParent

public void removeParent(Object searcher)
Specified by:
removeParent in interface IndexCloser

getOpened

public static int getOpened()
Returns:

getName

public String getName()
Specified by:
getName in interface IndexCloser
Returns:


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