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: Refactoring lucene APIs into a separate module
Date Wed, 12 Aug 2015 22:57:10 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-11 9de95d632 -> 5974ffc8e


Refactoring lucene APIs into a separate module

The gemfire-core will now no longer depend on Lucene. These APIs still
have no real implementation, and there is currently also no support for
reading and writing the XML configuration as well.

As part of these changes, I modified the ExtensionPoint code slightly to
allow retrieving an extension point by key, for use in the APIs. This
lets the LuceneService APIs add the and get the LuceneService as a cache
extension.

I'm still not sure this is the best way to integrate independent modules
like this into gemfire. This needs some more discussion.


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

Branch: refs/heads/feature/GEODE-11
Commit: 5974ffc8eaf3b4dcaa582f2ae77a38384d7d604f
Parents: 9de95d6
Author: Dan Smith <upthewaterspout@apache.org>
Authored: Wed Aug 12 15:40:29 2015 -0700
Committer: Dan Smith <upthewaterspout@apache.org>
Committed: Wed Aug 12 15:40:29 2015 -0700

----------------------------------------------------------------------
 gemfire-core/build.gradle                       |   4 -
 .../gemstone/gemfire/cache/GemFireCache.java    |   7 --
 .../gemfire/cache/lucene/LuceneIndex.java       |  50 --------
 .../gemfire/cache/lucene/LuceneQuery.java       |  37 ------
 .../cache/lucene/LuceneQueryFactory.java        | 121 -------------------
 .../cache/lucene/LuceneQueryResults.java        |  29 -----
 .../cache/lucene/LuceneResultStruct.java        |  59 ---------
 .../gemfire/cache/lucene/LuceneService.java     | 103 ----------------
 .../cache/lucene/LuceneServiceFactory.java      |  14 ---
 .../cache/lucene/LuceneServiceProvider.java     |  36 ------
 .../cache/lucene/internal/LuceneIndexImpl.java  |  54 ---------
 .../lucene/internal/LuceneQueryFactoryImpl.java |  88 --------------
 .../cache/lucene/internal/LuceneQueryImpl.java  |  62 ----------
 .../lucene/internal/LuceneQueryResultsImpl.java |  66 ----------
 .../lucene/internal/LuceneResultStructImpl.java |  45 -------
 .../internal/LuceneServiceFactoryImpl.java      |  16 ---
 .../lucene/internal/LuceneServiceImpl.java      |  90 --------------
 .../internal/cache/GemFireCacheImpl.java        |  14 ---
 .../cache/extension/ExtensionPoint.java         |  12 +-
 .../cache/extension/SimpleExtensionPoint.java   |  25 ++--
 .../internal/cache/xmlcache/CacheCreation.java  |   6 -
 .../util/concurrent/CopyOnWriteHashMap.java     |  45 ++++++-
 .../gemfire/cache30/CacheXml81DUnitTest.java    |   6 +-
 .../SimpleExtensionPointJUnitTest.java          |  20 +--
 .../mock/DestroyMockCacheExtensionFunction.java |   7 +-
 .../extension/mock/MockCacheExtension.java      |   2 +-
 .../extension/mock/MockExtensionXmlParser.java  |   4 +-
 .../extension/mock/MockRegionExtension.java     |   2 +-
 settings.gradle                                 |   1 +
 29 files changed, 87 insertions(+), 938 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5974ffc8/gemfire-core/build.gradle
