ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [27/45] incubator-ignite git commit: ignite-sql-old - rename
Date Sun, 15 Feb 2015 03:12:18 GMT
ignite-sql-old - rename


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

Branch: refs/heads/ignite-sql-old
Commit: 72ec8d62595a240496c9a948e6d0374785c318b0
Parents: d026ccf
Author: S.Vladykin <svladykin@gridgain.com>
Authored: Sat Feb 14 15:24:10 2015 +0300
Committer: S.Vladykin <svladykin@gridgain.com>
Committed: Sat Feb 14 15:24:10 2015 +0300

----------------------------------------------------------------------
 .../configuration/CacheConfiguration.java       |   5 +-
 .../configuration/IgniteConfiguration.java      |  10 +-
 .../org/apache/ignite/internal/IgnitionEx.java  |   5 +-
 .../managers/indexing/GridIndexingManager.java  |   2 +-
 .../cache/query/GridCacheQueriesImpl.java       |   2 +-
 .../cache/query/GridCacheSqlMetadata.java       |   2 +-
 .../ignite/spi/indexing/GridIndexingSpi.java    | 112 ------------------
 .../spi/indexing/GridNoopIndexingSpi.java       |  66 -----------
 .../apache/ignite/spi/indexing/IndexingSpi.java | 113 +++++++++++++++++++
 .../spi/indexing/noop/NoopIndexingSpi.java      |  68 +++++++++++
 .../IgniteTxExceptionAbstractSelfTest.java      |   5 +-
 .../processors/query/h2/IgniteH2Indexing.java   |   2 +-
 pom.xml                                         |   4 +-
 13 files changed, 200 insertions(+), 196 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/72ec8d62/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
