ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [27/48] incubator-ignite git commit: # Merge remote-tracking branch 'remotes/origin/ignite-1' into ignite-43
Date Wed, 21 Jan 2015 11:53:19 GMT
# Merge remote-tracking branch 'remotes/origin/ignite-1' into ignite-43


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

Branch: refs/heads/ignite-65
Commit: fd5e15c9313631dfb27b255156896566c97f7810
Parents: 2a2eb5a 9223d38
Author: sboikov <sboikov@gridgain.com>
Authored: Mon Jan 19 14:45:01 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Mon Jan 19 14:45:01 2015 +0300

----------------------------------------------------------------------
 .../ignite/portables/PortableRawReader.java     |  2 +-
 .../grid/dotnet/GridDotNetConfiguration.java    | 14 +++-
 .../dotnet/GridDotNetPortableConfiguration.java | 28 +++-----
 .../GridDotNetPortableTypeConfiguration.java    | 15 +---
 .../org/gridgain/grid/kernal/GridGainEx.java    | 76 ++++++++++++++------
 .../grid/kernal/GridNodeAttributes.java         |  5 +-
 .../processors/cache/GridCacheAdapter.java      | 18 +++--
 .../processors/cache/GridCacheContext.java      |  2 +-
 .../processors/cache/GridCacheEntryImpl.java    |  2 +-
 .../GridCacheContinuousQueryAdapter.java        |  5 ++
 .../GridCacheContinuousQueryFilterEx.java       | 32 +++++++++
 .../GridCacheContinuousQueryHandler.java        | 17 ++++-
 .../GridCacheContinuousQueryListener.java       |  5 ++
 .../GridCacheContinuousQueryManager.java        | 71 ++++++++++++------
 .../interop/GridInteropProcessorAdapter.java    |  3 -
 15 files changed, 201 insertions(+), 94 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd5e15c9/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/continuous/GridCacheContinuousQueryAdapter.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd5e15c9/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/continuous/GridCacheContinuousQueryHandler.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/continuous/GridCacheContinuousQueryHandler.java
index 228dfa5,a7ff429..5ab83e1
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/continuous/GridCacheContinuousQueryHandler.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/continuous/GridCacheContinuousQueryHandler.java
@@@ -283,8 -262,7 +291,8 @@@ class GridCacheContinuousQueryHandler<K
  
      /** {@inheritDoc} */
      @Override public void onListenerRegistered(UUID routineId, GridKernalContext ctx) {
 -        manager(ctx).iterate(internal, routineId, keepPortable());
 +        if (!entryLsnr)
-             manager(ctx).iterate(internal, routineId);
++            manager(ctx).iterate(internal, routineId, keepPortable());
      }
  
      /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fd5e15c9/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/continuous/GridCacheContinuousQueryManager.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/continuous/GridCacheContinuousQueryManager.java
index c3a4dfe,2d8e106..6e1eac3
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/continuous/GridCacheContinuousQueryManager.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/continuous/GridCacheContinuousQueryManager.java
@@@ -298,14 -126,12 +298,15 @@@ public class GridCacheContinuousQueryMa
       * @param lsnrId Listener ID.
       * @param lsnr Listener.
       * @param internal Internal flag.
 +     * @param entryLsnr {@code True} if query created for {@link CacheEntryListener}.
       * @return Whether listener was actually registered.
       */
+     @SuppressWarnings("UnusedParameters")
 -    boolean registerListener(UUID nodeId, UUID lsnrId, GridCacheContinuousQueryListener<K,
V> lsnr, boolean internal) {
 -        ListenerInfo<K, V> info = new ListenerInfo<>(lsnr);
 +    boolean registerListener(UUID lsnrId,
 +        GridCacheContinuousQueryListener<K, V> lsnr,
 +        boolean internal,
 +        boolean entryLsnr) {
 +        ListenerInfo<K, V> info = new ListenerInfo<>(lsnr, entryLsnr);
  
          boolean added;
  
@@@ -354,31 -190,35 +365,45 @@@
  
          assert info != null;
  
-         Set<GridCacheEntry<K, V>> entries;
+         GridCacheProjectionImpl<K, V> oldPrj = null;
  
-         if (cctx.isReplicated())
-             entries = internal ? cctx.cache().entrySetx() :
-                 cctx.cache().entrySet();
-         else
-             entries = internal ? cctx.cache().primaryEntrySetx() :
-                 cctx.cache().primaryEntrySet();
+         try {
+             if (keepPortable) {
+                 oldPrj = cctx.projectionPerCall();
  
-         boolean evt = !internal && cctx.gridEvents().isRecordable(EVT_CACHE_QUERY_OBJECT_READ);
+                 cctx.projectionPerCall(cctx.cache().<K, V>keepPortable0());
+             }
  
-         for (GridCacheEntry<K, V> e : entries) {
-             GridCacheContinuousQueryEntry<K, V> qryEntry = new GridCacheContinuousQueryEntry<>(cctx,
-                 e,
-                 e.getKey(),
-                 e.getValue(),
-                 null,
-                 null,
-                 null,
-                 CREATED);
+             Set<GridCacheEntry<K, V>> entries;
  
-             info.onIterate(qryEntry, evt);
-         }
+             if (cctx.isReplicated())
+                 entries = internal ? cctx.cache().entrySetx() :
+                     cctx.cache().entrySet();
+             else
+                 entries = internal ? cctx.cache().primaryEntrySetx() :
+                     cctx.cache().primaryEntrySet();
+ 
++            boolean evt = !internal && cctx.gridEvents().isRecordable(EVT_CACHE_QUERY_OBJECT_READ);
++
+             for (GridCacheEntry<K, V> e : entries) {
 -                info.onIterate(new GridCacheContinuousQueryEntry<>(cctx, e, e.getKey(),
e.getValue(), null, null, null),
 -                    !internal && cctx.gridEvents().isRecordable(EVT_CACHE_QUERY_OBJECT_READ));
++                GridCacheContinuousQueryEntry<K, V> qryEntry = new GridCacheContinuousQueryEntry<>(cctx,
++                    e,
++                    e.getKey(),
++                    e.getValue(),
++                    null,
++                    null,
++                    null,
++                    CREATED);
 +
-         info.flushPending();
++                info.onIterate(qryEntry, evt);
+             }
+ 
+             info.flushPending();
+         }
+         finally {
+             if (keepPortable)
+                 cctx.projectionPerCall(oldPrj);
+         }
      }
  
      /**


Mime
View raw message