jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1163666 - /jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/Indexer.java
Date Wed, 31 Aug 2011 15:33:44 GMT
Author: thomasm
Date: Wed Aug 31 15:33:43 2011
New Revision: 1163666

URL: http://svn.apache.org/viewvc?rev=1163666&view=rev
Log:
Index mechanism (WIP)

Modified:
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/Indexer.java

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/Indexer.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/Indexer.java?rev=1163666&r1=1163665&r2=1163666&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/Indexer.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/Indexer.java
Wed Aug 31 15:33:43 2011
@@ -33,6 +33,8 @@ import java.util.Iterator;
  */
 public class Indexer {
 
+    private static final boolean DISABLED = Boolean.parseBoolean("mk.indexDisabled");
+
     private MicroKernel mk;
     private String revision;
     private String indexRootNode;
@@ -159,7 +161,13 @@ public class Indexer {
         }
     }
 
-    void updateUntil(String toRevision) {
+    synchronized void updateUntil(String toRevision) {
+        if (DISABLED) {
+            return;
+        }
+        if (toRevision.equals(readRevision)) {
+            return;
+        }
         String journal = mk.getJournal(readRevision, toRevision);
         JsopTokenizer t = new JsopTokenizer(journal);
         String lastRevision = readRevision;



Mime
View raw message