#ignite-758: 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/6cf3da66 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/6cf3da66 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/6cf3da66 Branch: refs/heads/ignite-737 Commit: 6cf3da663d237f1bd86c141f9d3be6a5b988081f Parents: 34b5b51 Author: ivasilinets <ivasilin...@gridgain.com> Authored: Thu Apr 16 23:28:22 2015 +0300 Committer: ivasilinets <ivasilin...@gridgain.com> Committed: Thu Apr 16 23:28:22 2015 +0300 ---------------------------------------------------------------------- .../processors/cache/GridCacheAdapter.java | 14 ------ .../processors/cache/GridCacheProxyImpl.java | 16 ------- .../processors/cache/IgniteCacheProxy.java | 3 -- .../processors/cache/IgniteInternalCache.java | 12 ----- .../processors/cache/query/CacheQueries.java | 29 ------------ .../cache/query/CacheQueriesImpl.java | 50 -------------------- .../processors/cache/query/CacheQuery.java | 5 +- 7 files changed, 1 insertion(+), 128 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6cf3da66/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 9938cbc..24da97b 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 @@ -168,9 +168,6 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V /** Logger. */ protected IgniteLogger log; - /** Queries impl. */ - private CacheQueries<K, V> qry; - /** Affinity impl. */ private Affinity<K> aff; @@ -274,15 +271,9 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V init(); - qry = new CacheQueriesImpl<>(ctx, false); aff = new GridCacheAffinityImpl<>(ctx); } - /** {@inheritDoc} */ - @Override public void setQueryKeepPortable() { - qry = new CacheQueriesImpl<>(ctx, true); - } - /** * Prints memory stats. */ @@ -360,11 +351,6 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V public abstract GridCachePreloader<K, V> preloader(); /** {@inheritDoc} */ - @Override public CacheQueries<K, V> queries() { - return qry; - } - - /** {@inheritDoc} */ @Override public Affinity<K> affinity() { return aff; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6cf3da66/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 3f0e420..3db0a8f 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 @@ -24,7 +24,6 @@ import org.apache.ignite.configuration.*; import org.apache.ignite.internal.*; import org.apache.ignite.internal.processors.cache.affinity.*; import org.apache.ignite.internal.processors.cache.dr.*; -import org.apache.ignite.internal.processors.cache.query.*; import org.apache.ignite.internal.processors.cache.transactions.*; import org.apache.ignite.internal.processors.cache.version.*; import org.apache.ignite.internal.util.tostring.*; @@ -65,9 +64,6 @@ public class GridCacheProxyImpl<K, V> implements IgniteInternalCache<K, V>, Exte @GridToStringExclude private CacheOperationContext prj; - /** Cache queries. */ - private CacheQueries<K, V> qry; - /** Affinity. */ private Affinity<K> aff; @@ -95,7 +91,6 @@ public class GridCacheProxyImpl<K, V> implements IgniteInternalCache<K, V>, Exte gate = ctx.gate(); cache = ctx.cache(); - qry = new CacheQueriesImpl<>(ctx, prj != null ? prj.isKeepPortable() : false); aff = new GridCacheAffinityProxy<>(ctx, ctx.cache().affinity()); } @@ -143,16 +138,6 @@ public class GridCacheProxyImpl<K, V> implements IgniteInternalCache<K, V>, Exte } /** {@inheritDoc} */ - @Override public void setQueryKeepPortable() { - qry = new CacheQueriesImpl<>(ctx, true); - } - - /** {@inheritDoc} */ - @Override public CacheQueries<K, V> queries() { - return qry; - } - - /** {@inheritDoc} */ @Override public Affinity<K> affinity() { return aff; } @@ -1575,7 +1560,6 @@ public class GridCacheProxyImpl<K, V> implements IgniteInternalCache<K, V>, Exte gate = ctx.gate(); cache = ctx.cache(); - qry = new CacheQueriesImpl<>(ctx, prj != null ? prj.isKeepPortable() : false); aff = new GridCacheAffinityProxy<>(ctx, ctx.cache().affinity()); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6cf3da66/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java index e5add1d..9d1248b 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java @@ -110,9 +110,6 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V this.delegate = delegate; this.prjCtx = prjCtx; - if (prjCtx != null && prjCtx.isKeepPortable()) - delegate.setQueryKeepPortable(); - gate = ctx.gate(); legacyProxy = new GridCacheProxyImpl<>(ctx, delegate, prjCtx); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6cf3da66/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java index 6a46f9c..89da6af 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java @@ -208,18 +208,6 @@ public interface IgniteInternalCache<K, V> extends Iterable<Cache.Entry<K, V>> { public boolean skipStore(); /** - * Set keep portable flag for queries. - */ - public void setQueryKeepPortable(); - - /** - * Returns queries facade responsible for creating various SQL, TEXT, or SCAN queries. - - * @return Queries facade responsible for creating various SQL, TEXT, or SCAN queries. - */ - public CacheQueries<K, V> queries(); - - /** * @param skipStore Skip store flag. * @return New projection based on this one, but with skip store flag enabled. */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6cf3da66/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 0fe373a..0000000 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueries.java +++ /dev/null @@ -1,29 +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.lang.*; -import org.jetbrains.annotations.*; - -import java.util.*; - -/** - * Internal queries interface. - */ -public interface CacheQueries<K, V> { -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6cf3da66/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueriesImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueriesImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueriesImpl.java deleted file mode 100644 index 99017cd..0000000 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/CacheQueriesImpl.java +++ /dev/null @@ -1,50 +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.internal.processors.cache.*; -import org.apache.ignite.internal.util.typedef.internal.*; -import org.apache.ignite.lang.*; -import org.apache.ignite.spi.indexing.*; -import org.jetbrains.annotations.*; - -import java.util.*; - -import static org.apache.ignite.internal.processors.cache.query.GridCacheQueryType.*; - -/** - * {@link CacheQueries} implementation. - */ -public class CacheQueriesImpl<K, V> implements CacheQueries<K, V> { - /** */ - private GridCacheContext<K, V> ctx; - - /** */ - private boolean keepPortable; - - /** - * @param ctx Context. - * @param keepPortable Keep portable flag. - */ - public CacheQueriesImpl(GridCacheContext<K, V> ctx, boolean keepPortable) { - assert ctx != null; - - this.ctx = ctx; - this.keepPortable = keepPortable; - } -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6cf3da66/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 bab6db6..0658828 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 @@ -27,8 +27,6 @@ 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 - * {@code createXXXQuery(...)} methods. * <h1 class="header">SQL Queries</h1> * {@code SQL} query allows to execute distributed cache * queries using standard SQL syntax. All values participating in where clauses @@ -60,8 +58,7 @@ import org.jetbrains.annotations.*; * <h1 class="header">Scan Queries</h1> * 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). + * entries, skipping over entries that don't pass the optionally provided key-value filter. * <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