ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [45/46] incubator-ignite git commit: ignite-sql-tests - continuous
Date Wed, 25 Feb 2015 00:37:08 GMT
ignite-sql-tests - continuous


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

Branch: refs/heads/ignite-sql-tests
Commit: 9ed2a39bd6aba5db40b29141a5994d29576f8f39
Parents: 550e5d8
Author: S.Vladykin <svladykin@gridgain.com>
Authored: Wed Feb 25 02:48:45 2015 +0300
Committer: S.Vladykin <svladykin@gridgain.com>
Committed: Wed Feb 25 02:48:45 2015 +0300

----------------------------------------------------------------------
 .../internal/processors/cache/IgniteCacheProxy.java       | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9ed2a39b/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 de51af6..cdb1875 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
@@ -392,6 +392,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K,
V
     }
 
     /** {@inheritDoc} */
+    @SuppressWarnings("unchecked")
     @Override public QueryCursor<Entry<K,V>> query(Query qry) {
         A.notNull(qry, "qry");
 
@@ -400,6 +401,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K,
V
         try {
             validate(qry);
 
+            if (qry instanceof ContinuousQuery)
+                return queryContinuous((ContinuousQuery<K,V>)qry, false);
+
             if (qry instanceof SqlQuery) {
                 SqlQuery p = (SqlQuery)qry;
 
@@ -472,11 +476,12 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K,
V
      * @throws CacheException If query indexing disabled for sql query.
      */
     private void validate(Query qry) {
-        if (!(qry instanceof ScanQuery) && !ctx.config().isQueryIndexEnabled())
+        if (!ctx.config().isQueryIndexEnabled() && !(qry instanceof ScanQuery) &&
!(qry instanceof ContinuousQuery))
             throw new CacheException("Indexing is disabled for cache: " + ctx.cache().name());
     }
 
     /** {@inheritDoc} */
+    @SuppressWarnings("unchecked")
     @Override public QueryCursor<Entry<K,V>> localQuery(Query qry) {
         A.notNull(qry, "qry");
 
@@ -485,6 +490,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K,
V
         try {
             validate(qry);
 
+            if (qry instanceof ContinuousQuery)
+                return queryContinuous((ContinuousQuery<K,V>)qry, true);
+
             if (qry instanceof SqlQuery)
                 return doLocalQuery((SqlQuery)qry);
 


Mime
View raw message