ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [03/50] incubator-ignite git commit: #ignite-629: remove CacheFlag.CLONE
Date Wed, 01 Apr 2015 09:12:10 GMT
#ignite-629: remove CacheFlag.CLONE


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

Branch: refs/heads/ignite-gg-9950
Commit: ad84583b104c9af8222bf724d90bed632e0198bb
Parents: 4022338
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Fri Mar 27 19:13:40 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Fri Mar 27 19:13:40 2015 +0300

----------------------------------------------------------------------
 .../internal/processors/cache/CacheFlag.java    | 11 ----
 .../processors/cache/GridCacheAdapter.java      | 32 +++++------
 .../cache/GridCacheConcurrentMap.java           | 22 ++------
 .../processors/cache/GridCacheContext.java      | 57 --------------------
 .../local/atomic/GridLocalAtomicCache.java      | 20 ++-----
 .../datastructures/DataStructuresProcessor.java | 15 +++---
 .../datastructures/GridCacheAtomicLongImpl.java | 14 ++---
 .../GridCacheAtomicReferenceImpl.java           |  2 +-
 .../GridCacheAtomicSequenceImpl.java            |  2 +-
 .../GridCacheAtomicStampedImpl.java             |  2 +-
 .../GridCacheCountDownLatchImpl.java            |  2 +-
 .../OptimizedObjectStreamSelfTest.java          |  2 +-
 12 files changed, 43 insertions(+), 138 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ad84583b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheFlag.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheFlag.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheFlag.java
index 5bef17d..f403a53 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheFlag.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheFlag.java
@@ -32,17 +32,6 @@ import javax.cache.processor.*;
  * </ul>
  */
 public enum CacheFlag {
-    /**
-     * Clone values prior to returning them to user.
-     * <p>
-     * Whenever values are returned from cache, they cannot be directly updated
-     * as cache holds the same references internally. If it is needed to
-     * update values that are returned from cache, this flag will provide
-     * automatic cloning of values prior to returning so they can be directly
-     * updated.
-     */
-    CLONE,
-
     /** Skips store, i.e. no read-through and no write-through behavior. */
     SKIP_STORE;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ad84583b/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 79c8fce..b7d545f 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
@@ -2332,7 +2332,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
 
         validateCacheValue(val);
 
-        V prevVal = ctx.cloneOnFlag(syncOp(new SyncOp<V>(true) {
+        V prevVal = syncOp(new SyncOp<V>(true) {
             @Override public V op(IgniteTxLocalAdapter tx) throws IgniteCheckedException
{
                 return (V)tx.putAllAsync(ctx, F.t(key, val), true, cached, ttl, filter).get().value();
             }
@@ -2340,7 +2340,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
             @Override public String toString() {
                 return "put [key=" + key + ", val=" + val + ", filter=" + Arrays.toString(filter)
+ ']';
             }
-        }));
+        });
 
         if (statsEnabled)
             metrics0().addPutAndGetTimeNanos(System.nanoTime() - start);
@@ -2394,7 +2394,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
 
         validateCacheValue(val);
 
-        return ctx.wrapClone(asyncOp(new AsyncOp<V>(key) {
+        return asyncOp(new AsyncOp<V>(key) {
             @Override public IgniteInternalFuture<V> op(IgniteTxLocalAdapter tx) {
                 return tx.putAllAsync(ctx, F.t(key, val), true, entry, ttl, filter)
                     .chain((IgniteClosure<IgniteInternalFuture<GridCacheReturn>,
V>)RET2VAL);
@@ -2403,7 +2403,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
             @Override public String toString() {
                 return "putAsync [key=" + key + ", val=" + val + ", filter=" + Arrays.toString(filter)
+ ']';
             }
-        }));
+        });
     }
 
     /** {@inheritDoc} */
@@ -2739,7 +2739,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
 
         validateCacheValue(val);
 
-        return ctx.cloneOnFlag(syncOp(new SyncOp<V>(true) {
+        return syncOp(new SyncOp<V>(true) {
             @Override public V op(IgniteTxLocalAdapter tx) throws IgniteCheckedException
{
                 return (V)tx.putAllAsync(ctx, F.t(key, val), true, null, -1, ctx.noValArray()).get().value();
             }
@@ -2747,7 +2747,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
             @Override public String toString() {
                 return "putIfAbsent [key=" + key + ", val=" + val + ']';
             }
-        }));
+        });
     }
 
     /** {@inheritDoc} */
