#ignite-629: Remove clone on get in GridCacheAtomicReferenceImpl and 
GridCacheAtomicStampedImpl.


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

Branch: refs/heads/gg-9998
Commit: a1725e140eddf9eeb77084089bebf67a414f8705
Parents: aa3864d
Author: ivasilinets <ivasilin...@gridgain.com>
Authored: Mon Mar 30 11:50:15 2015 +0300
Committer: ivasilinets <ivasilin...@gridgain.com>
Committed: Mon Mar 30 11:50:15 2015 +0300

----------------------------------------------------------------------
 .../datastructures/GridCacheAtomicReferenceImpl.java           | 6 +-----
 .../processors/datastructures/GridCacheAtomicStampedImpl.java  | 6 +-----
 2 files changed, 2 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a1725e14/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 273ae35..f8c71a7 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
@@ -70,11 +70,7 @@ public final class GridCacheAtomicReferenceImpl<T> 
implements GridCacheAtomicRef
     /** Callable for {@link #get} operation */
     private final Callable<T> getCall = new Callable<T>() {
         @Override public T call() throws Exception {
-            boolean clone = ctx.cache().configuration().getCacheMode() == 
CacheMode.LOCAL &&
-                ctx.cache().configuration().getAtomicityMode() == 
CacheAtomicityMode.ATOMIC;
-
-            GridCacheAtomicReferenceValue<T> ref = clone ? 
X.cloneObject(atomicView.get(key), false, true) :
-                atomicView.get(key);
+            GridCacheAtomicReferenceValue<T> ref = atomicView.get(key);
 
             if (ref == null)
                 throw new IgniteCheckedException("Failed to find atomic 
reference with given name: " + name);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a1725e14/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 86b19af..92e97cc 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
@@ -72,11 +72,7 @@ public final class GridCacheAtomicStampedImpl<T, S> 
implements GridCacheAtomicSt
     /** Callable for {@link #get()} operation */
     private final Callable<IgniteBiTuple<T, S>> getCall = new 
Callable<IgniteBiTuple<T, S>>() {
         @Override public IgniteBiTuple<T, S> call() throws Exception {
-            boolean clone = ctx.cache().configuration().getCacheMode() == 
CacheMode.LOCAL &&
-                ctx.cache().configuration().getAtomicityMode() == 
CacheAtomicityMode.ATOMIC;
-
-            GridCacheAtomicStampedValue<T, S> stmp = clone ? 
X.cloneObject(atomicView.get(key), false, true) :
-                atomicView.get(key);
+            GridCacheAtomicStampedValue<T, S> stmp = atomicView.get(key);
 
             if (stmp == null)
                 throw new IgniteCheckedException("Failed to find atomic 
stamped with given name: " + name);

Reply via email to