geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From upthewatersp...@apache.org
Subject incubator-geode git commit: Fixing compilation failure of LuceneService under 1.7
Date Thu, 13 Aug 2015 16:02:54 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-11 a92a47912 -> 670ce25c7


Fixing compilation failure of LuceneService under 1.7

The interface had a static method, which is not supported in 1.7. Adding
the static method to a LuceneServiceProvider class instead.


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

Branch: refs/heads/feature/GEODE-11
Commit: 670ce25c7b7a2e4965cca0ea461ee22bdac74400
Parents: a92a479
Author: Dan Smith <upthewaterspout@apache.org>
Authored: Thu Aug 13 09:01:52 2015 -0700
Committer: Dan Smith <upthewaterspout@apache.org>
Committed: Thu Aug 13 09:01:52 2015 -0700

----------------------------------------------------------------------
 .../gemfire/cache/lucene/LuceneService.java     | 13 --------
 .../cache/lucene/LuceneServiceProvider.java     | 33 ++++++++++++++++++++
 2 files changed, 33 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/670ce25c/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneService.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneService.java
b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneService.java
index 2c16d05..45bbc48 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneService.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneService.java
@@ -56,19 +56,6 @@ import com.gemstone.gemfire.internal.cache.extension.Extensible;
  */
 public interface LuceneService {
   
-  public static LuceneService get(Cache cache) {
-    synchronized(LuceneService.class) {
-      Extensible<Cache> extensible = (Extensible<Cache>) cache;
-      LuceneServiceImpl service = (LuceneServiceImpl) extensible.getExtensionPoint().getExtension(LuceneService.class);
-      if(service == null) {
-        service = new LuceneServiceImpl(cache);
-        extensible.getExtensionPoint().addExtension(LuceneService.class, service);
-      }
-      
-      return service;
-    }
-    
-  }
   /**
    * Create a lucene index using default analyzer.
    * 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/670ce25c/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneServiceProvider.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneServiceProvider.java
b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneServiceProvider.java
new file mode 100644
index 0000000..b276b48
--- /dev/null
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneServiceProvider.java
@@ -0,0 +1,33 @@
+package com.gemstone.gemfire.cache.lucene;
+
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.lucene.internal.LuceneServiceImpl;
+import com.gemstone.gemfire.internal.cache.extension.Extensible;
+
+/**
+ * Class for retrieving or creating the currently running
+ * instance of the LuceneService.
+ *
+ */
+public class LuceneServiceProvider {
+  
+  /**
+   * Retrieve or create the lucene service for this cache
+   */
+  public static LuceneService get(Cache cache) {
+    synchronized(LuceneService.class) {
+      Extensible<Cache> extensible = (Extensible<Cache>) cache;
+      LuceneServiceImpl service = (LuceneServiceImpl) extensible.getExtensionPoint().getExtension(LuceneService.class);
+      if(service == null) {
+        service = new LuceneServiceImpl(cache);
+        extensible.getExtensionPoint().addExtension(LuceneService.class, service);
+      }
+      
+      return service;
+    }
+  }
+  
+  private LuceneServiceProvider() {
+    
+  }
+}


Mime
View raw message