@@ -2763,7 +2763,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
 
         validateCacheValue(val);
 
-        IgniteInternalFuture<V> fut = ctx.wrapClone(asyncOp(new AsyncOp<V>(key)
{
+        IgniteInternalFuture<V> fut = asyncOp(new AsyncOp<V>(key) {
             @Override public IgniteInternalFuture<V> op(IgniteTxLocalAdapter tx) {
                 return tx.putAllAsync(ctx, F.t(key, val), true, null, -1, ctx.noValArray())
                     .chain((IgniteClosure<IgniteInternalFuture<GridCacheReturn>,
V>) RET2VAL);
@@ -2772,7 +2772,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
             @Override public String toString() {
                 return "putIfAbsentAsync [key=" + key + ", val=" + val + ']';
             }
-        }));
+        });
 
         if(statsEnabled)
             fut.listen(new UpdatePutTimeStatClosure<V>(metrics0(), start));
@@ -2848,7 +2848,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
 
         validateCacheValue(val);
 
-        return ctx.cloneOnFlag(syncOp(new SyncOp<V>(true) {
+        return syncOp(new SyncOp<V>(true) {
             @Override public V op(IgniteTxLocalAdapter tx) throws IgniteCheckedException
{
                 return (V)tx.putAllAsync(ctx, F.t(key, val), true, null, -1, ctx.hasValArray()).get().value();
             }
@@ -2856,7 +2856,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
             @Override public String toString() {
                 return "replace [key=" + key + ", val=" + val + ']';
             }
-        }));
+        });
     }
 
     /** {@inheritDoc} */
@@ -2872,7 +2872,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
 
         validateCacheValue(val);
 
