ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [15/22] ignite git commit: Local ATOMIC cache.
Date Fri, 01 Apr 2016 08:25:00 GMT
Local ATOMIC cache.


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

Branch: refs/heads/ignite-2931
Commit: 5dcd1d7a8bdd25b8796dd7053199eb4479d94ccd
Parents: 8ff6f27
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Fri Apr 1 10:13:55 2016 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Fri Apr 1 10:13:55 2016 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheContext.java      |  3 --
 .../local/atomic/GridLocalAtomicCache.java      | 39 ++++++++++----------
 2 files changed, 20 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/5dcd1d7a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
index 6d03523..718cfd6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
@@ -1114,7 +1114,6 @@ public class GridCacheContext<K, V> implements Externalizable
{
     /**
      * @return No value filter.
      */
-    // TODO: Remove
     public CacheEntryPredicate[] noValArray() {
         return new CacheEntryPredicate[]{new CacheEntrySerializablePredicate(new CacheEntryPredicateNoValue())};
     }
@@ -1129,7 +1128,6 @@ public class GridCacheContext<K, V> implements Externalizable
{
     /**
      * @return Has value filter.
      */
-    // TODO: Remove
     public CacheEntryPredicate[] hasValArray() {
         return new CacheEntryPredicate[]{new CacheEntrySerializablePredicate(new CacheEntryPredicateHasValue())};
     }
@@ -1146,7 +1144,6 @@ public class GridCacheContext<K, V> implements Externalizable
{
      * @param val Value to check.
      * @return Predicate array that checks for value.
      */
-    // TODO: Remove
     public CacheEntryPredicate[] equalsValArray(V val) {
         return new CacheEntryPredicate[]{new CacheEntryPredicateContainsValue(toCacheObject(val))};
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/5dcd1d7a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
index a2162e5..7f04fae 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
@@ -147,7 +147,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
             expiryPerCall(),
             true,
             false,
-            filter != null ? new CacheEntryPredicate[] { filter } : null,
+            filter,
             ctx.writeThrough(),
             ctx.readThrough(),
             opCtx != null && opCtx.isKeepBinary());
@@ -170,7 +170,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
             expiryPerCall(),
             false,
             false,
-            filter != null ? new CacheEntryPredicate[] { filter } : null,
+            filter,
             ctx.writeThrough(),
             ctx.readThrough(),
             opCtx != null && opCtx.isKeepBinary());
@@ -191,7 +191,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
             null,
             true,
             false,
-            filter != null ? new CacheEntryPredicate[] { filter } : null);
+            filter);
     }
 
     /** {@inheritDoc} */
@@ -204,7 +204,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
             null,
             false,
             false,
-            filter != null ? new CacheEntryPredicate[] { filter } : null);
+            filter);
     }
 
     /** {@inheritDoc} */
@@ -276,7 +276,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
             expiryPerCall(),
             false,
             false,
-            CU.empty0(),
+            null,
             ctx.writeThrough(),
             ctx.readThrough(),
             opCtx != null && opCtx.isKeepBinary());
@@ -292,7 +292,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
             null,
             false,
             false,
-            CU.empty0()).chain(RET2NULL);
+            null).chain(RET2NULL);
     }
 
     /** {@inheritDoc} */
@@ -307,7 +307,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
             expiryPerCall(),
             true,
             false,
-            CU.empty0(),
+            null,
             ctx.writeThrough(),
             ctx.readThrough(),
             opCtx != null && opCtx.isKeepBinary());
@@ -316,7 +316,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
     /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
     @Override public IgniteInternalFuture<V> getAndRemoveAsync(K key) {
-        return removeAllAsync0(Collections.singletonList(key), true, false, CU.empty0());
+        return removeAllAsync0(Collections.singletonList(key), true, false, null);
     }
 
     /** {@inheritDoc} */
@@ -331,7 +331,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
             expiryPerCall(),
             false,
             false,
-            CU.empty0(),
+            null,
             ctx.writeThrough(),
             ctx.readThrough(),
             opCtx != null && opCtx.isKeepBinary());
@@ -339,7 +339,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
 
     /** {@inheritDoc} */
     @Override public IgniteInternalFuture<?> removeAllAsync(Collection<? extends
K> keys) {
-        return removeAllAsync0(keys, false, false, CU.empty0()).chain(RET2NULL);
+        return removeAllAsync0(keys, false, false, null).chain(RET2NULL);
     }
 
     /** {@inheritDoc} */
@@ -360,7 +360,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
             expiryPerCall(),
             false,
             false,
-            CU.empty0(),
+            null,
             ctx.writeThrough(),
             ctx.readThrough(),
             opCtx != null && opCtx.isKeepBinary());
@@ -376,8 +376,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
     @Override public IgniteInternalFuture<Boolean> removeAsync(K key, @Nullable CacheEntryPredicate
filter) {
         A.notNull(key, "key");
 
-        return removeAllAsync0(Collections.singletonList(key), false, false,
-            filter != null ? new CacheEntryPredicate[] { filter } : null);
+        return removeAllAsync0(Collections.singletonList(key), false, false, filter);
     }
 
     /** {@inheritDoc} */
@@ -393,7 +392,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
             expiryPerCall(),
             false,
             false,
-            ctx.equalsValArray(val),
+            ctx.equalsVal(val),
             ctx.writeThrough(),
             ctx.readThrough(),
             opCtx != null && opCtx.isKeepBinary());
@@ -791,7 +790,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
         @Nullable final Object[] invokeArgs,
         final boolean retval,
         final boolean rawRetval,
-        @Nullable final CacheEntryPredicate[] filter
+        @Nullable final CacheEntryPredicate filter
     ) {
         final GridCacheOperation op = invokeMap != null ? TRANSFORM : UPDATE;
 
@@ -845,7 +844,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
         @Nullable final Collection<? extends K> keys,
         final boolean retval,
         final boolean rawRetval,
-        @Nullable final CacheEntryPredicate[] filter
+        @Nullable final CacheEntryPredicate filter
     ) {
         final boolean writeThrough = ctx.writeThrough();
 
@@ -907,7 +906,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
         @Nullable ExpiryPolicy expiryPlc,
         boolean retval,
         boolean rawRetval,
-        CacheEntryPredicate[] filter,
+        CacheEntryPredicate filter,
         boolean writeThrough,
         boolean readThrough,
         boolean keepBinary
@@ -926,6 +925,8 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
 
         UUID subjId = ctx.subjectIdPerCall(null);
 
+        CacheEntryPredicate[] filters = filter != null ? new CacheEntryPredicate[] { filter
} : CU.empty0();
+
         if (writeThrough && keys.size() > 1) {
             return updateWithBatch(op,
                 keys,
@@ -933,7 +934,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
                 invokeArgs,
                 expiryPlc,
                 ver,
-                filter,
+                filters,
                 keepBinary,
                 subjId,
                 taskName);
@@ -979,7 +980,7 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
                         expiryPlc,
                         true,
                         true,
-                        filter,
+                        filters,
                         intercept,
                         subjId,
                         taskName);


Mime
View raw message