org.alfresco.repo.search.impl.lucene.index
Class ReferenceCountingReadOnlyIndexReaderFactory.ReferenceCountingReadOnlyIndexReader

java.lang.Object
  extended by org.apache.lucene.index.IndexReader
      extended by org.apache.lucene.index.FilterIndexReader
          extended by org.alfresco.repo.search.impl.lucene.index.ReferenceCountingReadOnlyIndexReaderFactory.ReferenceCountingReadOnlyIndexReader
All Implemented Interfaces:
org.alfresco.repo.search.impl.lucene.index.CachingIndexReader, ReferenceCounting
Enclosing class:
ReferenceCountingReadOnlyIndexReaderFactory

public static class ReferenceCountingReadOnlyIndexReaderFactory.ReferenceCountingReadOnlyIndexReader
extends org.apache.lucene.index.FilterIndexReader
implements ReferenceCounting, org.alfresco.repo.search.impl.lucene.index.CachingIndexReader


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.lucene.index.FilterIndexReader
org.apache.lucene.index.FilterIndexReader.FilterTermDocs, org.apache.lucene.index.FilterIndexReader.FilterTermEnum, org.apache.lucene.index.FilterIndexReader.FilterTermPositions
 
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.FilterIndexReader
in
 
Fields inherited from class org.apache.lucene.index.IndexReader
hasChanges
 
Method Summary
 void decRef()
           
protected  void doClose()
          We want to avoid setting the closed flag on our wrapped stream, passing on all decrefs.
 org.apache.lucene.document.Document document(int n, org.apache.lucene.document.FieldSelector fieldSelector)
           
protected  void doDelete(int n)
           
 boolean getClosed()
           
 long getCreationTime()
           
 java.lang.String getId()
          Get the id for this reader.
 java.lang.String getId(int n)
           
 java.lang.String[] getIds(int n)
           
 boolean getInvalidForReuse()
           
 java.lang.String getIsCategory(int n)
           
 java.lang.String[] getLinkAspects(int n)
           
 org.apache.lucene.index.TermDocs getNodeDocs()
           
 java.lang.String[] getParents(int n)
           
 java.lang.String getPath(int n)
           
 java.lang.String getPathLinkId(int n)
           
 int getReferenceCount()
          Get the number of references
 java.util.List getReferences()
           
 java.lang.String getType(int n)
           
 void incRef()
           
 boolean isInvalidForReuse()
          Determine if valid for reuse
 void setInvalidForReuse()
          Mark is invalid for reuse.
 
Methods inherited from class org.apache.lucene.index.FilterIndexReader
directory, docFreq, doCommit, doSetNorm, doUndeleteAll, getFieldNames, getTermFreqVector, getTermFreqVector, getTermFreqVector, getTermFreqVectors, getVersion, hasDeletions, hasNorms, isCurrent, isDeleted, isOptimized, maxDoc, norms, norms, numDocs, termDocs, termPositions, terms, terms
 
Methods inherited from class org.apache.lucene.index.IndexReader
acquireWriteLock, close, commit, deleteDocument, deleteDocuments, document, ensureOpen, flush, getCurrentVersion, getCurrentVersion, getCurrentVersion, getIndexCommit, getTermInfosIndexDivisor, indexExists, indexExists, indexExists, isLocked, isLocked, lastModified, lastModified, lastModified, listCommits, main, numDeletedDocs, open, open, open, open, open, open, open, open, open, reopen, setNorm, setNorm, setTermInfosIndexDivisor, termDocs, termPositions, undeleteAll, unlock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCreationTime

public long getCreationTime()
Specified by:
getCreationTime in interface ReferenceCounting

getReferences

public java.util.List getReferences()
Specified by:
getReferences in interface ReferenceCounting

incRef

public void incRef()
Overrides:
incRef in class org.apache.lucene.index.IndexReader

getReferenceCount

public int getReferenceCount()
Description copied from interface: ReferenceCounting
Get the number of references

Specified by:
getReferenceCount in interface ReferenceCounting
Returns:

getInvalidForReuse

public boolean getInvalidForReuse()

getClosed

public boolean getClosed()

setInvalidForReuse

public void setInvalidForReuse()
                        throws java.io.IOException
Description copied from interface: ReferenceCounting
Mark is invalid for reuse.

Specified by:
setInvalidForReuse in interface ReferenceCounting
Throws:
java.io.IOException

decRef

public void decRef()
            throws java.io.IOException
Overrides:
decRef in class org.apache.lucene.index.IndexReader
Throws:
java.io.IOException

doClose

protected void doClose()
                throws java.io.IOException
We want to avoid setting the closed flag on our wrapped stream, passing on all decrefs.

Overrides:
doClose in class org.apache.lucene.index.FilterIndexReader
Throws:
java.io.IOException

doDelete

protected void doDelete(int n)
                 throws java.io.IOException
Overrides:
doDelete in class org.apache.lucene.index.FilterIndexReader
Throws:
java.io.IOException

document

public org.apache.lucene.document.Document document(int n,
                                                    org.apache.lucene.document.FieldSelector fieldSelector)
                                             throws java.io.IOException
Overrides:
document in class org.apache.lucene.index.FilterIndexReader
Throws:
java.io.IOException

getId

public java.lang.String getId()
Description copied from interface: ReferenceCounting
Get the id for this reader.

Specified by:
getId in interface ReferenceCounting
Returns:

isInvalidForReuse

public boolean isInvalidForReuse()
Description copied from interface: ReferenceCounting
Determine if valid for reuse

Specified by:
isInvalidForReuse in interface ReferenceCounting
Returns:

getId

public java.lang.String getId(int n)
                       throws java.io.IOException
Specified by:
getId in interface org.alfresco.repo.search.impl.lucene.index.CachingIndexReader
Throws:
java.io.IOException

getPathLinkId

public java.lang.String getPathLinkId(int n)
                               throws java.io.IOException
Specified by:
getPathLinkId in interface org.alfresco.repo.search.impl.lucene.index.CachingIndexReader
Throws:
java.io.IOException

getIds

public java.lang.String[] getIds(int n)
                          throws java.io.IOException
Specified by:
getIds in interface org.alfresco.repo.search.impl.lucene.index.CachingIndexReader
Throws:
java.io.IOException

getLinkAspects

public java.lang.String[] getLinkAspects(int n)
                                  throws java.io.IOException
Specified by:
getLinkAspects in interface org.alfresco.repo.search.impl.lucene.index.CachingIndexReader
Throws:
java.io.IOException

getParents

public java.lang.String[] getParents(int n)
                              throws java.io.IOException
Specified by:
getParents in interface org.alfresco.repo.search.impl.lucene.index.CachingIndexReader
Throws:
java.io.IOException

getPath

public java.lang.String getPath(int n)
                         throws java.io.IOException
Specified by:
getPath in interface org.alfresco.repo.search.impl.lucene.index.CachingIndexReader
Throws:
java.io.IOException

getType

public java.lang.String getType(int n)
                         throws java.io.IOException
Specified by:
getType in interface org.alfresco.repo.search.impl.lucene.index.CachingIndexReader
Throws:
java.io.IOException

getIsCategory

public java.lang.String getIsCategory(int n)
                               throws java.io.IOException
Specified by:
getIsCategory in interface org.alfresco.repo.search.impl.lucene.index.CachingIndexReader
Throws:
java.io.IOException

getNodeDocs

public org.apache.lucene.index.TermDocs getNodeDocs()
                                             throws java.io.IOException
Specified by:
getNodeDocs in interface org.alfresco.repo.search.impl.lucene.index.CachingIndexReader
Throws:
java.io.IOException


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.