lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r1494335 - in /lucene/dev/branches/branch_4x: ./ solr/ solr/core/ solr/core/src/java/org/apache/solr/update/UpdateHandler.java
Date Tue, 18 Jun 2013 22:02:36 GMT
Author: markrmiller
Date: Tue Jun 18 22:02:35 2013
New Revision: 1494335

URL: http://svn.apache.org/r1494335
Log:
make ulog final and clean up a bit

Modified:
    lucene/dev/branches/branch_4x/   (props changed)
    lucene/dev/branches/branch_4x/solr/   (props changed)
    lucene/dev/branches/branch_4x/solr/core/   (props changed)
    lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/update/UpdateHandler.java

Modified: lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/update/UpdateHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/update/UpdateHandler.java?rev=1494335&r1=1494334&r2=1494335&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/update/UpdateHandler.java
(original)
+++ lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/update/UpdateHandler.java
Tue Jun 18 22:02:35 2013
@@ -52,7 +52,7 @@ public abstract class UpdateHandler impl
   protected Vector<SolrEventListener> softCommitCallbacks = new Vector<SolrEventListener>();
   protected Vector<SolrEventListener> optimizeCallbacks = new Vector<SolrEventListener>();
 
-  protected UpdateLog ulog;
+  protected final UpdateLog ulog;
 
   private void parseEventListeners() {
     final Class<SolrEventListener> clazz = SolrEventListener.class;
@@ -71,18 +71,6 @@ public abstract class UpdateHandler impl
     }
   }
 
-
-  private void initLog(PluginInfo ulogPluginInfo, UpdateLog existingUpdateLog) {
-    ulog = existingUpdateLog;
-    if (ulog == null && ulogPluginInfo != null && ulogPluginInfo.isEnabled())
{
-      ulog = new UpdateLog();
-      ulog.init(ulogPluginInfo);
-      // ulog = core.createInitInstance(ulogPluginInfo, UpdateLog.class, "update log", "solr.NullUpdateLog");
-      ulog.init(this, core);
-    }
-    // ulog.init() when reusing an existing log is deferred (currently at the end of the
DUH2 constructor
-  }
-
   // not thread safe - for startup
   private void clearLog(PluginInfo ulogPluginInfo) {
     if (ulogPluginInfo == null) return;
@@ -132,7 +120,16 @@ public abstract class UpdateHandler impl
     if (!core.isReloaded() && !core.getDirectoryFactory().isPersistent()) {
       clearLog(ulogPluginInfo);
     }
-    initLog(ulogPluginInfo, updateLog);
+
+    if (updateLog == null && ulogPluginInfo != null && ulogPluginInfo.isEnabled())
{
+      ulog = new UpdateLog();
+      ulog.init(ulogPluginInfo);
+      // ulog = core.createInitInstance(ulogPluginInfo, UpdateLog.class, "update log", "solr.NullUpdateLog");
+      ulog.init(this, core);
+    } else {
+      ulog = updateLog;
+    }
+    // ulog.init() when reusing an existing log is deferred (currently at the end of the
DUH2 constructor
   }
 
   /**



Mime
View raw message