ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [43/50] [abbrv] ignite git commit: Renaming.
Date Tue, 24 Nov 2015 09:18:54 GMT
Renaming.


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

Branch: refs/heads/master
Commit: aee7b759ff363fa9150097fd212b9f40724a8d15
Parents: 8050346
Author: Tikhonov Nikolay <tikhonovnicolay@gmail.com>
Authored: Mon Nov 23 18:01:53 2015 +0300
Committer: Tikhonov Nikolay <tikhonovnicolay@gmail.com>
Committed: Mon Nov 23 18:01:53 2015 +0300

----------------------------------------------------------------------
 .../internal/GridEventConsumeHandler.java       |  6 +--
 .../internal/GridMessageListenHandler.java      |  6 +--
 .../continuous/CacheContinuousQueryHandler.java |  7 ++-
 .../continuous/GridContinuousHandler.java       |  6 +--
 .../continuous/GridContinuousProcessor.java     | 50 ++++++++------------
 ...ContinuousQueryFailoverAbstractSelfTest.java |  2 +-
 .../continuous/GridEventConsumeSelfTest.java    |  2 +-
 7 files changed, 35 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/aee7b759/modules/core/src/main/java/org/apache/ignite/internal/GridEventConsumeHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridEventConsumeHandler.java
b/modules/core/src/main/java/org/apache/ignite/internal/GridEventConsumeHandler.java
index 3918976..1869d2e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridEventConsumeHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridEventConsumeHandler.java
@@ -110,17 +110,17 @@ class GridEventConsumeHandler implements GridContinuousHandler {
     }
 
     /** {@inheritDoc} */
