ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [03/50] incubator-ignite git commit: #ignite-738: remove CacheQueries
Date Thu, 16 Apr 2015 09:49:21 GMT
#ignite-738: remove CacheQueries


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

Branch: refs/heads/ignite-424
Commit: 540299bfa588942cc1cd546d38dcb4b731cc2f55
Parents: 8b68ff1
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Tue Apr 14 10:18:47 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Tue Apr 14 10:18:47 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/cache/query/QueryMetrics.java |  4 +-
 .../processors/cache/CacheProjection.java       |  2 +-
 .../processors/cache/GridCacheAdapter.java      |  4 +-
 .../cache/GridCacheProjectionImpl.java          |  4 +-
 .../processors/cache/GridCacheProxyImpl.java    |  4 +-
 .../processors/cache/query/CacheQueries.java    | 70 --------------------
 .../processors/cache/query/CacheQuery.java      |  4 +-
 .../cache/query/GridCacheQueriesEx.java         | 39 ++++++++++-
 .../cache/query/GridCacheQueriesImpl.java       |  2 +-
 9 files changed, 49 insertions(+), 84 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/540299bf/modules/core/src/main/java/org/apache/ignite/cache/query/QueryMetrics.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/QueryMetrics.java b/modules/core/src/main/java/org/apache/ignite/cache/query/QueryMetrics.java
