jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r601371 - in /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene: CachingMultiIndexReader.java CachingMultiReader.java MultiIndex.java SearchIndex.java
Date Wed, 05 Dec 2007 15:46:59 GMT
Author: mreutegg
Date: Wed Dec  5 07:46:58 2007
New Revision: 601371

URL: http://svn.apache.org/viewvc?rev=601371&view=rev
Log:
JCR-1234: CachingMultiReader has inconsistent name

Added:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/CachingMultiIndexReader.java
      - copied, changed from r601342, jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/CachingMultiReader.java
Removed:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/CachingMultiReader.java
Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/MultiIndex.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SearchIndex.java

Copied: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/CachingMultiIndexReader.java
(from r601342, jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/CachingMultiReader.java)
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/CachingMultiIndexReader.java?p2=jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/CachingMultiIndexReader.java&p1=jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/CachingMultiReader.java&r1=601342&r2=601371&rev=601371&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/CachingMultiReader.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/CachingMultiIndexReader.java
Wed Dec  5 07:46:58 2007
@@ -31,7 +31,7 @@
  * Extends a <code>MultiReader</code> with support for cached <code>TermDocs</code>
  * on {@link FieldNames#UUID} field.
  */
-public final class CachingMultiReader
+public final class CachingMultiIndexReader
         extends MultiReader
         implements HierarchyResolver, MultiIndexReader {
 
@@ -67,13 +67,13 @@
     private int refCount = 1;
 
     /**
-     * Creates a new <code>CachingMultiReader</code> based on sub readers.
+     * Creates a new <code>CachingMultiIndexReader</code> based on sub readers.
      *
      * @param subReaders the sub readers.
      * @param cache the document number cache.
      * @throws IOException if an error occurs while reading from the indexes.
      */
-    public CachingMultiReader(ReadOnlyIndexReader[] subReaders,
+    public CachingMultiIndexReader(ReadOnlyIndexReader[] subReaders,
                               DocNumberCache cache)
             throws IOException {
         super(subReaders);

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/MultiIndex.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/MultiIndex.java?rev=601371&r1=601370&r2=601371&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/MultiIndex.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/MultiIndex.java
Wed Dec  5 07:46:58 2007
@@ -136,7 +136,7 @@
      * If not <code>null</code> points to a valid <code>IndexReader</code>
that
      * reads from all indexes, including volatile and persistent indexes.
      */
-    private CachingMultiReader multiReader;
+    private CachingMultiIndexReader multiReader;
 
     /**
      * Shared document number cache across all persistent indexes.
@@ -689,7 +689,7 @@
      * @return an <code>IndexReader</code>.
      * @throws IOException if an error occurs constructing the <code>IndexReader</code>.
      */
-    public CachingMultiReader getIndexReader() throws IOException {
+    public CachingMultiIndexReader getIndexReader() throws IOException {
         synchronized (updateMonitor) {
             if (multiReader != null) {
                 multiReader.incrementRefCount();
@@ -717,7 +717,7 @@
                 readerList.add(volatileIndex.getReadOnlyIndexReader());
                 ReadOnlyIndexReader[] readers =
                         (ReadOnlyIndexReader[]) readerList.toArray(new ReadOnlyIndexReader[readerList.size()]);
-                multiReader = new CachingMultiReader(readers, cache);
+                multiReader = new CachingMultiIndexReader(readers, cache);
             }
             multiReader.incrementRefCount();
             return multiReader;

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SearchIndex.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SearchIndex.java?rev=601371&r1=601370&r2=601371&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SearchIndex.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SearchIndex.java
Wed Dec  5 07:46:58 2007
@@ -770,14 +770,14 @@
     protected IndexReader getIndexReader(boolean includeSystemIndex)
             throws IOException {
         QueryHandler parentHandler = getContext().getParentHandler();
-        CachingMultiReader parentReader = null;
+        CachingMultiIndexReader parentReader = null;
         if (parentHandler instanceof SearchIndex && includeSystemIndex) {
             parentReader = ((SearchIndex) parentHandler).index.getIndexReader();
         }
 
-        CachingMultiReader reader = index.getIndexReader();
+        CachingMultiIndexReader reader = index.getIndexReader();
         if (parentReader != null) {
-            CachingMultiReader[] readers = {reader, parentReader};
+            CachingMultiIndexReader[] readers = {reader, parentReader};
             return new CombinedIndexReader(readers);
         } else {
             return reader;
@@ -1094,7 +1094,7 @@
     //----------------------------< internal >----------------------------------
 
     /**
-     * Combines multiple {@link CachingMultiReader} into a <code>MultiReader</code>
+     * Combines multiple {@link CachingMultiIndexReader} into a <code>MultiReader</code>
      * with {@link HierarchyResolver} support.
      */
     protected static final class CombinedIndexReader
@@ -1104,14 +1104,14 @@
         /**
          * The sub readers.
          */
-        final private CachingMultiReader[] subReaders;
+        final private CachingMultiIndexReader[] subReaders;
 
         /**
          * Doc number starts for each sub reader
          */
         private int[] starts;
 
-        public CombinedIndexReader(CachingMultiReader[] indexReaders) throws IOException
{
+        public CombinedIndexReader(CachingMultiIndexReader[] indexReaders) throws IOException
{
             super(indexReaders);
             this.subReaders = indexReaders;
             this.starts = new int[subReaders.length + 1];
@@ -1196,7 +1196,7 @@
          */
         public ForeignSegmentDocId createDocId(UUID uuid) throws IOException {
             for (int i = 0; i < subReaders.length; i++) {
-                CachingMultiReader subReader = subReaders[i];
+                CachingMultiIndexReader subReader = subReaders[i];
                 ForeignSegmentDocId doc = subReader.createDocId(uuid);
                 if (doc != null) {
                     return doc;
@@ -1210,7 +1210,7 @@
          */
         public int getDocumentNumber(ForeignSegmentDocId docId) {
             for (int i = 0; i < subReaders.length; i++) {
-                CachingMultiReader subReader = subReaders[i];
+                CachingMultiIndexReader subReader = subReaders[i];
                 int realDoc = subReader.getDocumentNumber(docId);
                 if (realDoc >= 0) {
                     return realDoc;



Mime
View raw message