incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [1/2] git commit: Code refactoring.
Date Tue, 19 Jan 2016 19:16:31 GMT
Repository: incubator-blur
Updated Branches:
  refs/heads/master 1f2e98416 -> d9fd6953e


Code refactoring.


Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/f60c19c2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/f60c19c2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/f60c19c2

Branch: refs/heads/master
Commit: f60c19c25062268aedeaf0beae043fad692a439b
Parents: 1f2e984
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Tue Jan 19 14:15:15 2016 -0500
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Tue Jan 19 14:15:15 2016 -0500

----------------------------------------------------------------------
 .../main/java/org/apache/blur/manager/writer/BlurIndex.java | 9 ++++++---
 .../org/apache/blur/manager/writer/BlurIndexReadOnly.java   | 2 +-
 .../apache/blur/manager/writer/BlurIndexSimpleWriter.java   | 7 -------
 3 files changed, 7 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/f60c19c2/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndex.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndex.java b/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndex.java
index d23d2ae..ea6daa7 100644
--- a/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndex.java
+++ b/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndex.java
@@ -32,21 +32,24 @@ import org.apache.lucene.search.TopDocs;
 public abstract class BlurIndex {
 
   protected final BlurIndexConfig _blurIndexConf;
+  protected final AtomicBoolean _isClosed = new AtomicBoolean();
 
   public BlurIndex(BlurIndexConfig blurIndexConf) throws IOException {
     _blurIndexConf = blurIndexConf;
   }
 
-  public BlurIndexConfig getBlurIndexConf() {
+  public BlurIndexConfig getBlurIndexConfig() {
     return _blurIndexConf;
   }
 
+  public AtomicBoolean isClosed() {
+    return _isClosed;
+  }
+
   public abstract IndexSearcherCloseable getIndexSearcher() throws IOException;
 
   public abstract void close() throws IOException;
 
-  public abstract AtomicBoolean isClosed();
-
   public abstract void optimize(int numberOfSegmentsPerShard) throws IOException;
 
   public abstract void createSnapshot(String name) throws IOException;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/f60c19c2/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexReadOnly.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexReadOnly.java
b/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexReadOnly.java
index cdd0102..7431399 100644
--- a/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexReadOnly.java
+++ b/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexReadOnly.java
@@ -28,7 +28,7 @@ public class BlurIndexReadOnly extends BlurIndex {
   private final BlurIndex _blurIndex;
 
   public BlurIndexReadOnly(BlurIndex blurIndex) throws IOException {
-    super(blurIndex.getBlurIndexConf());
+    super(blurIndex.getBlurIndexConfig());
     _blurIndex = blurIndex;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/f60c19c2/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexSimpleWriter.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexSimpleWriter.java
b/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexSimpleWriter.java
index 3dab20f..e21a952 100644
--- a/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexSimpleWriter.java
+++ b/blur-core/src/main/java/org/apache/blur/manager/writer/BlurIndexSimpleWriter.java
@@ -42,7 +42,6 @@ import java.util.concurrent.BlockingQueue;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.concurrent.atomic.AtomicReference;
@@ -115,7 +114,6 @@ public class BlurIndexSimpleWriter extends BlurIndex {
 
   private static final Log LOG = LogFactory.getLog(BlurIndexSimpleWriter.class);
 
-  private final AtomicBoolean _isClosed = new AtomicBoolean();
   private final BlurIndexCloser _indexCloser;
   private final AtomicReference<DirectoryReader> _indexReader = new AtomicReference<DirectoryReader>();
   private final ExecutorService _searchThreadPool;
@@ -429,11 +427,6 @@ public class BlurIndexSimpleWriter extends BlurIndex {
     };
   }
 
-  @Override
-  public AtomicBoolean isClosed() {
-    return _isClosed;
-  }
-
   private void closeWriter() {
     if (_lastWrite.get() + _maxWriterIdle < System.currentTimeMillis()) {
       synchronized (_writer) {


Mime
View raw message