index 1d1eed1..e7518bf 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/query/QueryMetrics.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/query/QueryMetrics.java
@@ -21,8 +21,8 @@ import org.apache.ignite.internal.processors.cache.query.*;
 
 /**
  * Cache query metrics used to obtain statistics on query. You can get metrics for
- * particular query via {@link org.apache.ignite.internal.processors.cache.query.CacheQuery#metrics()}
method or accumulated metrics
- * for all queries via {@link org.apache.ignite.internal.processors.cache.query.CacheQueries#metrics()}.
+ * particular query via {@link CacheQuery#metrics()} method or accumulated metrics
+ * for all queries via {@link GridCacheQueriesEx#metrics()}.
  */
 public interface QueryMetrics {
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/540299bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheProjection.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheProjection.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheProjection.java
index 87af7fa..4499281 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheProjection.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheProjection.java
@@ -205,7 +205,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K,
V>> {
 
      * @return Queries facade responsible for creating various SQL, TEXT, or SCAN queries.
      */
-    public CacheQueries<K, V> queries();
+    public GridCacheQueriesEx<K, V> queries();
 
     /**
      * @param skipStore Skip store flag.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/540299bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index acccd53..19513ae 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@ -170,7 +170,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
     protected IgniteLogger log;
 
     /** Queries impl. */
-    private CacheQueries<K, V> qry;
+    private GridCacheQueriesEx<K, V> qry;
 
     /** Affinity impl. */
     private Affinity<K> aff;
@@ -356,7 +356,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
     public abstract GridCachePreloader<K, V> preloader();
 
     /** {@inheritDoc} */
-    @Override public CacheQueries<K, V> queries() {
+    @Override public GridCacheQueriesEx<K, V> queries() {
         return qry;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/540299bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
index 7358aed..d8b554a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
@@ -53,7 +53,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K,
V
     private GridCacheContext<K, V> cctx;
 
     /** Queries impl. */
-    private CacheQueries<K, V> qry;
+    private GridCacheQueriesEx<K, V> qry;
 
     /** Skip store. */
     @GridToStringInclude
@@ -138,7 +138,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K,
V
     }
 
     /** {@inheritDoc} */
-    @Override public CacheQueries<K, V> queries() {
+    @Override public GridCacheQueriesEx<K, V> queries() {
         return qry;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/540299bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
index 334503f..84053ee 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
@@ -66,7 +66,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K,
V>, Externali
     private GridCacheProjectionImpl<K, V> prj;
 
     /** Cache queries. */
-    private CacheQueries<K, V> qry;
+    private GridCacheQueriesEx<K, V> qry;
 
     /** Affinity. */
     private Affinity<K> aff;
@@ -143,7 +143,7 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K,
V>, Externali
     }
 
     /** {@inheritDoc} */
-    @Override public CacheQueries<K, V> queries() {
+    @Override public GridCacheQueriesEx<K, V> queries() {
         return qry;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/540299bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueries.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueries.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueries.java
deleted file mode 100644
index 4843986..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueries.java
+++ /dev/null
@@ -1,70 +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.internal.processors.cache.query;
-
-import org.apache.ignite.cache.query.*;
-import org.apache.ignite.lang.*;
-import org.jetbrains.annotations.*;
-
-import java.util.*;
-
-/**
- * Facade for creating distributed queries. It contains various {@code 'createXxxQuery(..)'}
- * methods for {@code SQL}, {@code TEXT}, and {@code SCAN} query creation (see {@link CacheQuery}
- * for more information).
- * <p>
- * Instance of {@code CacheQueries} is obtained from cache projection as follows:
- * <pre name="code" class="java">
- * CacheQueries q = Ignition.ignite().cache("myCache").queries();
- * </pre>
- */
-public interface CacheQueries<K, V> {
-    /**
-     * Creates user's SQL fields query for given clause. For more information refer to
-     * {@link CacheQuery} documentation.
-     *
-     * @param qry Query.
-     * @return Created query.
-     */
-    public CacheQuery<List<?>> createSqlFieldsQuery(String qry);
-
-    /**
-     * Creates user's full text query, queried class, and query clause.
-     * For more information refer to {@link CacheQuery} documentation.
-     *
-     * @param clsName Query class name.
-     * @param search Search clause.
-     * @return Created query.
-     */
-    public CacheQuery<Map.Entry<K, V>> createFullTextQuery(String clsName, String
search);
-
-    /**
-     * Creates user's predicate based scan query.
-     *
-     * @param filter Scan filter.
-     * @return Created query.
-     */
-    public CacheQuery<Map.Entry<K, V>> createScanQuery(@Nullable IgniteBiPredicate<K,
V> filter);
-
-    /**
-     * Accumulated metrics for all queries executed for this cache.
-     *
-     * @return Cache query metrics.
-     */
-    public QueryMetrics metrics();
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/540299bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQuery.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQuery.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQuery.java
index 93576ab..c086a0e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQuery.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQuery.java
@@ -26,7 +26,7 @@ import org.jetbrains.annotations.*;
 /**
  * Main API for configuring and executing cache queries.
  * <p>
- * Cache queries are created from {@link CacheQueries} API via any of the available
+ * Cache queries are created from {@link GridCacheQueriesEx} API via any of the available
  * {@code createXXXQuery(...)} methods.
  * <h1 class="header">SQL Queries</h1>
  * {@code SQL} query allows to execute distributed cache
@@ -60,7 +60,7 @@ import org.jetbrains.annotations.*;
  * Sometimes when it is known in advance that SQL query will cause a full data scan, or whenever
data set
  * is relatively small, the full scan query may be used. This query will iterate over all
cache
  * entries, skipping over entries that don't pass the optionally provided key-value filter
- * (see {@link CacheQueries#createScanQuery(org.apache.ignite.lang.IgniteBiPredicate)} method).
+ * (see {@link GridCacheQueriesEx#createScanQuery(org.apache.ignite.lang.IgniteBiPredicate)}
method).
  * <h2 class="header">Limitations</h2>
  * Data in Ignite cache is usually distributed across several nodes,
  * so some queries may not work as expected. Keep in mind following limitations

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/540299bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesEx.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesEx.java
index 738e6cf..5840070 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueriesEx.java
@@ -19,14 +19,49 @@ package org.apache.ignite.internal.processors.cache.query;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.query.*;
-import org.apache.ignite.internal.*;
+import org.apache.ignite.lang.*;
+import org.jetbrains.annotations.*;
 
 import java.util.*;
 
 /**
  * Extended queries interface.
  */
-public interface GridCacheQueriesEx<K, V> extends CacheQueries<K, V> {
+public interface GridCacheQueriesEx<K, V> {
+    /**
+     * Creates user's SQL fields query for given clause. For more information refer to
+     * {@link CacheQuery} documentation.
+     *
+     * @param qry Query.
+     * @return Created query.
+     */
+    public CacheQuery<List<?>> createSqlFieldsQuery(String qry);
+
+    /**
+     * Creates user's full text query, queried class, and query clause.
+     * For more information refer to {@link CacheQuery} documentation.
+     *
+     * @param clsName Query class name.
+     * @param search Search clause.
+     * @return Created query.
+     */
+    public CacheQuery<Map.Entry<K, V>> createFullTextQuery(String clsName, String
search);
+
+    /**
+     * Creates user's predicate based scan query.
+     *
+     * @param filter Scan filter.
+     * @return Created query.
+     */
+    public CacheQuery<Map.Entry<K, V>> createScanQuery(@Nullable IgniteBiPredicate<K,
V> filter);
+
+    /**
+     * Accumulated metrics for all queries executed for this cache.
+     *
+     * @return Cache query metrics.
+     */
+    public QueryMetrics metrics();
+
     /**
      * Gets SQL metadata.
      *

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/540299bf/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 22fa43a..91ac680 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
@@ -31,7 +31,7 @@ import java.util.*;
 import static org.apache.ignite.internal.processors.cache.query.GridCacheQueryType.*;
 
 /**
- * {@link CacheQueries} implementation.
+ * {@link GridCacheQueriesEx} implementation.
  */
 public class GridCacheQueriesImpl<K, V> implements GridCacheQueriesEx<K, V> {
     /** */


Mime
View raw message