-    @Override public boolean isForEvents() {
+    @Override public boolean isEvents() {
         return true;
     }
 
     /** {@inheritDoc} */
-    @Override public boolean isForMessaging() {
+    @Override public boolean isMessaging() {
         return false;
     }
 
     /** {@inheritDoc} */
-    @Override public boolean isForQuery() {
+    @Override public boolean isQuery() {
         return false;
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/aee7b759/modules/core/src/main/java/org/apache/ignite/internal/GridMessageListenHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridMessageListenHandler.java
b/modules/core/src/main/java/org/apache/ignite/internal/GridMessageListenHandler.java
index aa837b8..6b51107 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridMessageListenHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridMessageListenHandler.java
@@ -83,17 +83,17 @@ public class GridMessageListenHandler implements GridContinuousHandler
{
     }
 
     /** {@inheritDoc} */
-    @Override public boolean isForEvents() {
+    @Override public boolean isEvents() {
         return false;
     }
 
     /** {@inheritDoc} */
-    @Override public boolean isForMessaging() {
+    @Override public boolean isMessaging() {
         return true;
     }
 
     /** {@inheritDoc} */
-    @Override public boolean isForQuery() {
+    @Override public boolean isQuery() {
         return false;
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/aee7b759/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
index b69d4cd..030ab4a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryHandler.java
@@ -201,17 +201,17 @@ class CacheContinuousQueryHandler<K, V> implements GridContinuousHandler
{
     }
 
     /** {@inheritDoc} */
-    @Override public boolean isForEvents() {
+    @Override public boolean isEvents() {
         return false;
     }
 
     /** {@inheritDoc} */
-    @Override public boolean isForMessaging() {
+    @Override public boolean isMessaging() {
         return false;
     }
 
     /** {@inheritDoc} */
-    @Override public boolean isForQuery() {
+    @Override public boolean isQuery() {
         return true;
     }
 
@@ -848,7 +848,6 @@ class CacheContinuousQueryHandler<K, V> implements GridContinuousHandler
{
 
         /**
          * @param e Entry.
-         * @param topVer Topology version.
          * @return Continuous query entry.
          */
         private CacheContinuousQueryEntry skipEntry(CacheContinuousQueryEntry e) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/aee7b759/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousHandler.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousHandler.java
index d8698b3..3d6e266 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousHandler.java
@@ -130,17 +130,17 @@ public interface GridContinuousHandler extends Externalizable, Cloneable
{
     /**
      * @return {@code True} if for events.
      */
-    public boolean isForEvents();
+    public boolean isEvents();
 
     /**
      * @return {@code True} if for messaging.
      */
-    public boolean isForMessaging();
+    public boolean isMessaging();
 
     /**
      * @return {@code True} if for continuous queries.
      */
-    public boolean isForQuery();
+    public boolean isQuery();
 
     /**
      * @return Cache name if this is a continuous query handler.

http://git-wip-us.apache.org/repos/asf/ignite/blob/aee7b759/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
index e218790..00f5e64 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java
@@ -210,29 +210,25 @@ public class GridContinuousProcessor extends GridProcessorAdapter {
                         if (msg.errs().isEmpty()) {
                             LocalRoutineInfo routine = locInfos.get(msg.routineId());
 
-                            if (routine != null && routine.handler().isForQuery())
{
-                                try {
-                                    Map<Integer, Long> cntrs = msg.updateCounters();
+                            // Update partition counters.
+                            if (routine != null && routine.handler().isQuery()) {
+                                Map<Integer, Long> cntrs = msg.updateCounters();
 
-                                    GridCacheAdapter<Object, Object> interCache =
-                                        ctx.cache().internalCache(routine.handler().cacheName());
+                                GridCacheAdapter<Object, Object> interCache =
+                                    ctx.cache().internalCache(routine.handler().cacheName());
 
-                                    if (interCache != null && cntrs != null &&
interCache.context() != null
-                                        && !interCache.isLocal() && !CU.clientNode(ctx.grid().localNode()))
{
-                                        Map<Integer, Long> map = interCache.context().topology().updateCounters();
+                                if (interCache != null && cntrs != null &&
interCache.context() != null
+                                    && !interCache.isLocal() && !CU.clientNode(ctx.grid().localNode()))
{
+                                    Map<Integer, Long> map = interCache.context().topology().updateCounters();
 
-                                        for (Map.Entry<Integer, Long> e : map.entrySet())
{
-                                            Long cntr0 = cntrs.get(e.getKey());
-                                            Long cntr1 = e.getValue();
+                                    for (Map.Entry<Integer, Long> e : map.entrySet())
{
+                                        Long cntr0 = cntrs.get(e.getKey());
+                                        Long cntr1 = e.getValue();
 
-                                            if (cntr0 == null || cntr1 > cntr0)
-                                                cntrs.put(e.getKey(), cntr1);
-                                        }
+                                        if (cntr0 == null || cntr1 > cntr0)
+                                            cntrs.put(e.getKey(), cntr1);
                                     }
                                 }
-                                catch (Exception e) {
-                                    U.warn(log, "Failed to load update counters.", e);
-                                }
 
                                 routine.handler().updateCounters(msg.updateCounters());
                             }
@@ -496,7 +492,7 @@ public class GridContinuousProcessor extends GridProcessorAdapter {
 
             GridContinuousHandler hnd = rmtInfo.hnd;
 
-            if (hnd.isForQuery() && F.eq(ctx.name(), hnd.cacheName()) &&
rmtInfo.clearDelayedRegister()) {
+            if (hnd.isQuery() && F.eq(ctx.name(), hnd.cacheName()) && rmtInfo.clearDelayedRegister())
{
                 GridContinuousHandler.RegisterStatus status = hnd.register(rmtInfo.nodeId,
routineId, this.ctx);
 
                 assert status != GridContinuousHandler.RegisterStatus.DELAYED;
@@ -518,7 +514,7 @@ public class GridContinuousProcessor extends GridProcessorAdapter {
 
             GridContinuousHandler hnd = entry.getValue().hnd;
 
-            if (hnd.isForQuery() && F.eq(ctx.name(), hnd.cacheName()))
+            if (hnd.isQuery() && F.eq(ctx.name(), hnd.cacheName()))
                 it.remove();
         }
     }
@@ -888,16 +884,12 @@ public class GridContinuousProcessor extends GridProcessorAdapter {
             }
         }
 
-        try {
-            if (hnd.isForQuery() && ctx.cache() != null && ctx.cache().internalCache(hnd.cacheName())
!= null) {
-                Map<Integer, Long> cntrs = ctx.cache().internalCache(hnd.cacheName())
-                    .context().topology().updateCounters();
+        // Load partition counters.
+        if (hnd.isQuery() && ctx.cache() != null && ctx.cache().internalCache(hnd.cacheName())
!= null) {
+            Map<Integer, Long> cntrs = ctx.cache().internalCache(hnd.cacheName())
+                .context().topology().updateCounters();
 
-                req.addUpdateCounters(cntrs);
-            }
-        }
-        catch (Exception e) {
-            U.warn(log, "Failed to load partition counters.", e);
+            req.addUpdateCounters(cntrs);
         }
 
         if (err != null)
@@ -1319,7 +1311,7 @@ public class GridContinuousProcessor extends GridProcessorAdapter {
          * Marks info to be registered when cache is started.
          */
         public void markDelayedRegister() {
-            assert hnd.isForQuery();
+            assert hnd.isQuery();
 
             delayedRegister = true;
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/aee7b759/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java
index b311272..08e8adb 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java
@@ -1327,7 +1327,7 @@ public abstract class CacheContinuousQueryFailoverAbstractSelfTest extends
GridC
         for (Object info : infos.values()) {
             GridContinuousHandler hnd = GridTestUtils.getFieldValue(info, "hnd");
 
-            if (hnd.isForQuery() && hnd.cacheName() == null) {
+            if (hnd.isQuery() && hnd.cacheName() == null) {
                 backupQueue = GridTestUtils.getFieldValue(hnd, "backupQueue");
 
                 break;

http://git-wip-us.apache.org/repos/asf/ignite/blob/aee7b759/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java
index 8f28aef..d239ea8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/continuous/GridEventConsumeSelfTest.java
@@ -163,7 +163,7 @@ public class GridEventConsumeSelfTest extends GridCommonAbstractTest {
         return F.view(U.<Map<UUID, LocalRoutineInfo>>field(proc, "locInfos").values(),
             new IgnitePredicate<LocalRoutineInfo>() {
                 @Override public boolean apply(LocalRoutineInfo info) {
-                    return info.handler().isForEvents();
+                    return info.handler().isEvents();
                 }
             });
     }


Mime
View raw message