ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [01/22] ignite git commit: WIP.
Date Fri, 01 Apr 2016 08:24:46 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-2931 [created] 1e343f23a


WIP.


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

Branch: refs/heads/ignite-2931
Commit: 03f697b8293194544243b5c10ee694c0ef1a502f
Parents: bd509be
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Thu Mar 31 17:23:31 2016 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Thu Mar 31 17:23:31 2016 +0300

----------------------------------------------------------------------
 .../internal/processors/cache/GridCacheAdapter.java      |  4 ++--
 .../internal/processors/cache/IgniteInternalCache.java   |  3 +--
 .../processors/service/GridServiceProcessor.java         | 11 +++++++++--
 3 files changed, 12 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/03f697b8/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 44c8b57..77f94a6 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
@@ -1015,8 +1015,8 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K,
V
     }
 
     /** {@inheritDoc} */
-    @Override public Set<Cache.Entry<K, V>> entrySetx(CacheEntryPredicate...
filter) {
-        return map.entriesx(filter);
+    @Override public Set<Cache.Entry<K, V>> entrySetx() {
+        return map.entriesx(CU.empty0());
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/03f697b8/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 d2e0101..ed84fb7 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
@@ -1835,10 +1835,9 @@ public interface IgniteInternalCache<K, V> extends Iterable<Cache.Entry<K,
V>> {
     /**
      * Gets entry set containing internal entries.
      *
-     * @param filter Filter.
      * @return Entry set.
      */
-    public Set<Cache.Entry<K, V>> entrySetx(CacheEntryPredicate... filter);
+    public Set<Cache.Entry<K, V>> entrySetx();
 
     /**
      * @return {@link javax.cache.expiry.ExpiryPolicy} associated with this projection.

http://git-wip-us.apache.org/repos/asf/ignite/blob/03f697b8/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
index 2d8488b..b811cd0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
@@ -55,7 +55,9 @@ import org.apache.ignite.internal.managers.eventstorage.GridLocalEventListener;
 import org.apache.ignite.internal.processors.GridProcessorAdapter;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.processors.cache.CacheEntryImpl;
+import org.apache.ignite.internal.processors.cache.CacheEntryPredicate;
 import org.apache.ignite.internal.processors.cache.CacheIteratorConverter;
+import org.apache.ignite.internal.processors.cache.GridCacheEntryEx;
 import org.apache.ignite.internal.processors.cache.IgniteInternalCache;
 import org.apache.ignite.internal.processors.cache.query.CacheQuery;
 import org.apache.ignite.internal.processors.cache.query.GridCacheQueryManager;
@@ -1301,8 +1303,13 @@ public class GridServiceProcessor extends GridProcessorAdapter {
                         }
 
                         // Clean up zombie assignments.
-                        for (Cache.Entry<Object, Object> e :
-                            cache.entrySetx(CU.cachePrimary(ctx.grid().affinity(cache.name()),
ctx.grid().localNode()))) {
+                        CacheEntryPredicate pred =
+                            CU.cachePrimary(ctx.grid().affinity(cache.name()), ctx.grid().localNode());
+
+                        for (Cache.Entry<Object, Object> e : cache.entrySetx()) {
+                            if (!pred.apply((GridCacheEntryEx) e))
+                                continue;
+
                             if (!(e.getKey() instanceof GridServiceAssignmentsKey))
                                 continue;
 


Mime
View raw message