index 5978e8b..84c047c 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
@@ -21,7 +21,6 @@ import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.*;
 import org.apache.ignite.cache.eviction.*;
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cache.store.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.spi.indexing.*;
@@ -1434,7 +1433,7 @@ public class CacheConfiguration extends MutableConfiguration {
      * SPI is configured. In majority of the cases default value should be used.
      *
      * @return Name of SPI to use for indexing.
-     * @see GridIndexingSpi
+     * @see IndexingSpi
      */
     public String getIndexingSpiName() {
         return indexingSpiName;
@@ -1448,7 +1447,7 @@ public class CacheConfiguration extends MutableConfiguration {
      * SPI is configured. In majority of the cases default value should be used.
      *
      * @param indexingSpiName Name.
-     * @see GridIndexingSpi
+     * @see IndexingSpi
      */
     public void setIndexingSpiName(String indexingSpiName) {
         this.indexingSpiName = indexingSpiName;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/72ec8d62/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
index f07cec5..1695ab7 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
@@ -314,7 +314,7 @@ public class IgniteConfiguration {
     private SwapSpaceSpi swapSpaceSpi;
 
     /** Indexing SPI. */
-    private GridIndexingSpi indexingSpi;
+    private IndexingSpi indexingSpi;
 
     /** Address resolver. */
     private AddressResolver addrRslvr;
@@ -1808,12 +1808,12 @@ public class IgniteConfiguration {
     }
 
     /**
-     * Sets fully configured instances of {@link org.apache.ignite.spi.indexing.GridIndexingSpi}.
+     * Sets fully configured instances of {@link IndexingSpi}.
      *
-     * @param indexingSpi Fully configured instances of {@link org.apache.ignite.spi.indexing.GridIndexingSpi}.
+     * @param indexingSpi Fully configured instances of {@link IndexingSpi}.
      * @see IgniteConfiguration#getIndexingSpi()
      */
-    public void setIndexingSpi(GridIndexingSpi indexingSpi) {
+    public void setIndexingSpi(IndexingSpi indexingSpi) {
         this.indexingSpi = indexingSpi;
     }
 
@@ -1822,7 +1822,7 @@ public class IgniteConfiguration {
      *
      * @return Indexing SPI implementation.
      */
-    public GridIndexingSpi getIndexingSpi() {
+    public IndexingSpi getIndexingSpi() {
         return indexingSpi;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/72ec8d62/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
index c5b4c46..86ac31c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
@@ -50,6 +50,7 @@ import org.apache.ignite.spi.eventstorage.memory.*;
 import org.apache.ignite.spi.failover.*;
 import org.apache.ignite.spi.failover.always.*;
 import org.apache.ignite.spi.indexing.*;
+import org.apache.ignite.spi.indexing.noop.*;
 import org.apache.ignite.spi.loadbalancing.*;
 import org.apache.ignite.spi.loadbalancing.roundrobin.*;
 import org.apache.ignite.spi.swapspace.*;
@@ -1448,7 +1449,7 @@ public class IgnitionEx {
             FailoverSpi[] failSpi = cfg.getFailoverSpi();
             LoadBalancingSpi[] loadBalancingSpi = cfg.getLoadBalancingSpi();
             SwapSpaceSpi swapspaceSpi = cfg.getSwapSpaceSpi();
-            GridIndexingSpi indexingSpi = cfg.getIndexingSpi();
+            IndexingSpi indexingSpi = cfg.getIndexingSpi();
 
             execSvc = new IgniteThreadPoolExecutor(
                 "pub-" + cfg.getGridName(),
@@ -1635,7 +1636,7 @@ public class IgnitionEx {
             }
 
             if (indexingSpi == null)
-                indexingSpi = new GridNoopIndexingSpi();
+                indexingSpi = new NoopIndexingSpi();
 
             myCfg.setCommunicationSpi(commSpi);
             myCfg.setDiscoverySpi(discoSpi);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/72ec8d62/modules/core/src/main/java/org/apache/ignite/internal/managers/indexing/GridIndexingManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/indexing/GridIndexingManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/managers/indexing/GridIndexingManager.java
index f8caa9f..3fe7839 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/indexing/GridIndexingManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/indexing/GridIndexingManager.java
@@ -30,7 +30,7 @@ import java.util.*;
 /**
  * Manages cache indexing.
  */
-public class GridIndexingManager extends GridManagerAdapter<GridIndexingSpi> {
+public class GridIndexingManager extends GridManagerAdapter<IndexingSpi> {
     /** */
     private final GridSpinBusyLock busyLock = new GridSpinBusyLock();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/72ec8d62/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesImpl.java
index 5dbc043..cb8921e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesImpl.java
@@ -151,7 +151,7 @@ public class GridCacheQueriesImpl<K, V> implements GridCacheQueriesEx<K,
V>, Ext
     }
 
     /**
-     * Query for {@link GridIndexingSpi}.
+     * Query for {@link IndexingSpi}.
      *
      * @return Query.
      */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/72ec8d62/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlMetadata.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlMetadata.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlMetadata.java
index b9c5319..7f25490 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlMetadata.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlMetadata.java
@@ -43,7 +43,7 @@ public interface GridCacheSqlMetadata extends Externalizable {
      * <p>
      * By default, type name is equal to simple class name
      * of stored object, but it can depend on implementation
-     * of {@link GridIndexingSpi}.
+     * of {@link IndexingSpi}.
      *
      * @return Collection of available types.
      */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/72ec8d62/modules/core/src/main/java/org/apache/ignite/spi/indexing/GridIndexingSpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/indexing/GridIndexingSpi.java
b/modules/core/src/main/java/org/apache/ignite/spi/indexing/GridIndexingSpi.java
deleted file mode 100644
index a508baf..0000000
--- a/modules/core/src/main/java/org/apache/ignite/spi/indexing/GridIndexingSpi.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.spi.indexing;
-
-import org.apache.ignite.spi.*;
-import org.jetbrains.annotations.*;
-
-import java.util.*;
-
-/**
- * Indexing SPI allows user to index cache content. Using indexing SPI user can index data
in cache and run
- * Usually cache name will be used as space name, so multiple caches can write to single
indexing SPI instance.
- * <p>
- * <b>NOTE:</b> this SPI (i.e. methods in this interface) should never be used
directly. SPIs provide
- * internal view on the subsystem and is used internally by Ignite kernal. In rare use cases
when
- * access to a specific implementation of this SPI is required - an instance of this SPI
can be obtained
- * via {@link org.apache.ignite.Ignite#configuration()} method to check its configuration
properties or call other non-SPI
- * methods. Note again that calling methods from this interface on the obtained instance
can lead
- * to undefined behavior and explicitly not supported.
- *
- * Here is a Java example on how to configure SPI.
- * <pre name="code" class="java">
- * GridIndexingSpi spi = new MyIndexingSpi();
- *
- * GridConfiguration cfg = new GridConfiguration();
- *
- * // Overrides default indexing SPI.
- * cfg.setIndexingSpi(spi);
- *
- * // Starts grid.
- * G.start(cfg);
- * </pre>
- * Here is an example of how to configure SPI from Spring XML configuration file.
- * <pre name="code" class="xml">
- * &lt;property name=&quot;indexingSpi&quot;&gt;
- *     &lt;bean class=&quot;com.example.MyIndexingSpi&quot;&gt;
- *     &lt;/bean&gt;
- * &lt;/property&gt;
- * </pre>
- * <p>
- * <img src="http://www.gridgain.com/images/spring-small.png">
- * <br>
- * For information about Spring framework visit <a href="http://www.springframework.org/">www.springframework.org</a>
- */
-public interface GridIndexingSpi extends IgniteSpi {
-    /**
-     * Executes query.
-     *
-     * @param spaceName Space name.
-     * @param params Query parameters.
-     * @param filters System filters.
-     * @return Query result.
-     * @throws IgniteSpiException If failed.
-     */
-    public Iterator<?> query(@Nullable String spaceName, Collection<Object> params,
-        @Nullable IndexingQueryFilter filters) throws IgniteSpiException;
-
-    /**
-     * Updates index. Note that key is unique for space, so if space contains multiple indexes
-     * the key should be removed from indexes other than one being updated.
-     *
-     * @param spaceName Space name.
-     * @param key Key.
-     * @param val Value.
-     * @param expirationTime Expiration time or 0 if never expires.
-     * @throws IgniteSpiException If failed.
-     */
-    public void store(@Nullable String spaceName, Object key, Object val, long expirationTime)
throws IgniteSpiException;
-
-    /**
-     * Removes index entry by key.
-     *
-     * @param spaceName Space name.
-     * @param key Key.
-     * @throws IgniteSpiException If failed.
-     */
-    public void remove(@Nullable String spaceName, Object key) throws IgniteSpiException;
-
-    /**
-     * Will be called when entry with given key is swapped.
-     *
-     * @param spaceName Space name.
-     * @param key Key.
-     * @throws IgniteSpiException If failed.
-     */
-    public void onSwap(@Nullable String spaceName, Object key) throws IgniteSpiException;
-
-    /**
-     * Will be called when entry with given key is unswapped.
-     *
-     * @param spaceName Space name.
-     * @param key Key.
-     * @param val Value.
-     * @throws IgniteSpiException If failed.
-     */
-    public void onUnswap(@Nullable String spaceName, Object key, Object val) throws IgniteSpiException;
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/72ec8d62/modules/core/src/main/java/org/apache/ignite/spi/indexing/GridNoopIndexingSpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/indexing/GridNoopIndexingSpi.java
b/modules/core/src/main/java/org/apache/ignite/spi/indexing/GridNoopIndexingSpi.java
deleted file mode 100644
index 760173f..0000000
--- a/modules/core/src/main/java/org/apache/ignite/spi/indexing/GridNoopIndexingSpi.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.spi.indexing;
-
-import org.apache.ignite.spi.*;
-import org.jetbrains.annotations.*;
-
-import java.util.*;
-
-/**
- * Default implementation of {@link GridIndexingSpi} which does not index cache.
- */
-@IgniteSpiNoop
-public class GridNoopIndexingSpi extends IgniteSpiAdapter implements GridIndexingSpi {
-    /** {@inheritDoc} */
-    @Override public Iterator<?> query(@Nullable String spaceName, Collection<Object>
params,
-        @Nullable IndexingQueryFilter filters) throws IgniteSpiException {
-        throw new IgniteSpiException("You have to configure custom GridIndexingSpi implementation.");
-    }
-
-    /** {@inheritDoc} */
-    @Override public void store(@Nullable String spaceName, Object key, Object val, long
expirationTime)
-        throws IgniteSpiException {
-        assert false;
-    }
-
-    /** {@inheritDoc} */
-    @Override public void remove(@Nullable String spaceName, Object key) throws IgniteSpiException
{
-        assert false;
-    }
-
-    /** {@inheritDoc} */
-    @Override public void onSwap(@Nullable String spaceName, Object key) throws IgniteSpiException
{
-        assert false;
-    }
-
-    /** {@inheritDoc} */
-    @Override public void onUnswap(@Nullable String spaceName, Object key, Object val) throws
IgniteSpiException {
-        assert false;
-    }
-
-    /** {@inheritDoc} */
-    @Override public void spiStart(@Nullable String gridName) throws IgniteSpiException {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override public void spiStop() throws IgniteSpiException {
-        // No-op.
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/72ec8d62/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingSpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingSpi.java
new file mode 100644
index 0000000..43ee43b
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingSpi.java
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.spi.indexing;
+
+import org.apache.ignite.spi.*;
+import org.jetbrains.annotations.*;
+
+import javax.cache.*;
+import java.util.*;
+
+/**
+ * Indexing SPI allows user to index cache content. Using indexing SPI user can index data
in cache and run
+ * Usually cache name will be used as space name, so multiple caches can write to single
indexing SPI instance.
+ * <p>
+ * <b>NOTE:</b> this SPI (i.e. methods in this interface) should never be used
directly. SPIs provide
+ * internal view on the subsystem and is used internally by Ignite kernal. In rare use cases
when
+ * access to a specific implementation of this SPI is required - an instance of this SPI
can be obtained
+ * via {@link org.apache.ignite.Ignite#configuration()} method to check its configuration
properties or call other non-SPI
+ * methods. Note again that calling methods from this interface on the obtained instance
can lead
+ * to undefined behavior and explicitly not supported.
+ *
+ * Here is a Java example on how to configure SPI.
+ * <pre name="code" class="java">
+ * GridIndexingSpi spi = new MyIndexingSpi();
+ *
+ * GridConfiguration cfg = new GridConfiguration();
+ *
+ * // Overrides default indexing SPI.
+ * cfg.setIndexingSpi(spi);
+ *
+ * // Starts grid.
+ * G.start(cfg);
+ * </pre>
+ * Here is an example of how to configure SPI from Spring XML configuration file.
+ * <pre name="code" class="xml">
+ * &lt;property name=&quot;indexingSpi&quot;&gt;
+ *     &lt;bean class=&quot;com.example.MyIndexingSpi&quot;&gt;
+ *     &lt;/bean&gt;
+ * &lt;/property&gt;
+ * </pre>
+ * <p>
+ * <img src="http://www.gridgain.com/images/spring-small.png">
+ * <br>
+ * For information about Spring framework visit <a href="http://www.springframework.org/">www.springframework.org</a>
+ */
+public interface IndexingSpi extends IgniteSpi {
+    /**
+     * Executes query.
+     *
+     * @param spaceName Space name.
+     * @param params Query parameters.
+     * @param filters System filters.
+     * @return Query result. If the iterator implements {@link AutoCloseable} it will be
correctly closed.
+     * @throws IgniteSpiException If failed.
+     */
+    public Iterator<Cache.Entry<?,?>> query(@Nullable String spaceName, Collection<Object>
params,
+        @Nullable IndexingQueryFilter filters) throws IgniteSpiException;
+
+    /**
+     * Updates index. Note that key is unique for space, so if space contains multiple indexes
+     * the key should be removed from indexes other than one being updated.
+     *
+     * @param spaceName Space name.
+     * @param key Key.
+     * @param val Value.
+     * @param expirationTime Expiration time or 0 if never expires.
+     * @throws IgniteSpiException If failed.
+     */
+    public void store(@Nullable String spaceName, Object key, Object val, long expirationTime)
throws IgniteSpiException;
+
+    /**
+     * Removes index entry by key.
+     *
+     * @param spaceName Space name.
+     * @param key Key.
+     * @throws IgniteSpiException If failed.
+     */
+    public void remove(@Nullable String spaceName, Object key) throws IgniteSpiException;
+
+    /**
+     * Will be called when entry with given key is swapped.
+     *
+     * @param spaceName Space name.
+     * @param key Key.
+     * @throws IgniteSpiException If failed.
+     */
+    public void onSwap(@Nullable String spaceName, Object key) throws IgniteSpiException;
+
+    /**
+     * Will be called when entry with given key is unswapped.
+     *
+     * @param spaceName Space name.
+     * @param key Key.
+     * @param val Value.
+     * @throws IgniteSpiException If failed.
+     */
+    public void onUnswap(@Nullable String spaceName, Object key, Object val) throws IgniteSpiException;
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/72ec8d62/modules/core/src/main/java/org/apache/ignite/spi/indexing/noop/NoopIndexingSpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/indexing/noop/NoopIndexingSpi.java
b/modules/core/src/main/java/org/apache/ignite/spi/indexing/noop/NoopIndexingSpi.java
new file mode 100644
index 0000000..83684ba
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/spi/indexing/noop/NoopIndexingSpi.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.spi.indexing.noop;
+
+import org.apache.ignite.spi.*;
+import org.apache.ignite.spi.indexing.*;
+import org.jetbrains.annotations.*;
+
+import javax.cache.*;
+import java.util.*;
+
+/**
+ * Default implementation of {@link IndexingSpi} which does not index cache.
+ */
+@IgniteSpiNoop
+public class NoopIndexingSpi extends IgniteSpiAdapter implements IndexingSpi {
+    /** {@inheritDoc} */
+    @Override public Iterator<Cache.Entry<?,?>> query(@Nullable String spaceName,
Collection<Object> params,
+        @Nullable IndexingQueryFilter filters) throws IgniteSpiException {
+        throw new IgniteSpiException("You have to configure custom GridIndexingSpi implementation.");
+    }
+
+    /** {@inheritDoc} */
+    @Override public void store(@Nullable String spaceName, Object key, Object val, long
expirationTime)
+        throws IgniteSpiException {
+        assert false;
+    }
+
+    /** {@inheritDoc} */
+    @Override public void remove(@Nullable String spaceName, Object key) throws IgniteSpiException
{
+        assert false;
+    }
+
+    /** {@inheritDoc} */
+    @Override public void onSwap(@Nullable String spaceName, Object key) throws IgniteSpiException
{
+        assert false;
+    }
+
+    /** {@inheritDoc} */
+    @Override public void onUnswap(@Nullable String spaceName, Object key, Object val) throws
IgniteSpiException {
+        assert false;
+    }
+
+    /** {@inheritDoc} */
+    @Override public void spiStart(@Nullable String gridName) throws IgniteSpiException {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @Override public void spiStop() throws IgniteSpiException {
+        // No-op.
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/72ec8d62/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxExceptionAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxExceptionAbstractSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxExceptionAbstractSelfTest.java
index c2d27d9..1338e4b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxExceptionAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxExceptionAbstractSelfTest.java
@@ -588,7 +588,7 @@ public abstract class IgniteTxExceptionAbstractSelfTest extends GridCacheAbstrac
     /**
      * Indexing SPI that can fail on demand.
      */
-    private static class TestIndexingSpi extends IgniteSpiAdapter implements GridIndexingSpi
{
+    private static class TestIndexingSpi extends IgniteSpiAdapter implements IndexingSpi
{
         /** Fail flag. */
         private volatile boolean fail;
 
@@ -600,7 +600,8 @@ public abstract class IgniteTxExceptionAbstractSelfTest extends GridCacheAbstrac
         }
 
         /** {@inheritDoc} */
-        @Override public Iterator<?> query(@Nullable String spaceName, Collection<Object>
params, @Nullable IndexingQueryFilter filters) throws IgniteSpiException {
+        @Override public Iterator<Cache.Entry<?,?>> query(@Nullable String spaceName,
Collection<Object> params,
+            @Nullable IndexingQueryFilter filters) throws IgniteSpiException {
             throw new UnsupportedOperationException();
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/72ec8d62/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
index 069e10c..f6a8e7c 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
@@ -88,7 +88,7 @@ import static org.h2.result.SortOrder.*;
  *         different key types
  *     </li>
  * </ul>
- * @see GridIndexingSpi
+ * @see IndexingSpi
  */
 @SuppressWarnings({"UnnecessaryFullyQualifiedName", "NonFinalStaticVariableUsedInClassInitialization"})
 public class IgniteH2Indexing implements GridQueryIndexing {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/72ec8d62/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 570cdef..0752ec9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -769,7 +769,7 @@
                                         </group>
                                         <group>
                                             <title>SPI: Indexing</title>
-                                            <packages>org.apache.ignite.spi.indexing:org.apache.ignite.spi.indexing.h2</packages>
+                                            <packages>org.apache.ignite.spi.indexing:org.apache.ignite.spi.indexing.noop</packages>
                                         </group>
                                         <group>
                                             <title>SPI: Load Balancing</title>
@@ -964,7 +964,7 @@
                                         </group>
                                         <group>
                                             <title>SPI: Indexing</title>
-                                            <packages>org.apache.ignite.spi.indexing:org.apache.ignite.spi.indexing.h2</packages>
+                                            <packages>org.apache.ignite.spi.indexing:org.apache.ignite.spi.indexing.noop</packages>
                                         </group>
                                         <group>
                                             <title>SPI: Load Balancing</title>


Mime
View raw message