-        IgniteInternalFuture<V> fut = ctx.wrapClone(asyncOp(new AsyncOp<V>(key)
{
+        IgniteInternalFuture<V> fut = asyncOp(new AsyncOp<V>(key) {
             @Override public IgniteInternalFuture<V> op(IgniteTxLocalAdapter tx) {
                 return tx.putAllAsync(ctx, F.t(key, val), true, null, -1, ctx.hasValArray()).chain(
                     (IgniteClosure<IgniteInternalFuture<GridCacheReturn>, V>)RET2VAL);
@@ -2881,7 +2881,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
             @Override public String toString() {
                 return "replaceAsync [key=" + key + ", val=" + val + ']';
             }
-        }));
+        });
 
         if (statsEnabled)
             fut.listen(new UpdatePutAndGetTimeStatClosure<V>(metrics0(), start));
@@ -3068,7 +3068,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
         if (keyCheck)
             validateCacheKey(key);
 
-        V prevVal = ctx.cloneOnFlag(syncOp(new SyncOp<V>(true) {
+        V prevVal = syncOp(new SyncOp<V>(true) {
             @Override public V op(IgniteTxLocalAdapter tx) throws IgniteCheckedException
{
                 V ret = (V) tx.removeAllAsync(ctx, Collections.singletonList(key), entry,
true, filter).get().value();
 
@@ -3081,7 +3081,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
             @Override public String toString() {
                 return "remove [key=" + key + ", filter=" + Arrays.toString(filter) + ']';
             }
-        }));
+        });
 
         if (statsEnabled)
             metrics0().addRemoveAndGetTimeNanos(System.nanoTime() - start);
@@ -3115,7 +3115,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
         if (keyCheck)
             validateCacheKey(key);
 
-        IgniteInternalFuture<V> fut = ctx.wrapClone(asyncOp(new AsyncOp<V>(key)
{
+        IgniteInternalFuture<V> fut = asyncOp(new AsyncOp<V>(key) {
             @Override public IgniteInternalFuture<V> op(IgniteTxLocalAdapter tx) {
                 // TODO should we invoke interceptor here?
                 return tx.removeAllAsync(ctx, Collections.singletonList(key), null, true,
filter)
@@ -3125,7 +3125,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
             @Override public String toString() {
                 return "removeAsync [key=" + key + ", filter=" + Arrays.toString(filter)
+ ']';
             }
-        }));
+        });
 
         if (statsEnabled)
             fut.listen(new UpdateRemoveTimeStatClosure<V>(metrics0(), start));

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ad84583b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMap.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMap.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMap.java
index dbf1191..e0b756a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMap.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMap.java
@@ -36,8 +36,6 @@ import java.util.*;
 import java.util.concurrent.atomic.*;
 import java.util.concurrent.locks.*;
 
-import static org.apache.ignite.internal.processors.cache.CacheFlag.*;
-
 /**
  * Concurrent implementation of cache map.
  */
@@ -1830,7 +1828,6 @@ public class GridCacheConcurrentMap {
 
             prjPerCall = ctx.projectionPerCall();
             forcedFlags = ctx.forcedFlags();
-            clone = ctx.hasFlag(CLONE);
         }
 
         /** {@inheritDoc} */
@@ -1856,7 +1853,7 @@ public class GridCacheConcurrentMap {
          * @return Value iterator.
          */
         Iterator<V> valueIterator() {
-            return new ValueIterator<>(map, filter, ctx, clone);
+            return new ValueIterator<>(map, filter, ctx);
         }
 
         /**
@@ -2073,9 +2070,6 @@ public class GridCacheConcurrentMap {
         /** Context. */
         private GridCacheContext<K, V> ctx;
 
-        /** */
-        private boolean clone;
-
         /**
          * Empty constructor required for {@link Externalizable}.
          */
@@ -2087,17 +2081,14 @@ public class GridCacheConcurrentMap {
          * @param map Base map.
          * @param filter Value filter.
          * @param ctx Cache context.
-         * @param clone Clone flag.
          */
         private ValueIterator(
             GridCacheConcurrentMap map,
             CacheEntryPredicate[] filter,
-            GridCacheContext ctx,
-            boolean clone) {
+            GridCacheContext ctx) {
             it = new Iterator0<>(map, true, filter, -1, -1);
 
             this.ctx = ctx;
-            this.clone = clone;
         }
 
         /** {@inheritDoc} */
@@ -2112,12 +2103,7 @@ public class GridCacheConcurrentMap {
             // Cached value.
             V val = it.currentValue();
 
-            try {
-                return clone ? ctx.cloneValue(val) : val;
-            }
-            catch (IgniteCheckedException e) {
-                throw new IgniteException(e);
-            }
+            return val;
         }
 
         /** {@inheritDoc} */
@@ -2129,7 +2115,6 @@ public class GridCacheConcurrentMap {
         @Override public void writeExternal(ObjectOutput out) throws IOException {
             out.writeObject(it);
             out.writeObject(ctx);
-            out.writeBoolean(clone);
         }
 
         /** {@inheritDoc} */
@@ -2137,7 +2122,6 @@ public class GridCacheConcurrentMap {
         @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
{
             it = (Iterator0)in.readObject();
             ctx = (GridCacheContext<K, V>)in.readObject();
-            clone = in.readBoolean();
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ad84583b/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 60c503b..3ad156d 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
@@ -1338,63 +1338,6 @@ public class GridCacheContext<K, V> implements Externalizable
{
     }
 
     /**
-     * @param flag Flag to check.
-     */
-    public void denyOnFlag(CacheFlag flag) {
-        assert flag != null;
-
-        if (hasFlag(flag))
-            throw new CacheFlagException(flag);
-    }
-
-    /**
-     * @param flags Flags.
-     */
-    public void denyOnFlags(CacheFlag[] flags) {
-        assert !F.isEmpty(flags);
-
-        if (hasAnyFlags(flags))
-            throw new CacheFlagException(flags);
-    }
-
-    /**
-     * @param flags Flags.
-     */
-    public void denyOnFlags(Collection<CacheFlag> flags) {
-        assert !F.isEmpty(flags);
-
-        if (hasAnyFlags(flags))
-            throw new CacheFlagException(flags);
-    }
-
-    /**
-     * Clones cached object depending on whether or not {@link CacheFlag#CLONE} flag
-     * is set thread locally.
-     *
-     * @param obj Object to clone.
-     * @return Clone of the given object.
-     * @throws IgniteCheckedException If failed to clone.
-     */
-    @Nullable public <T> T cloneOnFlag(@Nullable T obj) throws IgniteCheckedException
{
-        return hasFlag(CLONE) ? cloneValue(obj) : obj;
-    }
-
-    /**
-     * @param f Target future.
-     * @return Wrapped future that is aware of cloning behaviour.
-     */
-    public IgniteInternalFuture<V> wrapClone(IgniteInternalFuture<V> f) {
-        if (!hasFlag(CLONE))
-            return f;
-
-        return f.chain(new CX1<IgniteInternalFuture<V>, V>() {
-            @Override public V applyx(IgniteInternalFuture<V> f) throws IgniteCheckedException
{
-                return cloneValue(f.get());
-            }
-        });
-    }
-
-    /**
      * Creates Runnable that can be executed safely in a different thread inheriting
      * the same thread local projection as for the current thread. If no projection is
      * set for current thread then there's no need to create new object and method simply

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ad84583b/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 f0b5dee..626bd99 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
@@ -451,7 +451,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
         Map<K, V> m = getAllInternal(Collections.singleton(key),
             ctx.isSwapOrOffheapEnabled(),
             ctx.readThrough(),
-            ctx.hasFlag(CLONE),
             taskName,
             deserializePortable,
             false);
@@ -472,7 +471,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
         return getAllInternal(keys,
             ctx.isSwapOrOffheapEnabled(),
             ctx.readThrough(),
-            ctx.hasFlag(CLONE),
             taskName,
             deserializePortable,
             false);
@@ -495,11 +493,10 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
 
         final boolean swapOrOffheap = ctx.isSwapOrOffheapEnabled();
         final boolean storeEnabled = ctx.readThrough();
-        final boolean clone = ctx.hasFlag(CLONE);
 
         return asyncOp(new Callable<Map<K, V>>() {
             @Override public Map<K, V> call() throws Exception {
-                return getAllInternal(keys, swapOrOffheap, storeEnabled, clone, taskName,
deserializePortable, skipVals);
+                return getAllInternal(keys, swapOrOffheap, storeEnabled, taskName, deserializePortable,
skipVals);
             }
         });
     }
@@ -510,7 +507,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
      * @param keys Keys to remove.
      * @param swapOrOffheap {@code True} if swap of off-heap storage are enabled.
      * @param storeEnabled Store enabled flag.
-     * @param clone {@code True} if returned values should be cloned.
      * @param taskName Task name.
      * @param deserializePortable Deserialize portable .
      * @return Key-value map.
@@ -520,7 +516,6 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
     private Map<K, V> getAllInternal(@Nullable Collection<? extends K> keys,
         boolean swapOrOffheap,
         boolean storeEnabled,
-        boolean clone,
         String taskName,
         boolean deserializePortable,
         boolean skipVals
@@ -600,17 +595,8 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
             }
         }
 
-        if (success || !storeEnabled) {
-            if (!clone)
-                return vals;
-
-            Map<K, V> map = new GridLeanMap<>();
-
-            for (Map.Entry<K, V> e : vals.entrySet())
-                map.put(e.getKey(), ctx.cloneValue(e.getValue()));
-
-            return map;
-        }
+        if (success || !storeEnabled)
+            return vals;
 
         return getAllAsync(keys, true, null, false, subjId, taskName, deserializePortable,
false, expiry, skipVals)
             .get();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ad84583b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
index 5143d60..b6b3993 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.internal.processors.datastructures;
 
 import org.apache.ignite.*;
+import org.apache.ignite.cache.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.cluster.*;
@@ -117,19 +118,21 @@ public final class DataStructuresProcessor extends GridProcessorAdapter
{
 
             assert atomicsCache != null;
 
-            dsView = atomicsCache.flagsOn(CLONE);
+            dsView = atomicsCache;
 
-            cntDownLatchView = atomicsCache.flagsOn(CLONE);
+            cntDownLatchView = atomicsCache;
 
-            atomicLongView = atomicsCache.flagsOn(CLONE);
+            atomicLongView = atomicsCache;
 
-            atomicRefView = atomicsCache.flagsOn(CLONE);
+            atomicRefView = atomicsCache;
 
-            atomicStampedView = atomicsCache.flagsOn(CLONE);
+            atomicStampedView = atomicsCache;
 
-            seqView = atomicsCache.flagsOn(CLONE);
+            seqView = atomicsCache;
 
             dsCacheCtx = ctx.cache().internalCache(CU.ATOMICS_CACHE_NAME).context();
+
+            CacheConfiguration cfg = ctx.cache().internalCache(CU.ATOMICS_CACHE_NAME).configuration();
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ad84583b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicLongImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicLongImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicLongImpl.java
index e53fed3..3d1ba58 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicLongImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicLongImpl.java
@@ -90,7 +90,7 @@ public final class GridCacheAtomicLongImpl implements GridCacheAtomicLongEx,
Ext
 
                 val.set(retVal);
 
-                atomicView.put(key, val);
+                atomicView.putx(key, val);
 
                 tx.commit();
 
@@ -117,7 +117,7 @@ public final class GridCacheAtomicLongImpl implements GridCacheAtomicLongEx,
Ext
 
                 val.set(retVal + 1);
 
-                atomicView.put(key, val);
+                atomicView.putx(key, val);
 
                 tx.commit();
 
@@ -144,7 +144,7 @@ public final class GridCacheAtomicLongImpl implements GridCacheAtomicLongEx,
Ext
 
                 val.set(retVal);
 
-                atomicView.put(key, val);
+                atomicView.putx(key, val);
 
                 tx.commit();
 
@@ -171,7 +171,7 @@ public final class GridCacheAtomicLongImpl implements GridCacheAtomicLongEx,
Ext
 
                 val.set(retVal - 1);
 
-                atomicView.put(key, val);
+                atomicView.putx(key, val);
 
                 tx.commit();
 
@@ -390,7 +390,7 @@ public final class GridCacheAtomicLongImpl implements GridCacheAtomicLongEx,
Ext
 
                     val.set(retVal);
 
-                    atomicView.put(key, val);
+                    atomicView.putx(key, val);
 
                     tx.commit();
 
@@ -424,7 +424,7 @@ public final class GridCacheAtomicLongImpl implements GridCacheAtomicLongEx,
Ext
 
                     val.set(retVal + l);
 
-                    atomicView.put(key, val);
+                    atomicView.putx(key, val);
 
                     tx.commit();
 
@@ -458,7 +458,7 @@ public final class GridCacheAtomicLongImpl implements GridCacheAtomicLongEx,
Ext
 
                     val.set(l);
 
-                    atomicView.put(key, val);
+                    atomicView.putx(key, val);
 
                     tx.commit();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ad84583b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicReferenceImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicReferenceImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicReferenceImpl.java
index 1031cc4..4a4efdd 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicReferenceImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicReferenceImpl.java
@@ -228,7 +228,7 @@ public final class GridCacheAtomicReferenceImpl<T> implements GridCacheAtomicRef
 
                     ref.set(val);
 
-                    atomicView.put(key, ref);
+                    atomicView.putx(key, ref);
 
                     tx.commit();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ad84583b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicSequenceImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicSequenceImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicSequenceImpl.java
index 52f762a..5855fd5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicSequenceImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicSequenceImpl.java
@@ -496,7 +496,7 @@ public final class GridCacheAtomicSequenceImpl implements GridCacheAtomicSequenc
                     // Global counter must be more than reserved upper bound.
                     seq.set(newUpBound + 1);
 
-                    seqView.put(key, seq);
+                    seqView.putx(key, seq);
 
                     tx.commit();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ad84583b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicStampedImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicStampedImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicStampedImpl.java
index 3596724..64f32fc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicStampedImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicStampedImpl.java
@@ -264,7 +264,7 @@ public final class GridCacheAtomicStampedImpl<T, S> implements GridCacheAtomicSt
 
                     stmp.set(val, stamp);
 
-                    atomicView.put(key, stmp);
+                    atomicView.putx(key, stmp);
 
                     tx.commit();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ad84583b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheCountDownLatchImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheCountDownLatchImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheCountDownLatchImpl.java
index cb85136..0febc22 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheCountDownLatchImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheCountDownLatchImpl.java
@@ -382,7 +382,7 @@ public final class GridCacheCountDownLatchImpl implements GridCacheCountDownLatc
 
                 latchVal.set(retVal);
 
-                latchView.put(key, latchVal);
+                latchView.putx(key, latchVal);
 
                 tx.commit();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ad84583b/modules/core/src/test/java/org/apache/ignite/marshaller/optimized/OptimizedObjectStreamSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/marshaller/optimized/OptimizedObjectStreamSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/marshaller/optimized/OptimizedObjectStreamSelfTest.java
index 2572b7e..dbed25e 100644
--- a/modules/core/src/test/java/org/apache/ignite/marshaller/optimized/OptimizedObjectStreamSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/marshaller/optimized/OptimizedObjectStreamSelfTest.java
@@ -1007,7 +1007,7 @@ public class OptimizedObjectStreamSelfTest extends GridCommonAbstractTest
{
 
         assertEquals(t.getMessage(), ((Throwable)marshalUnmarshal(t)).getMessage());
 
-        CacheFlagException flagEx = new CacheFlagException(CacheFlag.CLONE);
+        CacheFlagException flagEx = new CacheFlagException(CacheFlag.SKIP_STORE);
 
         assertEquals(flagEx.flags(), ((CacheFlagException)marshalUnmarshal(flagEx)).flags());
     }


Mime
View raw message