ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [52/52] [abbrv] incubator-ignite git commit: # Renaming
Date Fri, 05 Dec 2014 14:07:53 GMT
# Renaming


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

Branch: refs/heads/master
Commit: 12837f35b619e2e9d19de9e0515a681124bf40e9
Parents: dec83ed
Author: sboikov <sboikov@gridgain.com>
Authored: Fri Dec 5 17:06:13 2014 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Fri Dec 5 17:06:13 2014 +0300

----------------------------------------------------------------------
 .../configuration/IgniteConfiguration.java      |   6 +-
 .../ignite/spi/indexing/IndexDescriptor.java    |  42 +++++
 .../apache/ignite/spi/indexing/IndexType.java   |  24 +++
 .../ignite/spi/indexing/IndexingEntity.java     |  50 +++++
 .../spi/indexing/IndexingEntityAdapter.java     |  57 ++++++
 .../spi/indexing/IndexingFieldMetadata.java     |  46 +++++
 .../spi/indexing/IndexingFieldsResult.java      |  35 ++++
 .../indexing/IndexingFieldsResultAdapter.java   |  49 +++++
 .../spi/indexing/IndexingKeyValueRow.java       |  42 +++++
 .../indexing/IndexingKeyValueRowAdapter.java    |  82 ++++++++
 .../ignite/spi/indexing/IndexingMarshaller.java |  38 ++++
 .../spi/indexing/IndexingQueryFilter.java       |  27 +++
 .../apache/ignite/spi/indexing/IndexingSpi.java | 188 +++++++++++++++++++
 .../spi/indexing/IndexingTypeDescriptor.java    |  84 +++++++++
 .../ignite/spi/indexing/NoopIndexingSpi.java    | 119 ++++++++++++
 .../org/apache/ignite/spi/indexing/package.html |  15 ++
 .../grid/cache/GridCacheConfiguration.java      |   4 +-
 .../org/gridgain/grid/kernal/GridGainEx.java    |   2 +-
 .../managers/indexing/GridIndexingManager.java  |  10 +-
 .../GridCacheDistributedFieldsQueryFuture.java  |   2 +-
 .../query/GridCacheDistributedQueryManager.java |   2 +-
 .../query/GridCacheFieldsQueryErrorFuture.java  |   2 +-
 .../query/GridCacheLocalFieldsQueryFuture.java  |   2 +-
 .../cache/query/GridCacheLocalQueryManager.java |   2 +-
 .../cache/query/GridCacheQueryManager.java      |   2 +-
 .../query/GridCacheQueryMetadataAware.java      |   2 +-
 .../cache/query/GridCacheQueryResponse.java     |   2 +-
 .../cache/query/GridCacheSqlMetadata.java       |   2 +-
 .../query/jdbc/GridCacheQueryJdbcTask.java      |   2 +-
 .../grid/kernal/visor/query/VisorQueryTask.java |   2 +-
 .../grid/spi/indexing/IndexDescriptor.java      |  42 -----
 .../gridgain/grid/spi/indexing/IndexType.java   |  24 ---
 .../grid/spi/indexing/IndexingEntity.java       |  50 -----
 .../spi/indexing/IndexingEntityAdapter.java     |  57 ------
 .../spi/indexing/IndexingFieldMetadata.java     |  46 -----
 .../grid/spi/indexing/IndexingFieldsResult.java |  35 ----
 .../indexing/IndexingFieldsResultAdapter.java   |  49 -----
 .../grid/spi/indexing/IndexingKeyValueRow.java  |  42 -----
 .../indexing/IndexingKeyValueRowAdapter.java    |  82 --------
 .../grid/spi/indexing/IndexingMarshaller.java   |  38 ----
 .../grid/spi/indexing/IndexingQueryFilter.java  |  27 ---
 .../gridgain/grid/spi/indexing/IndexingSpi.java | 188 -------------------
 .../spi/indexing/IndexingTypeDescriptor.java    |  84 ---------
 .../grid/spi/indexing/NoopIndexingSpi.java      | 119 ------------
 .../org/gridgain/grid/spi/indexing/package.html |  15 --
 .../GridCacheTxExceptionAbstractSelfTest.java   |   2 +-
 .../grid/spi/indexing/h2/GridH2IndexingSpi.java |  12 +-
 .../h2/opt/GridH2AbstractKeyValueRow.java       |   2 +-
 .../spi/indexing/h2/opt/GridH2IndexBase.java    |   2 +-
 .../spi/indexing/h2/opt/GridH2TreeIndex.java    |   3 +-
 .../spi/indexing/h2/opt/GridLuceneIndex.java    |   2 +-
 .../GridCacheAbstractFieldsQuerySelfTest.java   |   2 +-
 .../GridCacheReplicatedFieldsQuerySelfTest.java |   2 +-
 .../GridCacheReplicatedQuerySelfTest.java       |   2 +-
 .../GridIndexingSpiAbstractSelfTest.java        |   1 +
 .../spi/indexing/h2/GridH2IndexRebuildTest.java |   2 +-
 .../h2/opt/GridLuceneIndexLoadTest.java         |   2 +-
 57 files changed, 938 insertions(+), 936 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/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 59a4fea..04f7634 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
@@ -19,6 +19,7 @@ import org.apache.ignite.marshaller.*;
 import org.apache.ignite.plugin.*;
 import org.apache.ignite.portables.*;
 import org.apache.ignite.spi.authentication.*;
+import org.apache.ignite.spi.indexing.*;
 import org.apache.ignite.streamer.*;
 import org.gridgain.client.ssl.*;
 import org.gridgain.grid.cache.*;
@@ -34,7 +35,6 @@ import org.apache.ignite.spi.deployment.*;
 import org.apache.ignite.spi.discovery.*;
 import org.apache.ignite.spi.eventstorage.*;
 import org.apache.ignite.spi.failover.*;
-import org.gridgain.grid.spi.indexing.*;
 import org.gridgain.grid.spi.loadbalancing.*;
 import org.gridgain.grid.spi.loadbalancing.roundrobin.*;
 import org.gridgain.grid.spi.securesession.*;
@@ -2150,9 +2150,9 @@ public class IgniteConfiguration {
     }
 
     /**
-     * Sets fully configured instances of {@link org.gridgain.grid.spi.indexing.IndexingSpi}.
+     * Sets fully configured instances of {@link org.apache.ignite.spi.indexing.IndexingSpi}.
      *
-     * @param indexingSpi Fully configured instances of {@link org.gridgain.grid.spi.indexing.IndexingSpi}.
+     * @param indexingSpi Fully configured instances of {@link org.apache.ignite.spi.indexing.IndexingSpi}.
      * @see IgniteConfiguration#getIndexingSpi()
      */
     public void setIndexingSpi(IndexingSpi... indexingSpi) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexDescriptor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexDescriptor.java b/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexDescriptor.java
