ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [19/50] incubator-ignite git commit: #ignite-683: Remove unused methods.
Date Mon, 13 Apr 2015 17:40:07 GMT
#ignite-683: Remove unused methods.


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

Branch: refs/heads/ignite-sprint-4
Commit: 8cacf085b0a53320a059c9a3c69721b784b4435b
Parents: e8f2334
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Thu Apr 9 20:04:37 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Thu Apr 9 20:04:37 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheAdapter.java      | 65 +++++++-------------
 1 file changed, 23 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8cacf085/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 09f4646..4a21dc3 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,7 +944,10 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
 
     /** {@inheritDoc} */
     @Override public Set<K> primaryKeySet() {
-        return primaryKeySet((CacheEntryPredicate[])null);
+        return map.keySet(
+            F0.and0(
+                (CacheEntryPredicate[]) null,
+                CU.cachePrimary(ctx.grid().affinity(ctx.name()), ctx.localNode())));
     }
 
     /** {@inheritDoc} */
@@ -2304,13 +2307,13 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
         return fut0.chain(new CX1<IgniteInternalFuture<GridCacheReturn>, Map<K,
EntryProcessorResult<T>>>() {
             @Override public Map<K, EntryProcessorResult<T>> applyx(IgniteInternalFuture<GridCacheReturn>
fut)
                 throws IgniteCheckedException {
-                    GridCacheReturn ret = fut.get();
+                GridCacheReturn ret = fut.get();
 
-                    assert ret != null;
+                assert ret != null;
 
-                    return ret.value() != null ? ret.<Map<K, EntryProcessorResult<T>>>value()
: Collections.<K, EntryProcessorResult<T>>emptyMap();
-                }
-            });
+                return ret.value() != null ? ret.<Map<K, EntryProcessorResult<T>>>value()
: Collections.<K, EntryProcessorResult<T>>emptyMap();
+            }
+        });
     }
 
     /** {@inheritDoc} */
@@ -2336,7 +2339,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
 
         return fut0.chain(new CX1<IgniteInternalFuture<GridCacheReturn>, Map<K,
EntryProcessorResult<T>>>() {
             @Override public Map<K, EntryProcessorResult<T>> applyx(IgniteInternalFuture<GridCacheReturn>
fut)
-                    throws IgniteCheckedException {
+                throws IgniteCheckedException {
                 GridCacheReturn ret = fut.get();
 
                 assert ret != null;
@@ -3147,10 +3150,10 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
                 }
 
                 IgniteInternalFuture<GridCacheReturn> fut = (IgniteInternalFuture)tx.removeAllAsync(ctx,
-                        Collections.singletonList(key),
-                        null,
-                        true,
-                        ctx.equalsValArray(val));
+                    Collections.singletonList(key),
+                    null,
+                    true,
+                    ctx.equalsValArray(val));
 
                 return fut;
             }
@@ -4582,9 +4585,9 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
     public Set<Cache.Entry<K, V>> primaryEntrySet(
         @Nullable CacheEntryPredicate... filter) {
         return map.entries(
-                F0.and0(
-                        filter,
-                        CU.cachePrimary(ctx.grid().affinity(ctx.name()), ctx.localNode())));
+            F0.and0(
+                filter,
+                CU.cachePrimary(ctx.grid().affinity(ctx.name()), ctx.localNode())));
     }
 
     /**
@@ -4596,28 +4599,6 @@ 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 filter Filters to evaluate.
-     * @return Primary values.
-     */
-    public Collection<V> primaryValues(@Nullable CacheEntryPredicate... filter) {
-        return map.values(
-            F0.and0(
-                filter,
-                CU.cachePrimary(ctx.grid().affinity(ctx.name()), ctx.localNode())));
-    }
-
-    /**
      * @param key Key.
      * @param deserializePortable Deserialize portable flag.
      * @return Cached value.
@@ -4646,15 +4627,15 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
         }
 
         return getAllAsync(Collections.singletonList(key), deserializePortable).chain(
-                new CX1<IgniteInternalFuture<Map<K, V>>, V>() {
+            new CX1<IgniteInternalFuture<Map<K, V>>, V>() {
                     @Override public V applyx(IgniteInternalFuture<Map<K, V>>
e) throws IgniteCheckedException {
-                        Map<K, V> map = e.get();
+                    Map<K, V> map = e.get();
 
-                        assert map.isEmpty() || map.size() == 1 : map.size();
+                    assert map.isEmpty() || map.size() == 1 : map.size();
 
-                        return map.get(key);
-                    }
-                });
+                    return map.get(key);
+                }
+            });
     }
 
     /**


Mime
View raw message