----------------------------------------------------------------------
diff --git a/gemfire-core/build.gradle b/gemfire-core/build.gradle
index 1c17474..185be12 100755
--- a/gemfire-core/build.gradle
+++ b/gemfire-core/build.gradle
@@ -20,10 +20,6 @@ dependencies {
   compile 'commons-io:commons-io:2.3'
   compile 'commons-logging:commons-logging:1.1.1'
   compile 'commons-modeler:commons-modeler:2.0'
-  compile 'org.apache.lucene:lucene-analyzers-common:5.0.0'
-  compile 'org.apache.lucene:lucene-core:5.0.0'
-  compile 'org.apache.lucene:lucene-queries:5.0.0'
-  compile 'org.apache.lucene:lucene-queryparser:5.0.0'
   compile 'it.unimi.dsi:fastutil:7.0.2'
   compile 'javax.activation:activation:1.1.1'
   compile 'javax.mail:javax.mail-api:1.4.5'

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5974ffc8/gemfire-core/src/main/java/com/gemstone/gemfire/cache/GemFireCache.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/GemFireCache.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/GemFireCache.java
index d81d25d..f5ad158 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/GemFireCache.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/GemFireCache.java
@@ -20,7 +20,6 @@ import com.gemstone.gemfire.cache.client.ClientCacheFactory;
 import com.gemstone.gemfire.cache.control.ResourceManager;
 import com.gemstone.gemfire.cache.hdfs.HDFSStore;
 import com.gemstone.gemfire.cache.hdfs.HDFSStoreFactory;
-import com.gemstone.gemfire.cache.lucene.LuceneService;
 import com.gemstone.gemfire.cache.wan.GatewaySenderFactory;
 import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.pdx.PdxSerializer;
@@ -255,12 +254,6 @@ public interface GemFireCache extends RegionService {
   public Properties getInitializerProps();
 
   /**
-   * Returns the LuceneService singleton instance.
-   * @since 8.5
-   */
-  public LuceneService getLuceneService();
-	
-  /**
    * Returns the HDFSStore by name or <code>null</code> if no HDFSStore is
    * found.
    * 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5974ffc8/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneIndex.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneIndex.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneIndex.java
deleted file mode 100644
index 9b08b05..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneIndex.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*=========================================================================
- * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
- * This product is protected by U.S. and international copyright
- * and intellectual property laws. Pivotal products are covered by
- * more patents listed at http://www.pivotal.io/patents.
- *========================================================================
- */
-
-package com.gemstone.gemfire.cache.lucene;
-
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.lucene.analysis.Analyzer;
-
-
-/**
- * An lucene index is built over the data stored in a GemFire Region.
- * <p>
- * An index is specified using a index name, field names, region name.
- * <p>
- * The index name and region name together uniquely identifies the lucene index.
- * <p>
- * 
- * @author Xiaojian Zhou
- * @since 8.5
- */
-public interface LuceneIndex {
-
-  /**
-   * @return the index name of this index
-   */
-  public String getName();
-
-  /**
-   * @return the region name for this index
-   */
-  public String getRegionName();
-      
-  /**
-   * @return the indexed field names in a Set
-   */
-  public String[] getFieldNames();
-  
-  /**
-   * @return the field to analyzer map
-   */
-  public Map<String, Analyzer> getFieldAnalyzerMap();
-  
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5974ffc8/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneQuery.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneQuery.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneQuery.java
deleted file mode 100644
index 0579eef..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneQuery.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.gemstone.gemfire.cache.lucene;
-
-import java.util.Set;
-import com.gemstone.gemfire.cache.lucene.LuceneQueryFactory.ResultType;
-
-/**
- * Provides wrapper object of Lucene's Query object and execute the search. 
- * <p>Instances of this interface are created using
- * {@link LuceneQueryFactory#create}.
- * 
- */
-public interface LuceneQuery {
-  /**
-   * Execute the search and get results. 
-   */
-  public LuceneQueryResults<?> search();
-  
-  /**
-   * Get page size setting of current query. 
-   */
-  public int getPageSize();
-  
-  /**
-   * Get limit size setting of current query. 
-   */
-  public int getLimit();
-
-  /**
-   * Get result types setting of current query. 
-   */
-  public ResultType[] getResultTypes();
-  
-  /**
-   * Get projected fields setting of current query. 
-   */
-  public String[] getProjectedFieldNames();
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5974ffc8/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneQueryFactory.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneQueryFactory.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneQueryFactory.java
deleted file mode 100644
index 5636ea4..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneQueryFactory.java
+++ /dev/null
@@ -1,121 +0,0 @@
-package com.gemstone.gemfire.cache.lucene;
-
-import org.apache.lucene.analysis.Analyzer;
-import org.apache.lucene.queryparser.classic.ParseException;
-import org.apache.lucene.search.Query;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.DiskStore;
-
-/**
- * Factory for creating instances of {@link LuceneQuery}.
- * To get an instance of this factory call {@link LuceneService#createLuceneQueryFactory}.
- * <P>
- * To use this factory configure it with the <code>set</code> methods and then
- * call {@link #create} to produce a {@link LuceneQuery} instance.
- * 
- * @author Xiaojian Zhou
- * @since 8.5
- */
-public interface LuceneQueryFactory {
-  
-  /**
-   * Default query result limit is 100
-   */
-  public static final int DEFAULT_LIMIT = 100;
-  
-  /**
-   *  Default page size of result is 0, which means no pagination
-   */
-  public static final int DEFAULT_PAGESIZE = 0;
-  
-  public enum ResultType {
-    /**
-     *  Query results only contain value, which is the default setting.
-     *  If field projection is specified, use projected fields' values instead of whole domain object
-     */
-    VALUE,
-    
-    /**
-     * Query results contain score
-     */
-    SCORE,
-    
-    /**
-     * Query results contain key
-     */
-    KEY
-  };
-
-  /**
-   * Set page size for a query result. The default page size is 0 which means no pagination.
-   * If specified negative value, throw IllegalArgumentException
-   * @param pageSize
-   * @return itself
-   */
-  LuceneQueryFactory setPageSize(int pageSize);
-  
-  /**
-   * Set max limit of result for a query
-   * If specified limit is less or equal to zero, throw IllegalArgumentException
-   * @param limit
-   * @return itself
-   */
-  LuceneQueryFactory setResultLimit(int limit);
-  
-  /**
-   * set weather to include SCORE, KEY in result
-   * 
-   * @param resultTypes
-   * @return itself
-   */
-  LuceneQueryFactory setResultTypes(ResultType... resultTypes);
-  
-  /**
-   * Set a list of fields for result projection.
-   * 
-   * @param fieldNames
-   * @return itself
-   */
-  LuceneQueryFactory setProjectionFields(String... fieldNames);
-  
-  /**
-   * Create wrapper object for lucene's QueryParser object.
-   * The queryString is using lucene QueryParser's syntax. QueryParser is for easy-to-use 
-   * with human understandable syntax. 
-   *  
-   * @param regionName region name
-   * @param indexName index name
-   * @param queryString query string in lucene QueryParser's syntax
-   * @param analyzer lucene Analyzer to parse the queryString
-   * @return LuceneQuery object
-   * @throws ParseException
-   */
-  public LuceneQuery create(String indexName, String regionName, String queryString, 
-      Analyzer analyzer) throws ParseException;
-  
-  /**
-   * Create wrapper object for lucene's QueryParser object using default standard analyzer.
-   * The queryString is using lucene QueryParser's syntax. QueryParser is for easy-to-use 
-   * with human understandable syntax. 
-   *  
-   * @param regionName region name
-   * @param indexName index name
-   * @param queryString query string in lucene QueryParser's syntax
-   * @return LuceneQuery object
-   * @throws ParseException
-   */
-  public LuceneQuery create(String indexName, String regionName, String queryString) 
-      throws ParseException;
-  
-  /**
-   * Create wrapper object for lucene's Query object.
-   * Advanced lucene users can customized their own Query object and directly use in this API.  
-   * 
-   * @param regionName region name
-   * @param indexName index name
-   * @param query lucene Query object
-   * @return LuceneQuery object
-   */
-  public LuceneQuery create(String indexName, String regionName, Query query);
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5974ffc8/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneQueryResults.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneQueryResults.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneQueryResults.java
deleted file mode 100644
index d660a4b..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneQueryResults.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.gemstone.gemfire.cache.lucene;
-
-import java.util.Collection;
-import java.util.List;
-
-import com.gemstone.gemfire.cache.execute.ResultSender;
-import com.gemstone.gemfire.distributed.DistributedMember;
-
-/**
- * <p>
- * Defines the interface for a container of lucene query result collected from function
- * execution.<br>
- * 
- * @author Xiaojian Zhou
- * @since 8.5
- */
-
-public interface LuceneQueryResults<E> {
-
-  /* get next page of result if pagesize is specified in query, otherwise, return null */
-  public List<E> getNextPage();
-  
-  /* Is next page of result available */
-  public boolean hasNextPage();
-  
-  /* total number of items */
-  public int size();
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5974ffc8/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneResultStruct.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneResultStruct.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneResultStruct.java
deleted file mode 100644
index a5b16b7..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneResultStruct.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package com.gemstone.gemfire.cache.lucene;
-
-import java.util.LinkedList;
-
-/**
- * <p>
- * Abstract data structure for one item in query result.
- * 
- * @author Xiaojian Zhou
- * @since 8.5
- */
-public interface LuceneResultStruct {
-  /**
-   * Return the value associated with the given field name
-   *
-   * @param fieldName the String name of the field
-   * @return the value associated with the specified field
-   * @throws IllegalArgumentException If this struct does not have a field named fieldName
-   */
-  public Object getProjectedField(String fieldName);
-  
-  /**
-   * Return key of the entry
-   *
-   * @return key
-   * @throws IllegalArgumentException If this struct does not contain key
-   */
-  public Object getKey();
-  
-  /**
-   * Return value of the entry
-   *
-   * @return value the whole domain object
-   * @throws IllegalArgumentException If this struct does not contain value
-   */
-  public Object getValue();
-  
-  /**
-   * Return score of the query 
-   *
-   * @return score
-   * @throws IllegalArgumentException If this struct does not contain score
-   */
-  public Double getScore();
-  
-  /**
-   * Get the types of values ordered list
-   * Item in the list could be either ResultType, or field name
-   * @return the array of result types
-   */
-  public Object[] getNames();
-  
-  /**
-   * Get the values in same order as result types
-   * @return the array of values
-   */
-  public Object[] getResultValues();
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5974ffc8/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneService.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneService.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneService.java
deleted file mode 100644
index dde54bf..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneService.java
+++ /dev/null
@@ -1,103 +0,0 @@
-package com.gemstone.gemfire.cache.lucene;
-
-import java.util.Collection;
-import java.util.Map;
-
-import org.apache.lucene.analysis.Analyzer;
-import com.gemstone.gemfire.cache.GemFireCache;
-
-/**
- * LuceneService instance is a singleton for each cache. It will be created in cache 
- * constructor and get its reference via {@link GemFireCache#getLuceneService()}.
- * 
- * It provides handle for managing the {@link LuceneIndex} and create the {@link LuceneQuery}
- * via {@link LuceneQueryFactory}
- * 
- * </p>
- * Example: <br>
- * 
- * <pre>
- * At client and server JVM, initializing cache will create the LuceneServiceImpl object, 
- * which is a singleton at each JVM. 
- * 
- * At each server JVM, for data region to create index, create the index on fields with default analyzer:
- * LuceneIndex index = luceneService.createIndex(indexName, regionName, "field1", "field2", "field3"); 
- * or create index on fields with specified analyzer:
- * LuceneIndex index = luceneService.createIndex(indexName, regionName, analyzerPerField);
- * 
- * We can also create index via cache.xml or gfsh.
- * 
- * At client side, create query and run the search:
- * 
- * LuceneQuery query = luceneService.createLuceneQueryFactory().setLimit(200).setPageSize(20)
- * .setResultTypes(SCORE, VALUE, KEY).setFieldProjection("field1", "field2")
- * .create(indexName, regionName, querystring, analyzer);
- * 
- * The querystring is using lucene's queryparser syntax, such as "field1:zhou* AND field2:gzhou@pivotal.io"
- *  
- * LuceneQueryResults results = query.search();
- * 
- * If pagination is not specified:
- * List list = results.getNextPage(); // return all results in one getNextPage() call
- * or if paging is specified:
- * if (results.hasNextPage()) {
- *   List page = results.nextPage(); // return resules page by page
- * }
- * 
- * The item of the list is either the domain object or instance of {@link LuceneResultStruct}
- * </pre>
- * 
- * @author Xiaojian Zhou
- *
- */
-public interface LuceneService {
-
-  /**
-   * Create a lucene index using default analyzer.
-   * 
-   * @param indexName
-   * @param regionName
-   * @param fields
-   * @return LuceneIndex object
-   */
-  public LuceneIndex createIndex(String indexName, String regionName, String... fields);
-  
-  /**
-   * Create a lucene index using specified analyzer per field
-   * 
-   * @param indexName index name
-   * @param regionName region name
-   * @param analyzerPerField analyzer per field map
-   * @return LuceneIndex object
-   *
-   */
-  public LuceneIndex createIndex(String indexName, String regionName,  
-      Map<String, Analyzer> analyzerPerField);
-
-  /**
-   * Destroy the lucene index
-   * 
-   * @param index index object
-   */
-  public void destroyIndex(LuceneIndex index);
-  
-  /**
-   * Get the lucene index object specified by region name and index name
-   * @param indexName index name
-   * @param regionName region name
-   * @return LuceneIndex object
-   */
-  public LuceneIndex getIndex(String indexName, String regionName);
-  
-  /**
-   * get all the lucene indexes.
-   * @return all index objects in a Collection
-   */
-  public Collection<LuceneIndex> getAllIndexes();
-
-  /**
-   * create LuceneQueryFactory
-   * @return LuceneQueryFactory object
-   */
-  public LuceneQueryFactory createLuceneQueryFactory();
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5974ffc8/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneServiceFactory.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneServiceFactory.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneServiceFactory.java
deleted file mode 100644
index 637f1c0..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneServiceFactory.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.gemstone.gemfire.cache.lucene;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.lucene.LuceneService;
-
-public interface LuceneServiceFactory {
-  
-  public void initialize();
-  
-  /**
-   * Create a new LuceneService for the given cache
-   */
-  public LuceneService create(Cache cache);
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5974ffc8/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneServiceProvider.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneServiceProvider.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneServiceProvider.java
deleted file mode 100644
index 27395ab..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneServiceProvider.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package com.gemstone.gemfire.cache.lucene;
-
-import java.util.Iterator;
-import java.util.ServiceLoader;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.lucene.LuceneServiceFactory;
-
-public class LuceneServiceProvider {
-  
-  private static final LuceneServiceFactory factory;
-
-  static {
-    ServiceLoader<LuceneServiceFactory> loader = ServiceLoader.load(LuceneServiceFactory.class);
-    Iterator<LuceneServiceFactory> itr = loader.iterator();
-    if(!itr.hasNext()) {
-      factory = null;
-    } else {
-      factory = itr.next();
-      factory.initialize();
-    }
-  }
-  
-  public static LuceneService create(Cache cache) {
-    
-    if(factory == null) {
-      return null;
-    }
-    
-    return factory.create(cache);
-  }
-  
-  private LuceneServiceProvider() {
-    
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5974ffc8/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexImpl.java
deleted file mode 100644
index a7bdd99..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexImpl.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package com.gemstone.gemfire.cache.lucene.internal;
-
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.lucene.analysis.Analyzer;
-
-import com.gemstone.gemfire.cache.lucene.LuceneIndex;
-
-/* wrapper of IndexWriter */
-public class LuceneIndexImpl implements LuceneIndex {
-
-  /* searchable fields should belong to a specific index
-   */
-  HashSet<String> searchableFieldNames;
-  
-  HashSet<String> searchablePDXFieldNames;
-  
-  @Override
-  public String getName() {
-    // TODO Auto-generated method stub
-    return null;
-  }
-
-  @Override
-  public String getRegionName() {
-    // TODO Auto-generated method stub
-    return null;
-  }
-
-  @Override
-  public String[] getFieldNames() {
-    // TODO Auto-generated method stub
-    return null;
-  }
-
-  public void initialize() {
-    // TODO Auto-generated method stub
-    
-  }
-
-  public void close() {
-    // TODO Auto-generated method stub
-    
-  }
-
-  @Override
-  public Map<String, Analyzer> getFieldAnalyzerMap() {
-    // TODO Auto-generated method stub
-    return null;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5974ffc8/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryFactoryImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryFactoryImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryFactoryImpl.java
deleted file mode 100644
index 3bd5b0c..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryFactoryImpl.java
+++ /dev/null
@@ -1,88 +0,0 @@
-package com.gemstone.gemfire.cache.lucene.internal;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.apache.lucene.analysis.Analyzer;
-import org.apache.lucene.analysis.standard.StandardAnalyzer;
-import org.apache.lucene.queryparser.classic.ParseException;
-import org.apache.lucene.queryparser.classic.QueryParser;
-import org.apache.lucene.search.Query;
-
-import com.gemstone.gemfire.cache.lucene.LuceneIndex;
-import com.gemstone.gemfire.cache.lucene.LuceneQuery;
-import com.gemstone.gemfire.cache.lucene.LuceneQueryFactory;
-
-public class LuceneQueryFactoryImpl implements LuceneQueryFactory {
-  private int limit_attr = DEFAULT_LIMIT;
-  private int pageSize_attr = DEFAULT_PAGESIZE;
-  private Set<ResultType> resultType_attr = new HashSet<ResultType>();
-  private Set<String> projection_fields_attr = new HashSet<String>();
-  
-  /* reference to the index. One index could have multiple Queries, but one Query must belong
-   * to one index
-   */
-  private LuceneIndex relatedIndex;
-
-  @Override
-  public LuceneQueryFactory setPageSize(int pageSize) {
-    this.pageSize_attr = pageSize;
-    return this;
-  }
-
-  @Override
-  public LuceneQueryFactory setResultLimit(int limit) {
-    this.limit_attr = limit;
-    return this;
-  }
-
-  @Override
-  public LuceneQueryFactory setResultTypes(ResultType... resultTypes) {
-    if (resultTypes != null) {
-      for (ResultType resultType:resultTypes) {
-        this.resultType_attr.add(resultType);
-      }
-    }
-    return this;
-  }
-
-  @Override
-  public LuceneQuery create(String indexName, String regionName,
-      String queryString, Analyzer analyzer) throws ParseException {
-    QueryParser parser = new QueryParser(null, analyzer);
-    Query query = parser.parse(queryString);
-    LuceneQueryImpl luceneQuery = new LuceneQueryImpl(indexName, regionName, limit_attr, pageSize_attr, 
-        resultType_attr, projection_fields_attr, query);
-    return luceneQuery;
-  }
-
-  @Override
-  public LuceneQuery create(String indexName, String regionName,
-      String queryString) throws ParseException {
-    StandardAnalyzer analyzer = new StandardAnalyzer();
-    return create(indexName, regionName, queryString, analyzer);
-  }
-  
-  @Override
-  public LuceneQuery create(String indexName, String regionName,
-      Query query) {
-    LuceneQueryImpl luceneQuery = new LuceneQueryImpl(indexName, regionName, limit_attr, pageSize_attr, 
-        resultType_attr, projection_fields_attr, query);
-    return luceneQuery;
-  }
-
-  public LuceneIndex getRelatedIndex() {
-    return this.relatedIndex;
-  }
-
-  @Override
-  public LuceneQueryFactory setProjectionFields(String... fieldNames) {
-    if (fieldNames != null) {
-      for (String fieldName:fieldNames) {
-        this.projection_fields_attr.add(fieldName);
-      }
-    }
-    return this;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5974ffc8/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryImpl.java
deleted file mode 100644
index 04025d3..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryImpl.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package com.gemstone.gemfire.cache.lucene.internal;
-
-import java.util.Set;
-
-import org.apache.lucene.search.Query;
-
-import com.gemstone.gemfire.cache.lucene.LuceneQuery;
-import com.gemstone.gemfire.cache.lucene.LuceneQueryFactory;
-import com.gemstone.gemfire.cache.lucene.LuceneQueryFactory.ResultType;
-import com.gemstone.gemfire.cache.lucene.LuceneQueryResults;
-
-public class LuceneQueryImpl implements LuceneQuery {
-  private int limit = LuceneQueryFactory.DEFAULT_LIMIT;
-  private int pageSize = LuceneQueryFactory.DEFAULT_PAGESIZE;
-  private String indexName;
-  private String regionName;
-  private Set<ResultType> resultTypes;
-  
-  // The projected fields are local to a specific index per Query object. 
-  private Set<String> projectedFieldNames;
-  
-  /* the lucene Query object to be wrapped here */
-  private Query query;
-  
-  LuceneQueryImpl(String indexName, String regionName, int limit, int pageSize, Set<ResultType> resultTypes, 
-      Set<String> projectionFieldNames, Query query) {
-    this.indexName = indexName;
-    this.regionName = regionName;
-    this.limit = limit;
-    this.pageSize = pageSize;
-    this.resultTypes = resultTypes;
-    this.projectedFieldNames = projectionFieldNames;
-    this.query = query;
-  }
-
-  @Override
-  public LuceneQueryResults<?> search() {
-    // TODO Auto-generated method stub
-    return null;
-  }
-
-  @Override
-  public int getPageSize() {
-    return this.pageSize;
-  }
-
-  @Override
-  public int getLimit() {
-    return this.limit;
-  }
-
-  @Override
-  public ResultType[] getResultTypes() {
-    return (ResultType[])this.resultTypes.toArray();
-  }
-
-  @Override
-  public String[] getProjectedFieldNames() {
-    return (String[])this.projectedFieldNames.toArray();
-  }
-  
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5974ffc8/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryResultsImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryResultsImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryResultsImpl.java
deleted file mode 100644
index ecb6370..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryResultsImpl.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package com.gemstone.gemfire.cache.lucene.internal;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.concurrent.TimeUnit;
-
-import com.gemstone.gemfire.cache.execute.FunctionException;
-import com.gemstone.gemfire.cache.execute.ResultCollector;
-import com.gemstone.gemfire.cache.lucene.LuceneQueryResults;
-import com.gemstone.gemfire.cache.lucene.LuceneResultStruct;
-import com.gemstone.gemfire.distributed.DistributedMember;
-
-public class LuceneQueryResultsImpl<E> implements LuceneQueryResults<E>, ResultCollector {
-
-  @Override
-  public Object getResult() throws FunctionException {
-    // TODO Auto-generated method stub
-    return null;
-  }
-
-  @Override
-  public Object getResult(long timeout, TimeUnit unit)
-      throws FunctionException, InterruptedException {
-    // TODO Auto-generated method stub
-    return null;
-  }
-
-  @Override
-  public void addResult(DistributedMember memberID,
-      Object resultOfSingleExecution) {
-    // TODO Auto-generated method stub
-    
-  }
-
-  @Override
-  public void endResults() {
-    // TODO Auto-generated method stub
-    
-  }
-
-  @Override
-  public void clearResults() {
-    // TODO Auto-generated method stub
-    
-  }
-
-  @Override
-  public List getNextPage() {
-    // TODO Auto-generated method stub
-    return null;
-  }
-
-  @Override
-  public boolean hasNextPage() {
-    // TODO Auto-generated method stub
-    return false;
-  }
-
-  @Override
-  public int size() {
-    // TODO Auto-generated method stub
-    return 0;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5974ffc8/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneResultStructImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneResultStructImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneResultStructImpl.java
deleted file mode 100644
index 0db8f97..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneResultStructImpl.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package com.gemstone.gemfire.cache.lucene.internal;
-
-import java.util.LinkedList;
-
-import com.gemstone.gemfire.cache.lucene.LuceneResultStruct;
-
-public class LuceneResultStructImpl implements LuceneResultStruct {
-
-  @Override
-  public Object getProjectedField(String fieldName) {
-    // TODO Auto-generated method stub
-    return null;
-  }
-
-  @Override
-  public Object getKey() {
-    // TODO Auto-generated method stub
-    return null;
-  }
-
-  @Override
-  public Object getValue() {
-    // TODO Auto-generated method stub
-    return null;
-  }
-
-  @Override
-  public Double getScore() {
-    // TODO Auto-generated method stub
-    return null;
-  }
-
-  @Override
-  public Object[] getNames() {
-    // TODO Auto-generated method stub
-    return null;
-  }
-
-  @Override
-  public Object[] getResultValues() {
-    // TODO Auto-generated method stub
-    return null;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5974ffc8/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneServiceFactoryImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneServiceFactoryImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneServiceFactoryImpl.java
deleted file mode 100644
index d506f7a..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneServiceFactoryImpl.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.gemstone.gemfire.cache.lucene.internal;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.lucene.LuceneService;
-import com.gemstone.gemfire.cache.lucene.LuceneServiceFactory;
-
-public class LuceneServiceFactoryImpl implements LuceneServiceFactory {
-  
-  public void initialize() {
-  }
-
-  @Override
-  public LuceneService create(Cache cache) {
-    return LuceneServiceImpl.getInstance(cache);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5974ffc8/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneServiceImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneServiceImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneServiceImpl.java
deleted file mode 100644
index ed90f89..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneServiceImpl.java
+++ /dev/null
@@ -1,90 +0,0 @@
-package com.gemstone.gemfire.cache.lucene.internal;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.lucene.analysis.Analyzer;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.lucene.LuceneIndex;
-import com.gemstone.gemfire.cache.lucene.LuceneQueryFactory;
-import com.gemstone.gemfire.cache.lucene.LuceneService;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-
-/**
- * Implementation of LuceneService to create lucene index and query. 
- * 
- * @author Xiaojian Zhou
- * 
- * @since 8.5
- */
-public class LuceneServiceImpl implements LuceneService {
-  private final Cache cache;
-  private static LuceneServiceImpl instance;
-
-  private final HashMap<String, LuceneIndex>  indexMap;
-
-  private LuceneServiceImpl(final Cache cache) {
-    if (cache == null) {
-      throw new IllegalStateException(LocalizedStrings.CqService_CACHE_IS_NULL.toLocalizedString());
-    }
-    GemFireCacheImpl gfc = (GemFireCacheImpl) cache;
-    gfc.getCancelCriterion().checkCancelInProgress(null);
-
-    this.cache = gfc;
-
-    
-    // Initialize the Map which maintains indexes
-    this.indexMap = new HashMap<String, LuceneIndex>();
-  }
-  
-  public static synchronized LuceneServiceImpl getInstance(final Cache cache) {
-    if (instance == null) {
-      instance = new LuceneServiceImpl(cache);
-    }
-    return instance;
-  }
-  
-  public String getUniqueIndexName(String indexName, String regionName) {
-    String name = indexName+"#"+regionName.replace('/', '_');
-    return name;
-  }
-  
-  @Override
-  public LuceneIndex createIndex(String indexName, String regionName, String... fields) {
-    // TODO Auto-generated method stub
-    return null;
-  }
-
-  @Override
-  public LuceneIndex getIndex(String indexName, String regionName) {
-    return indexMap.get(getUniqueIndexName(indexName, regionName));
-  }
-
-  @Override
-  public Collection<LuceneIndex> getAllIndexes() {
-    return indexMap.values();
-  }
-
-  @Override
-  public LuceneIndex createIndex(String indexName, String regionName, 
-      Map<String, Analyzer> analyzerPerField) {
-    // TODO Auto-generated method stub
-    return null;
-  }
-
-  @Override
-  public void destroyIndex(LuceneIndex index) {
-    LuceneIndexImpl indexImpl = (LuceneIndexImpl)index;
-    indexMap.remove(getUniqueIndexName(index.getName(), index.getRegionName()));
-    indexImpl.close();
-  }
-
-  @Override
-  public LuceneQueryFactory createLuceneQueryFactory() {
-    return new LuceneQueryFactoryImpl();
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5974ffc8/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
index 79bcbc2..ed83a76 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
@@ -126,8 +126,6 @@ import com.gemstone.gemfire.cache.hdfs.internal.hoplog.HDFSForceCompactionFuncti
 import com.gemstone.gemfire.cache.hdfs.internal.hoplog.HDFSLastCompactionTimeFunction;
 import com.gemstone.gemfire.cache.hdfs.internal.hoplog.HDFSRegionDirector;
 import com.gemstone.gemfire.cache.hdfs.internal.hoplog.HDFSStoreDirector;
-import com.gemstone.gemfire.cache.lucene.LuceneService;
-import com.gemstone.gemfire.cache.lucene.LuceneServiceProvider;
 import com.gemstone.gemfire.cache.query.QueryService;
 import com.gemstone.gemfire.cache.query.internal.DefaultQuery;
 import com.gemstone.gemfire.cache.query.internal.DefaultQueryService;
@@ -586,8 +584,6 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer
   
   private final CqService cqService;
   
-  private final LuceneService luceneService;
-
   public static final int DEFAULT_CLIENT_FUNCTION_TIMEOUT = 0;
 
   private static int clientFunctionTimeout;
@@ -818,8 +814,6 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer
       
       this.cqService = CqServiceProvider.create(this);
 
-      this.luceneService = LuceneServiceProvider.create(this);
-
       initReliableMessageQueueFactory();
 
       // Create the CacheStatistics
@@ -5428,12 +5422,4 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer
   public CqService getCqService() {
     return this.cqService;
   }
-  
-  /**
-   * get reference to LuceneService singleton
-   * @return LuceneService
-   */
-  public LuceneService getLuceneService() {
-    return this.luceneService;
-  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5974ffc8/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/extension/ExtensionPoint.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/extension/ExtensionPoint.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/extension/ExtensionPoint.java
index 8022be5..dedc50f 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/extension/ExtensionPoint.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/extension/ExtensionPoint.java
@@ -24,7 +24,15 @@ public interface ExtensionPoint<T> {
    *          to add.
    * @since 8.1
    */
-  void addExtension(Extension<T> extension);
+  void addExtension(Object key, Extension<T> extension);
+  
+  /**
+   * Retrieve an {@link Extension} by key
+   * 
+   * @param key key to retrieve 
+   * @since 9.0
+   */
+  Extension<T> getExtension(Object key);
 
   /**
    * Remove {@link Extension} from {@link ExtensionPoint}.
@@ -33,7 +41,7 @@ public interface ExtensionPoint<T> {
    *          to remove.
    * @since 8.1
    */
-  void removeExtension(Extension<T> extension);
+  void removeExtension(Object key);
 
   /**
    * Get {@link Iterable} of {@link Extension}s.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5974ffc8/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/extension/SimpleExtensionPoint.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/extension/SimpleExtensionPoint.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/extension/SimpleExtensionPoint.java
index 0fd985f..06e855f 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/extension/SimpleExtensionPoint.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/extension/SimpleExtensionPoint.java
@@ -8,9 +8,9 @@
 
 package com.gemstone.gemfire.internal.cache.extension;
 
-import java.util.ArrayList;
+import java.util.Map;
 
-import com.gemstone.gemfire.internal.util.CollectionUtils;
+import com.gemstone.gemfire.internal.util.concurrent.CopyOnWriteHashMap;
 
 /**
  * Simple implementation of {@link ExtensionPoint} for easy integration with
@@ -23,9 +23,7 @@ import com.gemstone.gemfire.internal.util.CollectionUtils;
 // UnitTest SimpleExtensionPointJUnitTest
 public class SimpleExtensionPoint<T> implements ExtensionPoint<T> {
 
-  protected final ArrayList<Extension<T>> extensions = new ArrayList<Extension<T>>();
-
-  protected final Iterable<Extension<T>> iterable = CollectionUtils.unmodifiableIterable(extensions);
+  protected final Map<Object, Extension<T>> extensions = new CopyOnWriteHashMap<Object, Extension<T>>();
 
   protected final Extensible<T> extensible;
 
@@ -50,17 +48,22 @@ public class SimpleExtensionPoint<T> implements ExtensionPoint<T> {
 
   @Override
   public Iterable<Extension<T>> getExtensions() {
-    return iterable;
+    return extensions.values();
   }
 
   @Override
-  public void addExtension(Extension<T> extension) {
-    extensions.add(extension);
+  public void addExtension(Object key, Extension<T> extension) {
+    extensions.put(key, extension);
   }
 
   @Override
-  public void removeExtension(Extension<T> extension) {
-    extensions.remove(extension);
+  public Extension<T> getExtension(Object key) {
+    return extensions.get(key);
+  }
+  
+  @Override
+  public void removeExtension(Object key) {
+    extensions.remove(key);
   }
 
   @Override
@@ -69,7 +72,7 @@ public class SimpleExtensionPoint<T> implements ExtensionPoint<T> {
   }
 
   public void fireCreate(final Extensible<T> newTarget) {
-    for (final Extension<T> extension : extensions) {
+    for (final Extension<T> extension : getExtensions()) {
       extension.onCreate(extensible, newTarget);
     }
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5974ffc8/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreation.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreation.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreation.java
index b9fcfe7..04630ba 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreation.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreation.java
@@ -55,7 +55,6 @@ import com.gemstone.gemfire.cache.client.PoolManager;
 import com.gemstone.gemfire.cache.client.internal.BridgePoolImpl;
 import com.gemstone.gemfire.cache.client.internal.PoolImpl;
 import com.gemstone.gemfire.cache.execute.FunctionService;
-import com.gemstone.gemfire.cache.lucene.LuceneService;
 import com.gemstone.gemfire.cache.query.CqAttributes;
 import com.gemstone.gemfire.cache.query.CqException;
 import com.gemstone.gemfire.cache.query.CqExistsException;
@@ -1431,11 +1430,6 @@ public class CacheCreation implements InternalCache, Extensible<Cache> {
     return null;
   }
 
-  @Override
-  public LuceneService getLuceneService() {
-    return null;
-  }
-
   public QueryService queryService = new com.gemstone.gemfire.cache.query.QueryService() {
 
     private Map<String, List> indexes = new HashMap<String, List>();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5974ffc8/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/concurrent/CopyOnWriteHashMap.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/concurrent/CopyOnWriteHashMap.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/concurrent/CopyOnWriteHashMap.java
index e7e6c68..d6f4c6f 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/concurrent/CopyOnWriteHashMap.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/concurrent/CopyOnWriteHashMap.java
@@ -13,6 +13,7 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Set;
+import java.util.concurrent.ConcurrentMap;
 
 /**
  * A copy on write hash map.
@@ -23,7 +24,7 @@ import java.util.Set;
  * @author dsmith
  *
  */
-public class CopyOnWriteHashMap<K,V> extends AbstractMap<K, V> {
+public class CopyOnWriteHashMap<K,V> extends AbstractMap<K, V> implements ConcurrentMap<K, V> {
   private volatile Map<K,V> map = Collections.<K,V>emptyMap();
 
   public CopyOnWriteHashMap() {
@@ -154,7 +155,45 @@ public class CopyOnWriteHashMap<K,V> extends AbstractMap<K, V> {
     clone.map = map;
     return clone;
   }
-  
-  
 
+  @Override
+  public synchronized V putIfAbsent(K key, V value) {
+    V oldValue = map.get(key);
+    if(oldValue == null) {
+      put(key, oldValue);
+      return null;
+    } else {
+      return oldValue;
+    }
+  }
+
+  @Override
+  public synchronized boolean remove(Object key, Object value) {
+    V oldValue = map.get(key);
+    if(oldValue != null && oldValue.equals(value)) {
+      remove(key);
+      return true;
+    }
+    
+    return false;
+  }
+
+  @Override
+  public synchronized boolean replace(K key, V oldValue, V newValue) {
+    V existingValue = map.get(key);
+    if(existingValue != null && existingValue.equals(oldValue)) {
+      put(key, newValue);
+      return true;
+    }
+    return false;
+  }
+
+  @Override
+  public synchronized V replace(K key, V value) {
+    if (map.containsKey(key)) {
+      return put(key, value);
+    } else {
+      return null;
+    }
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5974ffc8/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml81DUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml81DUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml81DUnitTest.java
index f1cc1f9..54f1208 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml81DUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml81DUnitTest.java
@@ -56,7 +56,7 @@ public class CacheXml81DUnitTest extends CacheXml80DUnitTest {
   public void testCacheExtension() {
     final CacheCreation cache = new CacheCreation();
     final MockCacheExtension extension = new MockCacheExtension("testCacheExtension");
-    cache.getExtensionPoint().addExtension(extension);
+    cache.getExtensionPoint().addExtension(MockCacheExtension.class, extension);
 
     assertEquals(0, extension.onCreateCounter.get());
     assertEquals(0, extension.getXmlGeneratorCounter.get());
@@ -91,7 +91,7 @@ public class CacheXml81DUnitTest extends CacheXml80DUnitTest {
     Extensible<Region<?, ?>> region = (Extensible<Region<?, ?>>) cache.createRegion(regionName, attrs);
 
     final MockRegionExtension extension = new MockRegionExtension("test");
-    region.getExtensionPoint().addExtension(extension);
+    region.getExtensionPoint().addExtension(MockRegionExtension.class, extension);
 
     assertEquals(0, extension.onCreateCounter.get());
     assertEquals(0, extension.getXmlGeneratorCounter.get());
@@ -127,7 +127,7 @@ public class CacheXml81DUnitTest extends CacheXml80DUnitTest {
     Extensible<Region<?, ?>> region = (Extensible<Region<?, ?>>) cache.createRegion(regionName, attrs);
 
     final MockRegionExtension extension = new MockRegionExtension("exception");
-    region.getExtensionPoint().addExtension(extension);
+    region.getExtensionPoint().addExtension(MockRegionExtension.class, extension);
 
     assertEquals(0, extension.onCreateCounter.get());
     assertEquals(0, extension.getXmlGeneratorCounter.get());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5974ffc8/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/extension/SimpleExtensionPointJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/extension/SimpleExtensionPointJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/extension/SimpleExtensionPointJUnitTest.java
index 2899669..35bb7ef 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/extension/SimpleExtensionPointJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/extension/SimpleExtensionPointJUnitTest.java
@@ -7,7 +7,11 @@
  */
 package com.gemstone.gemfire.internal.cache.extension;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 import java.util.Iterator;
 import java.util.NoSuchElementException;
@@ -38,7 +42,7 @@ public class SimpleExtensionPointJUnitTest {
     final MockImpl m = new MockImpl();
     assertSame(m.extensionPoint.extensible, m.extensionPoint.target);
     assertNotNull(m.extensionPoint.extensions);
-    assertNotNull(m.extensionPoint.iterable);
+    assertNotNull(m.extensionPoint.extensions);
   }
 
   /**
@@ -49,7 +53,7 @@ public class SimpleExtensionPointJUnitTest {
     final MockImpl m = new MockImpl();
 
     assertEquals(0, m.extensionPoint.extensions.size());
-    assertTrue(!m.extensionPoint.iterable.iterator().hasNext());
+    assertTrue(!m.extensionPoint.extensions.values().iterator().hasNext());
 
     final Iterable<Extension<MockInterface>> extensions = m.getExtensionPoint().getExtensions();
     assertNotNull(extensions);
@@ -73,7 +77,7 @@ public class SimpleExtensionPointJUnitTest {
     final MockImpl m = new MockImpl();
     final MockExtension extension = new MockExtension();
 
-    m.getExtensionPoint().addExtension(extension);
+    m.getExtensionPoint().addExtension(MockExtension.class, extension);
     assertEquals(1, m.extensionPoint.extensions.size());
 
     final Iterable<Extension<MockInterface>> extensions = m.getExtensionPoint().getExtensions();
@@ -101,7 +105,7 @@ public class SimpleExtensionPointJUnitTest {
   public void testRemoveExtension() {
     final MockImpl m = new MockImpl();
     final MockExtension extension = new MockExtension();
-    m.getExtensionPoint().addExtension(extension);
+    m.getExtensionPoint().addExtension(MockExtension.class, extension);
 
     final Iterable<Extension<MockInterface>> extensions = m.getExtensionPoint().getExtensions();
     assertNotNull(extensions);
@@ -120,7 +124,7 @@ public class SimpleExtensionPointJUnitTest {
       // ignore
     }
 
-    m.getExtensionPoint().removeExtension(extension);
+    m.getExtensionPoint().removeExtension(MockExtension.class);
     assertEquals(0, m.extensionPoint.extensions.size());
 
     // extensions should be empty
@@ -159,13 +163,13 @@ public class SimpleExtensionPointJUnitTest {
     };
 
     counter.set(0);
-    m.getExtensionPoint().addExtension(extension);
+    m.getExtensionPoint().addExtension(MockExtension.class, extension);
     // fire with itself as the target
     m.extensionPoint.fireCreate(m);
     assertEquals(1, counter.get());
 
     counter.set(0);
-    m.getExtensionPoint().removeExtension(extension);
+    m.getExtensionPoint().removeExtension(MockExtension.class);
     // fire with itself as the target
     m.extensionPoint.fireCreate(m);
     assertEquals(0, counter.get());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5974ffc8/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/extension/mock/DestroyMockCacheExtensionFunction.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/extension/mock/DestroyMockCacheExtensionFunction.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/extension/mock/DestroyMockCacheExtensionFunction.java
index 47e8c05..29b6acb 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/extension/mock/DestroyMockCacheExtensionFunction.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/extension/mock/DestroyMockCacheExtensionFunction.java
@@ -48,12 +48,7 @@ public class DestroyMockCacheExtensionFunction extends FunctionAdapter {
 
     @SuppressWarnings("unchecked")
     final Extensible<Cache> extensible = (Extensible<Cache>) cache;
-    for (Extension<Cache> extension : extensible.getExtensionPoint().getExtensions()) {
-      if (extension instanceof MockCacheExtension) {
-        extensible.getExtensionPoint().removeExtension(extension);
-        break;
-      }
-    }
+    extensible.getExtensionPoint().removeExtension(MockCacheExtension.class);
 
     final XmlEntity xmlEntity = XmlEntity.builder().withType(ELEMENT_CACHE).withNamespace(PREFIX, NAMESPACE).build();
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5974ffc8/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/extension/mock/MockCacheExtension.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/extension/mock/MockCacheExtension.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/extension/mock/MockCacheExtension.java
index b37a9cf..b5b9e65 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/extension/mock/MockCacheExtension.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/extension/mock/MockCacheExtension.java
@@ -33,7 +33,7 @@ public final class MockCacheExtension extends AbstractMockExtension<Cache> {
   @Override
   public void onCreate(Extensible<Cache> source, Extensible<Cache> target) {
     super.onCreate(source, target);
-    target.getExtensionPoint().addExtension(this);
+    target.getExtensionPoint().addExtension(MockCacheExtension.class, this);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5974ffc8/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/extension/mock/MockExtensionXmlParser.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/extension/mock/MockExtensionXmlParser.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/extension/mock/MockExtensionXmlParser.java
index 6e9b529..cf9a2ec 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/extension/mock/MockExtensionXmlParser.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/extension/mock/MockExtensionXmlParser.java
@@ -76,13 +76,13 @@ public class MockExtensionXmlParser extends AbstractXmlParser {
     case ELEMENT_CACHE: {
       MockCacheExtension extension = (MockCacheExtension) stack.pop();
       CacheCreation cache = (CacheCreation) stack.peek();
-      cache.getExtensionPoint().addExtension(extension);
+      cache.getExtensionPoint().addExtension(MockCacheExtension.class, extension);
       break;
     }
     case ELEMENT_REGION: {
       MockRegionExtension extension = (MockRegionExtension) stack.pop();
       RegionCreation region = (RegionCreation) stack.peek();
-      region.getExtensionPoint().addExtension(extension);
+      region.getExtensionPoint().addExtension(MockRegionExtension.class, extension);
       break;
     }
     default:

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5974ffc8/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/extension/mock/MockRegionExtension.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/extension/mock/MockRegionExtension.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/extension/mock/MockRegionExtension.java
index a5d2ce0..571b5a1 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/extension/mock/MockRegionExtension.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/extension/mock/MockRegionExtension.java
@@ -27,7 +27,7 @@ public final class MockRegionExtension extends AbstractMockExtension<Region<?, ?
   @Override
   public void onCreate(Extensible<Region<?, ?>> source, Extensible<Region<?, ?>> target) {
     super.onCreate(source, target);
-    target.getExtensionPoint().addExtension(this);
+    target.getExtensionPoint().addExtension(MockRegionExtension.class, this);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5974ffc8/settings.gradle
----------------------------------------------------------------------
diff --git a/settings.gradle b/settings.gradle
index 4b2da7b..5f031ef 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -9,6 +9,7 @@ include 'gemfire-web'
 include 'gemfire-web-api'
 include 'gemfire-assembly'
 include 'gemfire-rebalancer'
+include 'gemfire-lucene'
 
 def minimumGradleVersion = '2.3'
 if (GradleVersion.current() < GradleVersion.version(minimumGradleVersion)) {


Mime
View raw message