new file mode 100644
index 0000000..ada2cc1
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexDescriptor.java
@@ -0,0 +1,42 @@
+/* @java.file.header */
+
+/*  _________        _____ __________________        _____
+ *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
+ *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
+ *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
+ *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
+ */
+
+package org.apache.ignite.spi.indexing;
+
+import java.util.*;
+
+/**
+ * Describes an index to be created for a certain type. It contains all necessary
+ * information about fields, order, uniqueness, and specified
+ * whether this is SQL or Text index.
+ * See also {@link IndexingTypeDescriptor#indexes()}.
+ */
+public interface IndexDescriptor {
+    /**
+     * Gets all fields to be indexed.
+     *
+     * @return Fields to be indexed.
+     */
+    public Collection<String> fields();
+
+    /**
+     * Specifies order of the index for each indexed field.
+     *
+     * @param field Field name.
+     * @return {@code True} if given field should be indexed in descending order.
+     */
+    public boolean descending(String field);
+
+    /**
+     * Gets index type.
+     *
+     * @return Type.
+     */
+    public IndexType type();
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexType.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexType.java b/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexType.java
new file mode 100644
index 0000000..dcab0a7
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexType.java
@@ -0,0 +1,24 @@
+/* @java.file.header */
+
+/*  _________        _____ __________________        _____
+ *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
+ *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
+ *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
+ *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
+ */
+
+package org.apache.ignite.spi.indexing;
+
+/**
+ * Index types.
+ */
+public enum IndexType {
+    /** Sorted SQL index. */
+    SORTED,
+
+    /** Spatial SQL index. */
+    GEO_SPATIAL,
+
+    /** Fulltext index. */
+    FULLTEXT
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingEntity.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingEntity.java b/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingEntity.java
new file mode 100644
index 0000000..0208b75
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingEntity.java
@@ -0,0 +1,50 @@
+/* @java.file.header */
+
+/*  _________        _____ __________________        _____
+ *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
+ *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
+ *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
+ *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
+ */
+
+package org.apache.ignite.spi.indexing;
+
+import org.apache.ignite.spi.*;
+import org.jetbrains.annotations.*;
+
+import java.util.*;
+
+/**
+ * Wrapper around indexed key or value which also may contain the value in
+ * unmarshalled form. It exists to avoid unnecessary unmarshalling whenever
+ * it is not needed.
+ * See also {@link IndexingSpi#queryFields(String, String, Collection, IndexingQueryFilter[])}.
+ */
+public interface IndexingEntity<T> {
+    /**
+     * Gets indexed value. This method may return {@code null} only
+     * if actual value is {@code null}. Otherwise, it will unmarshal
+     * the {@link #bytes()} and return the actual value.
+     *
+     * @return Indexed value.
+     * @throws org.apache.ignite.spi.IgniteSpiException If value de-serialization failed.
+     */
+    @Nullable public T value() throws IgniteSpiException;
+
+    /**
+     * Optional bytes for marshaled indexed value. Certain SPI implementations
+     * may keep objects in unmarshalled form and therefore will not provide
+     * marshaled bytes for them.
+     *
+     * @return Optional marshaled value.
+     */
+    @Nullable public byte[] bytes();
+
+    /**
+     * Flag indicating whether this entity contains unmarshalled value.
+     *
+     * @return {@code True} if entity contains unmarshalled value, {@code false}
+     *      otherwise.
+     */
+    public boolean hasValue();
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingEntityAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingEntityAdapter.java b/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingEntityAdapter.java
new file mode 100644
index 0000000..d0ca976
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingEntityAdapter.java
@@ -0,0 +1,57 @@
+/* @java.file.header */
+
+/*  _________        _____ __________________        _____
+ *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
+ *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
+ *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
+ *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
+ */
+
+package org.apache.ignite.spi.indexing;
+
+import org.gridgain.grid.util.typedef.internal.*;
+import org.gridgain.grid.util.tostring.*;
+import org.jetbrains.annotations.*;
+
+/**
+ * Convenience adapter for {@link IndexingEntity}.
+ */
+public class IndexingEntityAdapter<T> implements IndexingEntity<T> {
+    /** */
+    @GridToStringInclude
+    private final T val;
+
+    /** */
+    @GridToStringExclude
+    private final byte[] bytes;
+
+    /**
+     * @param val Value.
+     * @param bytes Value marshalled by {@link org.apache.ignite.marshaller.IgniteMarshaller}.
+     */
+    public IndexingEntityAdapter(T val, @Nullable byte[] bytes) {
+        this.val = val;
+        this.bytes = bytes;
+    }
+
+    /** {@inheritDoc} */
+    @Override public T value() {
+        return val;
+    }
+
+    /** {@inheritDoc} */
+    @Override public byte[] bytes() {
+        return bytes;
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean hasValue() {
+        return val != null || (val == null && bytes == null);
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(IndexingEntityAdapter.class, this,
+            "bytesLength", (bytes == null ? 0 : bytes.length));
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingFieldMetadata.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingFieldMetadata.java b/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingFieldMetadata.java
new file mode 100644
index 0000000..8b25c84
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingFieldMetadata.java
@@ -0,0 +1,46 @@
+/* @java.file.header */
+
+/*  _________        _____ __________________        _____
+ *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
+ *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
+ *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
+ *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
+ */
+
+package org.apache.ignite.spi.indexing;
+
+import java.io.*;
+
+/**
+ * Query field descriptor. This descriptor is used to provide metadata
+ * about fields returned in query result.
+ */
+public interface IndexingFieldMetadata extends Externalizable {
+    /**
+     * Gets schema name.
+     *
+     * @return Schema name.
+     */
+    public String schemaName();
+
+    /**
+     * Gets name of type to which this field belongs.
+     *
+     * @return Gets type name.
+     */
+    public String typeName();
+
+    /**
+     * Gets field name.
+     *
+     * @return Field name.
+     */
+    public String fieldName();
+
+    /**
+     * Gets field type name.
+     *
+     * @return Field type name.
+     */
+    public String fieldTypeName();
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingFieldsResult.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingFieldsResult.java b/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingFieldsResult.java
new file mode 100644
index 0000000..62e6ce1
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingFieldsResult.java
@@ -0,0 +1,35 @@
+/* @java.file.header */
+
+/*  _________        _____ __________________        _____
+ *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
+ *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
+ *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
+ *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
+ */
+
+package org.apache.ignite.spi.indexing;
+
+import org.apache.ignite.spi.*;
+
+import java.util.*;
+
+/**
+ * Field query result. It is composed of
+ * fields metadata and iterator over queried fields.
+ * See also {@link IndexingSpi#queryFields(String, String, Collection, IndexingQueryFilter)}.
+ */
+public interface IndexingFieldsResult {
+    /**
+     * Gets metadata for queried fields.
+     *
+     * @return Meta data for queried fields.
+     */
+    List<IndexingFieldMetadata> metaData();
+
+    /**
+     * Gets iterator over queried fields.
+     *
+     * @return Iterator over queried fields.
+     */
+    IgniteSpiCloseableIterator<List<IndexingEntity<?>>> iterator();
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingFieldsResultAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingFieldsResultAdapter.java b/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingFieldsResultAdapter.java
new file mode 100644
index 0000000..c583b76
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingFieldsResultAdapter.java
@@ -0,0 +1,49 @@
+/* @java.file.header */
+
+/*  _________        _____ __________________        _____
+ *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
+ *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
+ *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
+ *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
+ */
+
+package org.apache.ignite.spi.indexing;
+
+import org.apache.ignite.spi.*;
+import org.jetbrains.annotations.*;
+
+import java.util.*;
+
+/**
+ * Convenience adapter for {@link IndexingFieldsResult}.
+ */
+public class IndexingFieldsResultAdapter implements IndexingFieldsResult {
+    /** Meta data. */
+    private final List<IndexingFieldMetadata> metaData;
+
+    /** Result iterator. */
+    private final IgniteSpiCloseableIterator<List<IndexingEntity<?>>> it;
+
+    /**
+     * Creates query field result composed of field metadata and iterator
+     * over queried fields.
+     *
+     * @param metaData Meta data.
+     * @param it Result iterator.
+     */
+    public IndexingFieldsResultAdapter(@Nullable List<IndexingFieldMetadata> metaData,
+                                       IgniteSpiCloseableIterator<List<IndexingEntity<?>>> it) {
+        this.metaData = metaData != null ? Collections.unmodifiableList(metaData) : null;
+        this.it = it;
+    }
+
+    /** {@inheritDoc} */
+    @Override public List<IndexingFieldMetadata> metaData() {
+        return metaData;
+    }
+
+    /** {@inheritDoc} */
+    @Override public IgniteSpiCloseableIterator<List<IndexingEntity<?>>> iterator() {
+        return it;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingKeyValueRow.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingKeyValueRow.java b/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingKeyValueRow.java
new file mode 100644
index 0000000..7b075ed
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingKeyValueRow.java
@@ -0,0 +1,42 @@
+/* @java.file.header */
+
+/*  _________        _____ __________________        _____
+ *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
+ *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
+ *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
+ *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
+ */
+
+package org.apache.ignite.spi.indexing;
+
+import java.util.*;
+
+/**
+ * This class represents a single row returned by key-value query. For example, it is returned
+ * by query such as {@link IndexingSpi#query(String, String, Collection, IndexingTypeDescriptor, IndexingQueryFilter[])}
+ * method. Key-value queries are different from fields query in a way that they
+ * return the whole cached value, not its individual fields.
+ * See also {@link IndexingSpi#query(String, String, Collection, IndexingTypeDescriptor, IndexingQueryFilter[])}.
+ */
+public interface IndexingKeyValueRow<K, V> {
+    /**
+     * Gets cache key.
+     *
+     * @return Cache key.
+     */
+    public IndexingEntity<K> key();
+
+    /**
+     * Gets cache value.
+     *
+     * @return Cache value.
+     */
+    public IndexingEntity<V> value();
+
+    /**
+     * Gets version of cache value.
+     *
+     * @return Version of cache value.
+     */
+    public byte[] version();
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingKeyValueRowAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingKeyValueRowAdapter.java b/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingKeyValueRowAdapter.java
new file mode 100644
index 0000000..f703c51
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingKeyValueRowAdapter.java
@@ -0,0 +1,82 @@
+/* @java.file.header */
+
+/*  _________        _____ __________________        _____
+*  __  ____/___________(_)______  /__  ____/______ ____(_)_______
+*  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
+*  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
+*  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
+*/
+
+package org.apache.ignite.spi.indexing;
+
+import org.gridgain.grid.kernal.processors.cache.query.*;
+import org.gridgain.grid.util.typedef.internal.*;
+import org.gridgain.grid.util.tostring.*;
+import org.jetbrains.annotations.*;
+
+/**
+ * Convenience adapter for {@link IndexingKeyValueRow}.
+ */
+public class IndexingKeyValueRowAdapter<K, V> implements IndexingKeyValueRow<K, V> {
+    /** Key. */
+    @GridToStringInclude
+    private IndexingEntity<K> key;
+
+    /** Value. */
+    @GridToStringInclude
+    private IndexingEntity<V> val;
+
+    /** Version. */
+    @GridToStringInclude
+    private byte[] ver;
+
+    /**
+     * Constructor.
+     *
+     * @param key Key.
+     * @param val Value.
+     */
+    public IndexingKeyValueRowAdapter(K key, V val) {
+        assert key != null;
+        assert val != null;
+
+        this.key = new IndexingEntityAdapter<>(key, null);
+        this.val = new IndexingEntityAdapter<>(val, null);
+    }
+
+    /**
+     * Constructs query index row.
+     *
+     * @param key Key.
+     * @param val Value.
+     * @param ver Version. It is {@code null} in case of {@link GridCacheQueryType#SCAN} query.
+     */
+    public IndexingKeyValueRowAdapter(IndexingEntity<K> key, @Nullable IndexingEntity<V> val,
+                                      @Nullable byte[] ver) {
+        assert key != null;
+
+        this.key = key;
+        this.val = val;
+        this.ver = ver;
+    }
+
+    /** {@inheritDoc} */
+    @Override public IndexingEntity<K> key() {
+        return key;
+    }
+
+    /** {@inheritDoc} */
+    @Override public IndexingEntity<V> value() {
+        return val;
+    }
+
+    /** {@inheritDoc} */
+    @Override public byte[] version() {
+        return ver;
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(IndexingKeyValueRowAdapter.class, this);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingMarshaller.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingMarshaller.java b/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingMarshaller.java
new file mode 100644
index 0000000..e04c6a1
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingMarshaller.java
@@ -0,0 +1,38 @@
+/* @java.file.header */
+
+/*  _________        _____ __________________        _____
+ *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
+ *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
+ *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
+ *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
+ */
+
+package org.apache.ignite.spi.indexing;
+
+import org.apache.ignite.spi.*;
+
+/**
+ * Marshaller to be used in indexing SPI. This marshaller automatically
+ * takes care of class loading of unmarshalled classes.
+ * See also {@link IndexingSpi#registerMarshaller(IndexingMarshaller)}.
+ */
+public interface IndexingMarshaller {
+    /**
+     * Unmarshalls bytes to object.
+     *
+     * @param bytes Bytes.
+     * @param <T> Value type.
+     * @return Value.
+     * @throws org.apache.ignite.spi.IgniteSpiException If failed.
+     */
+    public <T> IndexingEntity<T> unmarshal(byte[] bytes) throws IgniteSpiException;
+
+    /**
+     * Marshals object to bytes.
+     *
+     * @param entity Entity.
+     * @return Bytes.
+     * @throws org.apache.ignite.spi.IgniteSpiException If failed.
+     */
+    public byte[] marshal(IndexingEntity<?> entity) throws IgniteSpiException;
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingQueryFilter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingQueryFilter.java b/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingQueryFilter.java
new file mode 100644
index 0000000..bbdcdf6
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingQueryFilter.java
@@ -0,0 +1,27 @@
+/* @java.file.header */
+
+/*  _________        _____ __________________        _____
+ *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
+ *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
+ *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
+ *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
+ */
+
+package org.apache.ignite.spi.indexing;
+
+import org.apache.ignite.lang.*;
+import org.gridgain.grid.*;
+import org.jetbrains.annotations.*;
+
+/**
+ * Space name and key filter.
+ */
+public interface IndexingQueryFilter {
+    /**
+     * Creates optional predicate for space.
+     *
+     * @param spaceName Space name.
+     * @return Predicate or {@code null} if no filtering is needed.
+     */
+    @Nullable public <K, V> IgniteBiPredicate<K, V> forSpace(String spaceName) throws GridException;
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/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..74de3dd
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingSpi.java
@@ -0,0 +1,188 @@
+/* @java.file.header */
+
+/*  _________        _____ __________________        _____
+ *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
+ *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
+ *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
+ *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
+ */
+
+package org.apache.ignite.spi.indexing;
+
+import org.apache.ignite.spi.*;
+import org.gridgain.grid.cache.*;
+import org.gridgain.grid.cache.query.*;
+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 SQL,
+ * TEXT or individual field queries against these indexes. Usually indexing SPI is used by caches by name
+ * (see {@link GridCacheConfiguration#getIndexingSpiName()}). Logically storage is organized into separate spaces.
+ * Usually cache name will be used as space name, so multiple caches can write to single indexing SPI instance.
+ * <p>
+ * Functionality of this SPI is exposed to {@link GridCacheQueries} interface:
+ * <ul>
+ *      <li>{@link GridCacheQueries#createSqlQuery(Class, String)}</li>
+ *      <li>{@link GridCacheQueries#createSqlFieldsQuery(String)}</li>
+ *      <li>{@link GridCacheQueries#createFullTextQuery(Class, String)}</li>
+ * </ul>
+ * <p>
+ * The default indexing SPI implementation is
+ * {@gglink org.gridgain.grid.spi.indexing.h2.GridH2IndexingSpi} which uses H2 database engine
+ * for data indexing and querying. User can implement his own indexing SPI and use his own data structures
+ * and query language instead of SQL. SPI can be configured for grid using {@link org.apache.ignite.configuration.IgniteConfiguration#getIndexingSpi()}.
+ * <p>
+ * GridGain comes with following built-in indexing SPI implementations:
+ * <ul>
+ *      <li>{@gglink org.gridgain.grid.spi.indexing.h2.GridH2IndexingSpi}</li>
+ * </ul>
+ * <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 GridGain 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.
+ */
+public interface IndexingSpi extends IgniteSpi {
+    /**
+     * Queries individual fields (generally used by JDBC drivers).
+     *
+     * @param spaceName Space name.
+     * @param qry Query.
+     * @param params Query parameters.
+     * @param filters Space name and key filters.
+     * @return Query result.
+     * @throws org.apache.ignite.spi.IgniteSpiException If failed.
+     */
+    public <K, V> IndexingFieldsResult queryFields(@Nullable String spaceName, String qry,
+        Collection<Object> params, IndexingQueryFilter filters) throws IgniteSpiException;
+
+    /**
+     * Executes regular query.
+     *
+     * @param spaceName Space name.
+     * @param qry Query.
+     * @param params Query parameters.
+     * @param type Query return type.
+     * @param filters Space name and key filters.
+     * @return Queried rows.
+     * @throws org.apache.ignite.spi.IgniteSpiException If failed.
+     */
+    public <K, V> IgniteSpiCloseableIterator<IndexingKeyValueRow<K, V>> query(@Nullable String spaceName, String qry,
+        Collection<Object> params, IndexingTypeDescriptor type, IndexingQueryFilter filters)
+        throws IgniteSpiException;
+
+    /**
+     * Executes text query.
+     *
+     * @param spaceName Space name.
+     * @param qry Text query.
+     * @param type Query return type.
+     * @param filters Space name and key filter.
+     * @return Queried rows.
+     * @throws org.apache.ignite.spi.IgniteSpiException If failed.
+     */
+    public <K, V> IgniteSpiCloseableIterator<IndexingKeyValueRow<K, V>> queryText(@Nullable String spaceName, String qry,
+        IndexingTypeDescriptor type, IndexingQueryFilter filters) throws IgniteSpiException;
+
+    /**
+     * Gets size of index for given type or -1 if it is a unknown type.
+     *
+     * @param spaceName Space name.
+     * @param desc Type descriptor.
+     * @return Objects number.
+     * @throws org.apache.ignite.spi.IgniteSpiException If failed.
+     */
+    public long size(@Nullable String spaceName, IndexingTypeDescriptor desc) throws IgniteSpiException;
+
+    /**
+     * Registers type if it was not known before or updates it otherwise.
+     *
+     * @param spaceName Space name.
+     * @param desc Type descriptor.
+     * @throws org.apache.ignite.spi.IgniteSpiException If failed.
+     * @return {@code True} if type was registered, {@code false} if for some reason it was rejected.
+     */
+    public boolean registerType(@Nullable String spaceName, IndexingTypeDescriptor desc) throws IgniteSpiException;
+
+    /**
+     * Unregisters type and removes all corresponding data.
+     *
+     * @param spaceName Space name.
+     * @param type Type descriptor.
+     * @throws org.apache.ignite.spi.IgniteSpiException If failed.
+     */
+    public void unregisterType(@Nullable String spaceName, IndexingTypeDescriptor type) 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 type Value type.
+     * @param key Key.
+     * @param val Value.
+     * @param ver Version.
+     * @param expirationTime Expiration time or 0 if never expires.
+     * @throws org.apache.ignite.spi.IgniteSpiException If failed.
+     */
+    public <K, V> void store(@Nullable String spaceName, IndexingTypeDescriptor type, IndexingEntity<K> key,
+        IndexingEntity<V> val, byte[] ver, long expirationTime) throws IgniteSpiException;
+
+    /**
+     * Removes index entry by key.
+     *
+     * @param spaceName Space name.
+     * @param key Key.
+     * @return {@code True} if removed by this operation, {@code false} otherwise.
+     * @throws org.apache.ignite.spi.IgniteSpiException If failed.
+     */
+    public <K> boolean remove(@Nullable String spaceName, IndexingEntity<K> key) throws IgniteSpiException;
+
+    /**
+     * Will be called when entry with given key is swapped.
+     *
+     * @param spaceName Space name.
+     * @param swapSpaceName Swap space name.
+     * @param key Key.
+     * @throws org.apache.ignite.spi.IgniteSpiException If failed.
+     */
+    public <K> void onSwap(@Nullable String spaceName, String swapSpaceName, K key) throws IgniteSpiException;
+
+    /**
+     * Will be called when entry with given key is unswapped.
+     *
+     * @param spaceName Space name.
+     * @param key Key.
+     * @param val Value.
+     * @param valBytes Value bytes.
+     * @throws org.apache.ignite.spi.IgniteSpiException If failed.
+     */
+    public <K, V> void onUnswap(@Nullable String spaceName, K key, V val, byte[] valBytes) throws IgniteSpiException;
+
+    /**
+     * Marshaller to be used by SPI.
+     *
+     * @param marshaller Marshaller.
+     */
+    public void registerMarshaller(IndexingMarshaller marshaller);
+
+    /**
+     * Registers space in this SPI.
+     *
+     * @param spaceName Space name.
+     * @throws org.apache.ignite.spi.IgniteSpiException If failed.
+     */
+    public void registerSpace(String spaceName) throws IgniteSpiException;
+
+    /**
+     * Rebuilds all indexes of given type.
+     *
+     * @param spaceName Space name.
+     * @param type Type descriptor.
+     */
+    public void rebuildIndexes(@Nullable String spaceName, IndexingTypeDescriptor type);
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingTypeDescriptor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingTypeDescriptor.java b/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingTypeDescriptor.java
new file mode 100644
index 0000000..3f96b1c
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/spi/indexing/IndexingTypeDescriptor.java
@@ -0,0 +1,84 @@
+/* @java.file.header */
+
+/*  _________        _____ __________________        _____
+ *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
+ *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
+ *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
+ *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
+ */
+
+package org.apache.ignite.spi.indexing;
+
+
+import org.apache.ignite.spi.*;
+
+import java.util.*;
+
+/**
+ * Value descriptor which allows to extract fields from value object of given type.
+ * See also {@link IndexingSpi#registerType(String, IndexingTypeDescriptor)}.
+ */
+public interface IndexingTypeDescriptor {
+    /**
+     * Gets type name which uniquely identifies this type.
+     *
+     * @return Type name which uniquely identifies this type.
+     */
+    public String name();
+
+    /**
+     * Gets mapping from values field name to its type.
+     *
+     * @return Fields that can be indexed, participate in queries and can be queried using
+     *      {@link IndexingSpi#queryFields(String, String, Collection, IndexingQueryFilter[])}
+     *      method.
+     */
+    public Map<String, Class<?>> valueFields();
+
+    /**
+     * Gets mapping from keys field name to its type.
+     *
+     * @return Fields that can be indexed, participate in queries and can be queried using
+     *      {@link IndexingSpi#queryFields(String, String, Collection, IndexingQueryFilter[])}
+     *      method.
+     */
+    public Map<String, Class<?>> keyFields();
+
+    /**
+     * Gets field value for given object.
+     *
+     * @param obj Object to get field value from.
+     * @param field Field name.
+     * @return Value for given field.
+     * @throws org.apache.ignite.spi.IgniteSpiException If failed.
+     */
+    public <T> T value(Object obj, String field) throws IgniteSpiException;
+
+    /**
+     * Gets indexes for this type.
+     *
+     * @return Indexes for this type.
+     */
+    public Map<String, IndexDescriptor> indexes();
+
+    /**
+     * Gets value class.
+     *
+     * @return Value class.
+     */
+    public Class<?> valueClass();
+
+    /**
+     * Gets key class.
+     *
+     * @return Key class.
+     */
+    public Class<?> keyClass();
+
+    /**
+     * Returns {@code true} if string representation of value should be indexed as text.
+     *
+     * @return If string representation of value should be full-text indexed.
+     */
+    public boolean valueTextIndex();
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/apache/ignite/spi/indexing/NoopIndexingSpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/indexing/NoopIndexingSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/indexing/NoopIndexingSpi.java
new file mode 100644
index 0000000..9fba743
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/spi/indexing/NoopIndexingSpi.java
@@ -0,0 +1,119 @@
+/* @java.file.header */
+
+/*  _________        _____ __________________        _____
+ *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
+ *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
+ *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
+ *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
+ */
+
+package org.apache.ignite.spi.indexing;
+
+import org.apache.ignite.*;
+import org.apache.ignite.resources.*;
+import org.apache.ignite.spi.*;
+import org.jetbrains.annotations.*;
+
+import java.util.*;
+
+/**
+ * No-op implementation of {@link IndexingSpi}, throws exception on query attempt.
+ */
+@IgniteSpiNoop
+public class NoopIndexingSpi extends IgniteSpiAdapter implements IndexingSpi {
+    /** */
+    @IgniteLoggerResource
+    private IgniteLogger log;
+
+    /** {@inheritDoc} */
+    @Override public <K, V> IndexingFieldsResult queryFields(@Nullable String spaceName, String qry,
+        Collection<Object> params, IndexingQueryFilter filters) throws IgniteSpiException {
+        throw spiException();
+    }
+
+    /** {@inheritDoc} */
+    @Override public <K, V> IgniteSpiCloseableIterator<IndexingKeyValueRow<K, V>> query(@Nullable String spaceName,
+        String qry, Collection<Object> params, IndexingTypeDescriptor type,
+        IndexingQueryFilter filters) throws IgniteSpiException {
+        throw spiException();
+    }
+
+    /** {@inheritDoc} */
+    @Override public <K, V> IgniteSpiCloseableIterator<IndexingKeyValueRow<K, V>> queryText(@Nullable
+        String spaceName, String qry, IndexingTypeDescriptor type, IndexingQueryFilter filters)
+        throws IgniteSpiException {
+        throw spiException();
+    }
+
+    /** {@inheritDoc} */
+    @Override public long size(@Nullable String spaceName, IndexingTypeDescriptor desc) throws IgniteSpiException {
+        throw spiException();
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean registerType(@Nullable String spaceName, IndexingTypeDescriptor desc)
+        throws IgniteSpiException {
+        return false;
+    }
+
+    /** {@inheritDoc} */
+    @Override public void unregisterType(@Nullable String spaceName, IndexingTypeDescriptor type)
+        throws IgniteSpiException {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @Override public <K, V> void store(@Nullable String spaceName, IndexingTypeDescriptor type,
+        IndexingEntity<K> key, IndexingEntity<V> val, byte[] ver, long expirationTime) throws IgniteSpiException {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @Override public <K> boolean remove(@Nullable String spaceName, IndexingEntity<K> key) throws IgniteSpiException {
+        return false;
+    }
+
+    /** {@inheritDoc} */
+    @Override public <K> void onSwap(@Nullable String spaceName, String swapSpaceName, K key) throws IgniteSpiException {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @Override public <K, V> void onUnswap(@Nullable String spaceName, K key, V val, byte[] valBytes)
+        throws IgniteSpiException {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @Override public void registerMarshaller(IndexingMarshaller marshaller) {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @Override public void registerSpace(String spaceName) throws IgniteSpiException {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @Override public void rebuildIndexes(@Nullable String spaceName, IndexingTypeDescriptor type) {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @Override public void spiStart(@Nullable String gridName) throws IgniteSpiException {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @Override public void spiStop() throws IgniteSpiException {
+        // No-op.
+    }
+
+    /**
+     * @return No-op SPI usage exception.
+     */
+    private IgniteSpiException spiException() {
+        return new IgniteSpiException("Current grid configuration does not support queries " +
+            "(please configure GridH2IndexingSpi).");
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/apache/ignite/spi/indexing/package.html
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/indexing/package.html b/modules/core/src/main/java/org/apache/ignite/spi/indexing/package.html
new file mode 100644
index 0000000..9929a70
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/spi/indexing/package.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+    @html.file.header
+    _________        _____ __________________        _____
+    __  ____/___________(_)______  /__  ____/______ ____(_)_______
+    _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
+    / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
+    \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
+-->
+<html>
+<body>
+    <!-- Package description. -->
+    Contains APIs for indexing SPI.
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheConfiguration.java b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheConfiguration.java
index 3e0b225..f2c5682 100644
--- a/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheConfiguration.java
+++ b/modules/core/src/main/java/org/gridgain/grid/cache/GridCacheConfiguration.java
@@ -1557,7 +1557,7 @@ public class GridCacheConfiguration {
      * SPI is configured. In majority of the cases default value should be used.
      *
      * @return Name of SPI to use for indexing.
-     * @see org.gridgain.grid.spi.indexing.IndexingSpi
+     * @see org.apache.ignite.spi.indexing.IndexingSpi
      */
     public String getIndexingSpiName() {
         return indexingSpiName;
@@ -1571,7 +1571,7 @@ public class GridCacheConfiguration {
      * SPI is configured. In majority of the cases default value should be used.
      *
      * @param indexingSpiName Name.
-     * @see org.gridgain.grid.spi.indexing.IndexingSpi
+     * @see org.apache.ignite.spi.indexing.IndexingSpi
      */
     public void setIndexingSpiName(String indexingSpiName) {
         this.indexingSpiName = indexingSpiName;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/gridgain/grid/kernal/GridGainEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridGainEx.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridGainEx.java
index 999a66f..12b2deb 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridGainEx.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridGainEx.java
@@ -23,6 +23,7 @@ import org.apache.ignite.mbean.*;
 import org.apache.ignite.spi.*;
 import org.apache.ignite.spi.authentication.*;
 import org.apache.ignite.spi.authentication.noop.*;
+import org.apache.ignite.spi.indexing.*;
 import org.apache.ignite.streamer.*;
 import org.apache.ignite.thread.*;
 import org.gridgain.grid.*;
@@ -47,7 +48,6 @@ import org.apache.ignite.spi.eventstorage.*;
 import org.apache.ignite.spi.eventstorage.memory.*;
 import org.apache.ignite.spi.failover.*;
 import org.apache.ignite.spi.failover.always.*;
-import org.gridgain.grid.spi.indexing.*;
 import org.gridgain.grid.spi.loadbalancing.*;
 import org.gridgain.grid.spi.loadbalancing.roundrobin.*;
 import org.gridgain.grid.spi.securesession.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/gridgain/grid/kernal/managers/indexing/GridIndexingManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/managers/indexing/GridIndexingManager.java b/modules/core/src/main/java/org/gridgain/grid/kernal/managers/indexing/GridIndexingManager.java
index 8599c68..3cbeea1 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/managers/indexing/GridIndexingManager.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/managers/indexing/GridIndexingManager.java
@@ -13,13 +13,13 @@ import org.apache.ignite.lang.*;
 import org.apache.ignite.marshaller.*;
 import org.apache.ignite.portables.*;
 import org.apache.ignite.spi.*;
+import org.apache.ignite.spi.indexing.*;
 import org.gridgain.grid.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.cache.query.*;
 import org.gridgain.grid.kernal.*;
 import org.gridgain.grid.kernal.managers.*;
 import org.gridgain.grid.kernal.processors.cache.*;
-import org.gridgain.grid.spi.indexing.*;
 import org.gridgain.grid.util.*;
 import org.gridgain.grid.util.future.*;
 import org.gridgain.grid.util.lang.*;
@@ -36,7 +36,7 @@ import java.util.*;
 import java.util.concurrent.*;
 import java.util.concurrent.atomic.*;
 
-import static org.gridgain.grid.spi.indexing.IndexType.*;
+import static org.apache.ignite.spi.indexing.IndexType.*;
 
 /**
  * Manages cache indexing.
@@ -1480,8 +1480,8 @@ public class GridIndexingManager extends GridManagerAdapter<IndexingSpi> {
         }
 
         /** {@inheritDoc} */
-        @Override public Map<String, org.gridgain.grid.spi.indexing.IndexDescriptor> indexes() {
-            return Collections.<String, org.gridgain.grid.spi.indexing.IndexDescriptor>unmodifiableMap(indexes);
+        @Override public Map<String, org.apache.ignite.spi.indexing.IndexDescriptor> indexes() {
+            return Collections.<String, org.apache.ignite.spi.indexing.IndexDescriptor>unmodifiableMap(indexes);
         }
 
         /**
@@ -1606,7 +1606,7 @@ public class GridIndexingManager extends GridManagerAdapter<IndexingSpi> {
     /**
      * Index descriptor.
      */
-    private static class IndexDescriptor implements org.gridgain.grid.spi.indexing.IndexDescriptor {
+    private static class IndexDescriptor implements org.apache.ignite.spi.indexing.IndexDescriptor {
         /** Fields sorted by order number. */
         private final Collection<T2<String, Integer>> fields = new TreeSet<>(
             new Comparator<T2<String, Integer>>() {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheDistributedFieldsQueryFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheDistributedFieldsQueryFuture.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheDistributedFieldsQueryFuture.java
index 4472798..67d8393 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheDistributedFieldsQueryFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheDistributedFieldsQueryFuture.java
@@ -11,8 +11,8 @@ package org.gridgain.grid.kernal.processors.cache.query;
 
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.lang.*;
+import org.apache.ignite.spi.indexing.*;
 import org.gridgain.grid.kernal.processors.cache.*;
-import org.gridgain.grid.spi.indexing.*;
 import org.gridgain.grid.util.future.*;
 import org.jetbrains.annotations.*;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheDistributedQueryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheDistributedQueryManager.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheDistributedQueryManager.java
index 45f9efe..ebbfa6c 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheDistributedQueryManager.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheDistributedQueryManager.java
@@ -12,11 +12,11 @@ package org.gridgain.grid.kernal.processors.cache.query;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.events.*;
 import org.apache.ignite.lang.*;
+import org.apache.ignite.spi.indexing.*;
 import org.gridgain.grid.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.cache.query.*;
 import org.gridgain.grid.kernal.managers.eventstorage.*;
-import org.gridgain.grid.spi.indexing.*;
 import org.gridgain.grid.util.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.typedef.internal.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheFieldsQueryErrorFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheFieldsQueryErrorFuture.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheFieldsQueryErrorFuture.java
index e1cc799..9834ff8 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheFieldsQueryErrorFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheFieldsQueryErrorFuture.java
@@ -10,8 +10,8 @@
 package org.gridgain.grid.kernal.processors.cache.query;
 
 import org.apache.ignite.lang.*;
+import org.apache.ignite.spi.indexing.*;
 import org.gridgain.grid.kernal.*;
-import org.gridgain.grid.spi.indexing.*;
 import org.gridgain.grid.util.future.*;
 
 import java.util.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheLocalFieldsQueryFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheLocalFieldsQueryFuture.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheLocalFieldsQueryFuture.java
index 475305f..cc8ed19 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheLocalFieldsQueryFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheLocalFieldsQueryFuture.java
@@ -10,8 +10,8 @@
 package org.gridgain.grid.kernal.processors.cache.query;
 
 import org.apache.ignite.lang.*;
+import org.apache.ignite.spi.indexing.*;
 import org.gridgain.grid.kernal.processors.cache.*;
-import org.gridgain.grid.spi.indexing.*;
 import org.gridgain.grid.util.future.*;
 import org.jetbrains.annotations.*;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheLocalQueryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheLocalQueryManager.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheLocalQueryManager.java
index ec3abac..85cab07 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheLocalQueryManager.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheLocalQueryManager.java
@@ -10,9 +10,9 @@
 package org.gridgain.grid.kernal.processors.cache.query;
 
 import org.apache.ignite.cluster.*;
+import org.apache.ignite.spi.indexing.*;
 import org.gridgain.grid.*;
 import org.gridgain.grid.cache.query.*;
-import org.gridgain.grid.spi.indexing.*;
 import org.jetbrains.annotations.*;
 
 import java.util.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryManager.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryManager.java
index 08e9556..d221c47 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryManager.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryManager.java
@@ -15,6 +15,7 @@ import org.apache.ignite.events.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.resources.*;
 import org.apache.ignite.spi.*;
+import org.apache.ignite.spi.indexing.*;
 import org.gridgain.grid.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.cache.query.*;
@@ -25,7 +26,6 @@ import org.gridgain.grid.kernal.processors.cache.*;
 import org.gridgain.grid.kernal.processors.cache.datastructures.*;
 import org.gridgain.grid.kernal.processors.cache.distributed.dht.*;
 import org.gridgain.grid.kernal.processors.task.*;
-import org.gridgain.grid.spi.indexing.*;
 import org.gridgain.grid.util.*;
 import org.gridgain.grid.util.future.*;
 import org.gridgain.grid.util.io.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryMetadataAware.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryMetadataAware.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryMetadataAware.java
index 030aee0..2507369 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryMetadataAware.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryMetadataAware.java
@@ -10,7 +10,7 @@
 package org.gridgain.grid.kernal.processors.cache.query;
 
 import org.apache.ignite.lang.*;
-import org.gridgain.grid.spi.indexing.*;
+import org.apache.ignite.spi.indexing.*;
 
 import java.util.*;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryResponse.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryResponse.java
index 377af43..0564d2a 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryResponse.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryResponse.java
@@ -10,10 +10,10 @@
 package org.gridgain.grid.kernal.processors.cache.query;
 
 import org.apache.ignite.spi.*;
+import org.apache.ignite.spi.indexing.*;
 import org.gridgain.grid.*;
 import org.gridgain.grid.kernal.*;
 import org.gridgain.grid.kernal.processors.cache.*;
-import org.gridgain.grid.spi.indexing.*;
 import org.gridgain.grid.util.direct.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.typedef.internal.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheSqlMetadata.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheSqlMetadata.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheSqlMetadata.java
index 4797878..cd47b0d 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheSqlMetadata.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheSqlMetadata.java
@@ -34,7 +34,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 org.gridgain.grid.spi.indexing.IndexingSpi}.
+     * of {@link org.apache.ignite.spi.indexing.IndexingSpi}.
      *
      * @return Collection of available types.
      */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/jdbc/GridCacheQueryJdbcTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/jdbc/GridCacheQueryJdbcTask.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/jdbc/GridCacheQueryJdbcTask.java
index 7ce674d..ccfadec 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/jdbc/GridCacheQueryJdbcTask.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/jdbc/GridCacheQueryJdbcTask.java
@@ -16,12 +16,12 @@ import org.apache.ignite.marshaller.*;
 import org.apache.ignite.marshaller.jdk.*;
 import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.resources.*;
+import org.apache.ignite.spi.indexing.*;
 import org.gridgain.grid.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.cache.query.*;
 import org.gridgain.grid.kernal.*;
 import org.gridgain.grid.kernal.processors.cache.query.*;
-import org.gridgain.grid.spi.indexing.*;
 import org.gridgain.grid.util.lang.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.typedef.internal.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/gridgain/grid/kernal/visor/query/VisorQueryTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/visor/query/VisorQueryTask.java b/modules/core/src/main/java/org/gridgain/grid/kernal/visor/query/VisorQueryTask.java
index 6b9d546..87ce34b 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/visor/query/VisorQueryTask.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/visor/query/VisorQueryTask.java
@@ -19,7 +19,7 @@ import org.gridgain.grid.kernal.processors.task.GridInternal;
 import org.gridgain.grid.kernal.processors.timeout.GridTimeoutObjectAdapter;
 import org.gridgain.grid.kernal.visor.*;
 import org.apache.ignite.lang.IgniteBiTuple;
-import org.gridgain.grid.spi.indexing.IndexingFieldMetadata;
+import org.apache.ignite.spi.indexing.IndexingFieldMetadata;
 import org.gridgain.grid.util.typedef.internal.*;
 
 import java.io.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexDescriptor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexDescriptor.java b/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexDescriptor.java
deleted file mode 100644
index 7fecd56..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexDescriptor.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid.spi.indexing;
-
-import java.util.*;
-
-/**
- * Describes an index to be created for a certain type. It contains all necessary
- * information about fields, order, uniqueness, and specified
- * whether this is SQL or Text index.
- * See also {@link IndexingTypeDescriptor#indexes()}.
- */
-public interface IndexDescriptor {
-    /**
-     * Gets all fields to be indexed.
-     *
-     * @return Fields to be indexed.
-     */
-    public Collection<String> fields();
-
-    /**
-     * Specifies order of the index for each indexed field.
-     *
-     * @param field Field name.
-     * @return {@code True} if given field should be indexed in descending order.
-     */
-    public boolean descending(String field);
-
-    /**
-     * Gets index type.
-     *
-     * @return Type.
-     */
-    public IndexType type();
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexType.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexType.java b/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexType.java
deleted file mode 100644
index f7f0ea2..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexType.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid.spi.indexing;
-
-/**
- * Index types.
- */
-public enum IndexType {
-    /** Sorted SQL index. */
-    SORTED,
-
-    /** Spatial SQL index. */
-    GEO_SPATIAL,
-
-    /** Fulltext index. */
-    FULLTEXT
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexingEntity.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexingEntity.java b/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexingEntity.java
deleted file mode 100644
index 556d4f0..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexingEntity.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid.spi.indexing;
-
-import org.apache.ignite.spi.*;
-import org.jetbrains.annotations.*;
-
-import java.util.*;
-
-/**
- * Wrapper around indexed key or value which also may contain the value in
- * unmarshalled form. It exists to avoid unnecessary unmarshalling whenever
- * it is not needed.
- * See also {@link IndexingSpi#queryFields(String, String, Collection, IndexingQueryFilter[])}.
- */
-public interface IndexingEntity<T> {
-    /**
-     * Gets indexed value. This method may return {@code null} only
-     * if actual value is {@code null}. Otherwise, it will unmarshal
-     * the {@link #bytes()} and return the actual value.
-     *
-     * @return Indexed value.
-     * @throws org.apache.ignite.spi.IgniteSpiException If value de-serialization failed.
-     */
-    @Nullable public T value() throws IgniteSpiException;
-
-    /**
-     * Optional bytes for marshaled indexed value. Certain SPI implementations
-     * may keep objects in unmarshalled form and therefore will not provide
-     * marshaled bytes for them.
-     *
-     * @return Optional marshaled value.
-     */
-    @Nullable public byte[] bytes();
-
-    /**
-     * Flag indicating whether this entity contains unmarshalled value.
-     *
-     * @return {@code True} if entity contains unmarshalled value, {@code false}
-     *      otherwise.
-     */
-    public boolean hasValue();
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexingEntityAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexingEntityAdapter.java b/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexingEntityAdapter.java
deleted file mode 100644
index 1effa99..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexingEntityAdapter.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid.spi.indexing;
-
-import org.gridgain.grid.util.typedef.internal.*;
-import org.gridgain.grid.util.tostring.*;
-import org.jetbrains.annotations.*;
-
-/**
- * Convenience adapter for {@link IndexingEntity}.
- */
-public class IndexingEntityAdapter<T> implements IndexingEntity<T> {
-    /** */
-    @GridToStringInclude
-    private final T val;
-
-    /** */
-    @GridToStringExclude
-    private final byte[] bytes;
-
-    /**
-     * @param val Value.
-     * @param bytes Value marshalled by {@link org.apache.ignite.marshaller.IgniteMarshaller}.
-     */
-    public IndexingEntityAdapter(T val, @Nullable byte[] bytes) {
-        this.val = val;
-        this.bytes = bytes;
-    }
-
-    /** {@inheritDoc} */
-    @Override public T value() {
-        return val;
-    }
-
-    /** {@inheritDoc} */
-    @Override public byte[] bytes() {
-        return bytes;
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean hasValue() {
-        return val != null || (val == null && bytes == null);
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(IndexingEntityAdapter.class, this,
-            "bytesLength", (bytes == null ? 0 : bytes.length));
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexingFieldMetadata.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexingFieldMetadata.java b/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexingFieldMetadata.java
deleted file mode 100644
index f530b20..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexingFieldMetadata.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid.spi.indexing;
-
-import java.io.*;
-
-/**
- * Query field descriptor. This descriptor is used to provide metadata
- * about fields returned in query result.
- */
-public interface IndexingFieldMetadata extends Externalizable {
-    /**
-     * Gets schema name.
-     *
-     * @return Schema name.
-     */
-    public String schemaName();
-
-    /**
-     * Gets name of type to which this field belongs.
-     *
-     * @return Gets type name.
-     */
-    public String typeName();
-
-    /**
-     * Gets field name.
-     *
-     * @return Field name.
-     */
-    public String fieldName();
-
-    /**
-     * Gets field type name.
-     *
-     * @return Field type name.
-     */
-    public String fieldTypeName();
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexingFieldsResult.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexingFieldsResult.java b/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexingFieldsResult.java
deleted file mode 100644
index ede3278..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexingFieldsResult.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid.spi.indexing;
-
-import org.apache.ignite.spi.*;
-
-import java.util.*;
-
-/**
- * Field query result. It is composed of
- * fields metadata and iterator over queried fields.
- * See also {@link IndexingSpi#queryFields(String, String, Collection, IndexingQueryFilter)}.
- */
-public interface IndexingFieldsResult {
-    /**
-     * Gets metadata for queried fields.
-     *
-     * @return Meta data for queried fields.
-     */
-    List<IndexingFieldMetadata> metaData();
-
-    /**
-     * Gets iterator over queried fields.
-     *
-     * @return Iterator over queried fields.
-     */
-    IgniteSpiCloseableIterator<List<IndexingEntity<?>>> iterator();
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexingFieldsResultAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexingFieldsResultAdapter.java b/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexingFieldsResultAdapter.java
deleted file mode 100644
index 348f344..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexingFieldsResultAdapter.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid.spi.indexing;
-
-import org.apache.ignite.spi.*;
-import org.jetbrains.annotations.*;
-
-import java.util.*;
-
-/**
- * Convenience adapter for {@link IndexingFieldsResult}.
- */
-public class IndexingFieldsResultAdapter implements IndexingFieldsResult {
-    /** Meta data. */
-    private final List<IndexingFieldMetadata> metaData;
-
-    /** Result iterator. */
-    private final IgniteSpiCloseableIterator<List<IndexingEntity<?>>> it;
-
-    /**
-     * Creates query field result composed of field metadata and iterator
-     * over queried fields.
-     *
-     * @param metaData Meta data.
-     * @param it Result iterator.
-     */
-    public IndexingFieldsResultAdapter(@Nullable List<IndexingFieldMetadata> metaData,
-                                       IgniteSpiCloseableIterator<List<IndexingEntity<?>>> it) {
-        this.metaData = metaData != null ? Collections.unmodifiableList(metaData) : null;
-        this.it = it;
-    }
-
-    /** {@inheritDoc} */
-    @Override public List<IndexingFieldMetadata> metaData() {
-        return metaData;
-    }
-
-    /** {@inheritDoc} */
-    @Override public IgniteSpiCloseableIterator<List<IndexingEntity<?>>> iterator() {
-        return it;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexingKeyValueRow.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexingKeyValueRow.java b/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexingKeyValueRow.java
deleted file mode 100644
index 841130e..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexingKeyValueRow.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid.spi.indexing;
-
-import java.util.*;
-
-/**
- * This class represents a single row returned by key-value query. For example, it is returned
- * by query such as {@link IndexingSpi#query(String, String, Collection, IndexingTypeDescriptor, IndexingQueryFilter[])}
- * method. Key-value queries are different from fields query in a way that they
- * return the whole cached value, not its individual fields.
- * See also {@link IndexingSpi#query(String, String, Collection, IndexingTypeDescriptor, IndexingQueryFilter[])}.
- */
-public interface IndexingKeyValueRow<K, V> {
-    /**
-     * Gets cache key.
-     *
-     * @return Cache key.
-     */
-    public IndexingEntity<K> key();
-
-    /**
-     * Gets cache value.
-     *
-     * @return Cache value.
-     */
-    public IndexingEntity<V> value();
-
-    /**
-     * Gets version of cache value.
-     *
-     * @return Version of cache value.
-     */
-    public byte[] version();
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexingKeyValueRowAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexingKeyValueRowAdapter.java b/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexingKeyValueRowAdapter.java
deleted file mode 100644
index 8b95aa3..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexingKeyValueRowAdapter.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
-*  __  ____/___________(_)______  /__  ____/______ ____(_)_______
-*  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
-*  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
-*  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
-*/
-
-package org.gridgain.grid.spi.indexing;
-
-import org.gridgain.grid.kernal.processors.cache.query.*;
-import org.gridgain.grid.util.typedef.internal.*;
-import org.gridgain.grid.util.tostring.*;
-import org.jetbrains.annotations.*;
-
-/**
- * Convenience adapter for {@link IndexingKeyValueRow}.
- */
-public class IndexingKeyValueRowAdapter<K, V> implements IndexingKeyValueRow<K, V> {
-    /** Key. */
-    @GridToStringInclude
-    private IndexingEntity<K> key;
-
-    /** Value. */
-    @GridToStringInclude
-    private IndexingEntity<V> val;
-
-    /** Version. */
-    @GridToStringInclude
-    private byte[] ver;
-
-    /**
-     * Constructor.
-     *
-     * @param key Key.
-     * @param val Value.
-     */
-    public IndexingKeyValueRowAdapter(K key, V val) {
-        assert key != null;
-        assert val != null;
-
-        this.key = new IndexingEntityAdapter<>(key, null);
-        this.val = new IndexingEntityAdapter<>(val, null);
-    }
-
-    /**
-     * Constructs query index row.
-     *
-     * @param key Key.
-     * @param val Value.
-     * @param ver Version. It is {@code null} in case of {@link GridCacheQueryType#SCAN} query.
-     */
-    public IndexingKeyValueRowAdapter(IndexingEntity<K> key, @Nullable IndexingEntity<V> val,
-                                      @Nullable byte[] ver) {
-        assert key != null;
-
-        this.key = key;
-        this.val = val;
-        this.ver = ver;
-    }
-
-    /** {@inheritDoc} */
-    @Override public IndexingEntity<K> key() {
-        return key;
-    }
-
-    /** {@inheritDoc} */
-    @Override public IndexingEntity<V> value() {
-        return val;
-    }
-
-    /** {@inheritDoc} */
-    @Override public byte[] version() {
-        return ver;
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(IndexingKeyValueRowAdapter.class, this);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexingMarshaller.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexingMarshaller.java b/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexingMarshaller.java
deleted file mode 100644
index 403b871..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexingMarshaller.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid.spi.indexing;
-
-import org.apache.ignite.spi.*;
-
-/**
- * Marshaller to be used in indexing SPI. This marshaller automatically
- * takes care of class loading of unmarshalled classes.
- * See also {@link IndexingSpi#registerMarshaller(IndexingMarshaller)}.
- */
-public interface IndexingMarshaller {
-    /**
-     * Unmarshalls bytes to object.
-     *
-     * @param bytes Bytes.
-     * @param <T> Value type.
-     * @return Value.
-     * @throws org.apache.ignite.spi.IgniteSpiException If failed.
-     */
-    public <T> IndexingEntity<T> unmarshal(byte[] bytes) throws IgniteSpiException;
-
-    /**
-     * Marshals object to bytes.
-     *
-     * @param entity Entity.
-     * @return Bytes.
-     * @throws org.apache.ignite.spi.IgniteSpiException If failed.
-     */
-    public byte[] marshal(IndexingEntity<?> entity) throws IgniteSpiException;
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/12837f35/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexingQueryFilter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexingQueryFilter.java b/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexingQueryFilter.java
deleted file mode 100644
index 4424734..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/spi/indexing/IndexingQueryFilter.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid.spi.indexing;
-
-import org.apache.ignite.lang.*;
-import org.gridgain.grid.*;
-import org.jetbrains.annotations.*;
-
-/**
- * Space name and key filter.
- */
-public interface IndexingQueryFilter {
-    /**
-     * Creates optional predicate for space.
-     *
-     * @param spaceName Space name.
-     * @return Predicate or {@code null} if no filtering is needed.
-     */
-    @Nullable public <K, V> IgniteBiPredicate<K, V> forSpace(String spaceName) throws GridException;
-}


Mime
View raw message