ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [50/50] incubator-ignite git commit: #ignite-683: revert primaryKeySet
Date Fri, 10 Apr 2015 12:44:47 GMT
#ignite-683: revert primaryKeySet


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

Branch: refs/heads/ignite-683-2
Commit: c669dfe9469f84c44be920e3bed375cb6c298181
Parents: ce989dd
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Fri Apr 10 15:43:16 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Fri Apr 10 15:43:16 2015 +0300

----------------------------------------------------------------------
 .../internal/processors/cache/GridCacheAdapter.java | 16 ++++++++++++----
 .../distributed/near/GridNearCacheAdapter.java      |  5 +++++
 2 files changed, 17 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c669dfe9/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 3735463..802d134 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
@@ -944,10 +944,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
 
     /** {@inheritDoc} */
     @Override public Set<K> primaryKeySet() {
-        return map.keySet(
-            F0.and0(
-                (CacheEntryPredicate[]) null,
-                CU.cachePrimary(ctx.grid().affinity(ctx.name()), ctx.localNode())));
+        return primaryKeySet((CacheEntryPredicate[])null);
     }
 
     /** {@inheritDoc} */
@@ -4599,6 +4596,17 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
     }
 
     /**
+     * @param filter Primary key set.
+     * @return Primary key set.
+     */
+    public Set<K> primaryKeySet(@Nullable CacheEntryPredicate... filter) {
+        return map.keySet(
+            F0.and0(
+                filter,
+                CU.cachePrimary(ctx.grid().affinity(ctx.name()), ctx.localNode())));
+    }
+
+    /**
      * @param key Key.
      * @param deserializePortable Deserialize portable flag.
      * @return Cached value.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c669dfe9/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
index 95ea9a1..50f4fa7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
@@ -377,6 +377,11 @@ public abstract class GridNearCacheAdapter<K, V> extends GridDistributedCacheAda
     }
 
     /** {@inheritDoc} */
+    @Override public Set<K> primaryKeySet(@Nullable CacheEntryPredicate... filter)
{
+        return new GridCacheKeySet<>(ctx, primaryEntrySet(filter), null);
+    }
+
+    /** {@inheritDoc} */
     @Override public Collection<V> values(CacheEntryPredicate... filter) {
         return new GridCacheValueCollection<>(ctx, entrySet(filter), ctx.vararg(F.<K,
V>cacheHasPeekValue()));
     }


Mime
View raw message