ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [92/92] [abbrv] incubator-ignite git commit: IGNITE-51 Fixed JettyRestProcessorSelfTest
Date Fri, 06 Mar 2015 10:15:08 GMT
IGNITE-51 Fixed JettyRestProcessorSelfTest


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

Branch: refs/heads/ignite-user-req
Commit: 2fdb49fc16621997ef139c68b69e4f9e7845c25d
Parents: 31f2c0d
Author: nikolay_tikhonov <ntikhonov@gridgain.com>
Authored: Fri Mar 6 12:41:24 2015 +0300
Committer: nikolay_tikhonov <ntikhonov@gridgain.com>
Committed: Fri Mar 6 12:41:24 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheContext.java      |  8 ++++++
 .../cache/GridCacheProjectionImpl.java          |  2 +-
 .../org/apache/ignite/internal/util/F0.java     | 28 ++++++++++++++++++++
 3 files changed, 37 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2fdb49fc/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 05ae513..37f3af7 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
@@ -988,6 +988,14 @@ public class GridCacheContext<K, V> implements Externalizable {
     }
 
     /**
+     * @param val Value to check.
+     * @return Predicate that checks for value.
+     */
+    public CacheEntryPredicate equalsValue(V val) {
+        return new CacheEntryPredicateContainsValue(toCacheObject(val));
+    }
+
+    /**
      * @return Empty cache version array.
      */
     public GridCacheVersion[] emptyVersion() {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2fdb49fc/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
index 19aa08e..a91488f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
@@ -736,7 +736,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K,
V
 
     /** {@inheritDoc} */
     @Override public IgniteInternalFuture<Boolean> replaceAsync(K key, V oldVal, V
newVal) {
-        CacheEntryPredicate fltr = and(cctx.equalsValArray(oldVal));
+        CacheEntryPredicate fltr = this.filter != null ? and(cctx.equalsValArray(oldVal))
: cctx.equalsValue(oldVal);
 
         return cache.putxAsync(key, newVal, fltr);
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2fdb49fc/modules/core/src/main/java/org/apache/ignite/internal/util/F0.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/F0.java b/modules/core/src/main/java/org/apache/ignite/internal/util/F0.java
index a7faa0a..cc8e967 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/F0.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/F0.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.internal.util;
 
+import org.apache.ignite.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.util.lang.*;
 import org.apache.ignite.internal.util.typedef.*;
@@ -157,6 +158,22 @@ public class F0 {
 
                 return true;
             }
+
+            @Override public void prepareMarshal(GridCacheContext ctx) throws IgniteCheckedException
{
+                if (!e1) {
+                    assert p1 != null;
+
+                    for (CacheEntryPredicate p : p1)
+                        p.prepareMarshal(ctx);
+                }
+
+                if (!e2) {
+                    assert p2 != null;
+
+                    for (CacheEntryPredicate p : p2)
+                        p.prepareMarshal(ctx);
+                }
+            }
         });
     }
 
@@ -190,6 +207,17 @@ public class F0 {
 
                 return true;
             }
+
+            @Override public void prepareMarshal(GridCacheContext ctx) throws IgniteCheckedException
{
+                assert ps != null;
+
+                if (p != null)
+                    p.prepareMarshal(ctx);
+
+                for (CacheEntryPredicate p : ps)
+                    if (p != null)
+                        p.prepareMarshal(ctx);
+            }
         });
     }
 


Mime
View raw message