ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkuliche...@apache.org
Subject [3/3] incubator-ignite git commit: IGNITE-61 - Direct marshalling
Date Sun, 08 Feb 2015 23:08:48 GMT
IGNITE-61 - Direct marshalling


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

Branch: refs/heads/ignite-61
Commit: 46ea0dd7798c0098dd4a22ac9c0668a3aeebfbfe
Parents: 89977d7
Author: Valentin Kulichenko <vkulichenko@gridgain.com>
Authored: Sun Feb 8 15:07:34 2015 -0800
Committer: Valentin Kulichenko <vkulichenko@gridgain.com>
Committed: Sun Feb 8 15:07:34 2015 -0800

----------------------------------------------------------------------
 .../CommunicationMessageCodeGenerator.java      | 15 +++---------
 .../internal/direct/DirectByteBufferStream.java |  4 ++--
 .../deployment/GridDeploymentResponse.java      |  4 ++--
 .../processors/cache/GridCacheMessage.java      |  4 ++--
 ...idCacheOptimisticCheckPreparedTxRequest.java |  4 ++--
 ...CachePessimisticCheckCommittedTxRequest.java |  4 ++--
 .../distributed/GridDistributedBaseMessage.java |  4 ++--
 .../distributed/GridDistributedLockRequest.java |  4 ++--
 .../GridDistributedTxFinishRequest.java         |  8 +++----
 .../GridDistributedTxFinishResponse.java        |  4 ++--
 .../GridDistributedTxPrepareRequest.java        |  4 ++--
 .../distributed/dht/GridDhtTxFinishRequest.java | 12 +++++-----
 .../dht/GridDhtTxPrepareRequest.java            |  4 ++--
 .../dht/atomic/GridDhtAtomicUpdateRequest.java  | 24 ++++++++++----------
 .../dht/atomic/GridDhtAtomicUpdateResponse.java |  4 ++--
 .../dht/atomic/GridNearAtomicUpdateRequest.java | 16 ++++++-------
 .../atomic/GridNearAtomicUpdateResponse.java    | 16 ++++++-------
 .../GridDhtPartitionsAbstractMessage.java       |  8 +++----
 .../distributed/near/GridNearGetRequest.java    |  4 ++--
 .../distributed/near/GridNearGetResponse.java   |  4 ++--
 .../near/GridNearTxPrepareResponse.java         |  4 ++--
 .../clock/GridClockDeltaSnapshotMessage.java    |  4 ++--
 22 files changed, 75 insertions(+), 84 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/46ea0dd7/modules/codegen/src/main/java/org/apache/ignite/codegen/CommunicationMessageCodeGenerator.java
----------------------------------------------------------------------
diff --git a/modules/codegen/src/main/java/org/apache/ignite/codegen/CommunicationMessageCodeGenerator.java
b/modules/codegen/src/main/java/org/apache/ignite/codegen/CommunicationMessageCodeGenerator.java
index 591a019..a367437 100644
--- a/modules/codegen/src/main/java/org/apache/ignite/codegen/CommunicationMessageCodeGenerator.java
+++ b/modules/codegen/src/main/java/org/apache/ignite/codegen/CommunicationMessageCodeGenerator.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.codegen;
 
 import org.apache.ignite.internal.*;
-import org.apache.ignite.internal.managers.communication.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.plugin.extensions.communication.*;
@@ -85,9 +84,6 @@ public class CommunicationMessageCodeGenerator {
     private final Map<Class<?>, Integer> fieldCnt = new HashMap<>();
 
     /** */
-    private Class<? extends MessageAdapter> curCls;
-
-    /** */
     private List<Field> fields;
 
     /** */
@@ -245,8 +241,6 @@ public class CommunicationMessageCodeGenerator {
     public void generate(Class<? extends MessageAdapter> cls) throws Exception {
         assert cls != null;
 
-        curCls = cls;
-
         write.clear();
         read.clear();
         clone.clear();
@@ -300,7 +294,7 @@ public class CommunicationMessageCodeGenerator {
 
                 String res = name;
 
-                if (curCls.equals(GridIoMessage.class) && BASE_CLS.isAssignableFrom(type))
+                if (BASE_CLS.isAssignableFrom(type))
                     res = name + " != null ? (" + type.getSimpleName() + ")" + name + ".clone()
: null";
 
                 clone0.add(builder().a("_clone.").a(name).a(" = ").a(res).a(";").toString());
@@ -535,11 +529,8 @@ public class CommunicationMessageCodeGenerator {
             returnFalseIfFailed(write, "writer.writeIgniteUuid", field, name);
         else if (type.isEnum())
             returnFalseIfFailed(write, "writer.writeEnum", field, name);
-        else if (BASE_CLS.isAssignableFrom(type)) {
-            String arg = curCls.equals(GridIoMessage.class) ? name : name + " != null ? "
+ name + ".clone() : null";
-
-            returnFalseIfFailed(write, "writer.writeMessage", field, arg);
-        }
+        else if (BASE_CLS.isAssignableFrom(type))
+            returnFalseIfFailed(write, "writer.writeMessage", field, name);
         else if (type.isArray()) {
             returnFalseIfFailed(write, "writer.writeObjectArray", field, name,
                 type.getComponentType().getSimpleName() + ".class");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/46ea0dd7/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectByteBufferStream.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectByteBufferStream.java
b/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectByteBufferStream.java
index 9a0c46e..fe8d2b8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectByteBufferStream.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectByteBufferStream.java
@@ -572,7 +572,7 @@ public class DirectByteBufferStream {
                 if (cur == NULL) {
                     cur = it.next();
 
-                    if (itemType == Type.MSG)
+                    if (cur != null && itemType == Type.MSG)
                         cur = ((MessageAdapter)cur).clone();
                 }
 
@@ -607,7 +607,7 @@ public class DirectByteBufferStream {
                 if (cur == NULL) {
                     cur = it.next();
 
-                    if (itemType == Type.MSG)
+                    if (cur != null && itemType == Type.MSG)
                         cur = ((MessageAdapter)cur).clone();
                 }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/46ea0dd7/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentResponse.java
b/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentResponse.java
index c46d7f3..9c54b84 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentResponse.java
@@ -121,7 +121,7 @@ public class GridDeploymentResponse extends MessageAdapter {
 
         _clone.success = success;
         _clone.errMsg = errMsg;
-        _clone.byteSrc = byteSrc;
+        _clone.byteSrc = byteSrc != null ? (GridByteArrayList)byteSrc.clone() : null;
     }
 
     /** {@inheritDoc} */
@@ -138,7 +138,7 @@ public class GridDeploymentResponse extends MessageAdapter {
 
         switch (state) {
             case 0:
-                if (!writer.writeMessage("byteSrc", byteSrc != null ? byteSrc.clone() : null))
+                if (!writer.writeMessage("byteSrc", byteSrc))
                     return false;
 
                 state++;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/46ea0dd7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMessage.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMessage.java
index dc8feee..822f647 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMessage.java
@@ -648,7 +648,7 @@ public abstract class GridCacheMessage<K, V> extends MessageAdapter
{
         GridCacheMessage _clone = (GridCacheMessage)_msg;
 
         _clone.msgId = msgId;
-        _clone.depInfo = depInfo;
+        _clone.depInfo = depInfo != null ? (GridDeploymentInfoBean)depInfo.clone() : null;
         _clone.err = err;
         _clone.skipPrepare = skipPrepare;
         _clone.cacheId = cacheId;
@@ -674,7 +674,7 @@ public abstract class GridCacheMessage<K, V> extends MessageAdapter
{
                 state++;
 
             case 1:
-                if (!writer.writeMessage("depInfo", depInfo != null ? depInfo.clone() : null))
+                if (!writer.writeMessage("depInfo", depInfo))
                     return false;
 
                 state++;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/46ea0dd7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxRequest.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxRequest.java
index 914f150..f20f273 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheOptimisticCheckPreparedTxRequest.java
@@ -114,7 +114,7 @@ public class GridCacheOptimisticCheckPreparedTxRequest<K, V> extends
GridDistrib
 
         _clone.futId = futId;
         _clone.miniId = miniId;
-        _clone.nearXidVer = nearXidVer;
+        _clone.nearXidVer = nearXidVer != null ? (GridCacheVersion)nearXidVer.clone() : null;
         _clone.txNum = txNum;
     }
 
@@ -147,7 +147,7 @@ public class GridCacheOptimisticCheckPreparedTxRequest<K, V> extends
GridDistrib
                 state++;
 
             case 10:
-                if (!writer.writeMessage("nearXidVer", nearXidVer != null ? nearXidVer.clone()
: null))
+                if (!writer.writeMessage("nearXidVer", nearXidVer))
                     return false;
 
                 state++;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/46ea0dd7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxRequest.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxRequest.java
index 0aeabaf..b4a6833 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePessimisticCheckCommittedTxRequest.java
@@ -145,7 +145,7 @@ public class GridCachePessimisticCheckCommittedTxRequest<K, V> extends
GridDistr
 
         _clone.futId = futId;
         _clone.miniId = miniId;
-        _clone.nearXidVer = nearXidVer;
+        _clone.nearXidVer = nearXidVer != null ? (GridCacheVersion)nearXidVer.clone() : null;
         _clone.originatingNodeId = originatingNodeId;
         _clone.originatingThreadId = originatingThreadId;
         _clone.nearOnlyCheck = nearOnlyCheck;
@@ -186,7 +186,7 @@ public class GridCachePessimisticCheckCommittedTxRequest<K, V> extends
GridDistr
                 state++;
 
             case 11:
-                if (!writer.writeMessage("nearXidVer", nearXidVer != null ? nearXidVer.clone()
: null))
+                if (!writer.writeMessage("nearXidVer", nearXidVer))
                     return false;
 
                 state++;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/46ea0dd7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedBaseMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedBaseMessage.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedBaseMessage.java
index 0c82e02..4c7b959 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedBaseMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedBaseMessage.java
@@ -245,7 +245,7 @@ public abstract class GridDistributedBaseMessage<K, V> extends GridCacheMessage<
 
         GridDistributedBaseMessage _clone = (GridDistributedBaseMessage)_msg;
 
-        _clone.ver = ver;
+        _clone.ver = ver != null ? (GridCacheVersion)ver.clone() : null;
         _clone.candsByIdx = candsByIdx;
         _clone.candsByIdxBytes = candsByIdxBytes;
         _clone.candsByKey = candsByKey;
@@ -296,7 +296,7 @@ public abstract class GridDistributedBaseMessage<K, V> extends GridCacheMessage<
                 state++;
 
             case 7:
-                if (!writer.writeMessage("ver", ver != null ? ver.clone() : null))
+                if (!writer.writeMessage("ver", ver))
                     return false;
 
                 state++;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/46ea0dd7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockRequest.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockRequest.java
index a3f54c2..1f77a01 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedLockRequest.java
@@ -443,7 +443,7 @@ public class GridDistributedLockRequest<K, V> extends GridDistributedBaseMessage
         GridDistributedLockRequest _clone = (GridDistributedLockRequest)_msg;
 
         _clone.nodeId = nodeId;
-        _clone.nearXidVer = nearXidVer;
+        _clone.nearXidVer = nearXidVer != null ? (GridCacheVersion)nearXidVer.clone() : null;
         _clone.threadId = threadId;
         _clone.futId = futId;
         _clone.timeout = timeout;
@@ -529,7 +529,7 @@ public class GridDistributedLockRequest<K, V> extends GridDistributedBaseMessage
                 state++;
 
             case 16:
-                if (!writer.writeMessage("nearXidVer", nearXidVer != null ? nearXidVer.clone()
: null))
+                if (!writer.writeMessage("nearXidVer", nearXidVer))
                     return false;
 
                 state++;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/46ea0dd7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishRequest.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishRequest.java
index ee4893d..d8cc296 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishRequest.java
@@ -362,12 +362,12 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
 
         _clone.futId = futId;
         _clone.threadId = threadId;
-        _clone.commitVer = commitVer;
+        _clone.commitVer = commitVer != null ? (GridCacheVersion)commitVer.clone() : null;
         _clone.invalidate = invalidate;
         _clone.commit = commit;
         _clone.syncCommit = syncCommit;
         _clone.syncRollback = syncRollback;
-        _clone.baseVer = baseVer;
+        _clone.baseVer = baseVer != null ? (GridCacheVersion)baseVer.clone() : null;
         _clone.writeEntries = writeEntries;
         _clone.writeEntriesBytes = writeEntriesBytes;
         _clone.recoveryWrites = recoveryWrites;
@@ -395,7 +395,7 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
 
         switch (state) {
             case 8:
-                if (!writer.writeMessage("baseVer", baseVer != null ? baseVer.clone() : null))
+                if (!writer.writeMessage("baseVer", baseVer))
                     return false;
 
                 state++;
@@ -407,7 +407,7 @@ public class GridDistributedTxFinishRequest<K, V> extends GridDistributedBaseMes
                 state++;
 
             case 10:
-                if (!writer.writeMessage("commitVer", commitVer != null ? commitVer.clone()
: null))
+                if (!writer.writeMessage("commitVer", commitVer))
                     return false;
 
                 state++;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/46ea0dd7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishResponse.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishResponse.java
index ab43a67..e31c24f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxFinishResponse.java
@@ -90,7 +90,7 @@ public class GridDistributedTxFinishResponse<K, V> extends GridCacheMessage<K,
V
 
         GridDistributedTxFinishResponse _clone = (GridDistributedTxFinishResponse)_msg;
 
-        _clone.txId = txId;
+        _clone.txId = txId != null ? (GridCacheVersion)txId.clone() : null;
         _clone.futId = futId;
     }
 
@@ -117,7 +117,7 @@ public class GridDistributedTxFinishResponse<K, V> extends GridCacheMessage<K,
V
                 state++;
 
             case 4:
-                if (!writer.writeMessage("txId", txId != null ? txId.clone() : null))
+                if (!writer.writeMessage("txId", txId))
                     return false;
 
                 state++;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/46ea0dd7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
index 426c4fe..54d7757 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxPrepareRequest.java
@@ -421,7 +421,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
         _clone.threadId = threadId;
         _clone.concurrency = concurrency;
         _clone.isolation = isolation;
-        _clone.commitVer = commitVer;
+        _clone.commitVer = commitVer != null ? (GridCacheVersion)commitVer.clone() : null;
         _clone.timeout = timeout;
         _clone.invalidate = invalidate;
         _clone.reads = reads;
@@ -456,7 +456,7 @@ public class GridDistributedTxPrepareRequest<K, V> extends GridDistributedBaseMe
 
         switch (state) {
             case 8:
-                if (!writer.writeMessage("commitVer", commitVer != null ? commitVer.clone()
: null))
+                if (!writer.writeMessage("commitVer", commitVer))
                     return false;
 
                 state++;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/46ea0dd7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
index adc6df9..9bdf4bd 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxFinishRequest.java
@@ -372,11 +372,11 @@ public class GridDhtTxFinishRequest<K, V> extends GridDistributedTxFinishRequest
         _clone.topVer = topVer;
         _clone.pendingVers = pendingVers;
         _clone.onePhaseCommit = onePhaseCommit;
-        _clone.writeVer = writeVer;
+        _clone.writeVer = writeVer != null ? (GridCacheVersion)writeVer.clone() : null;
         _clone.subjId = subjId;
         _clone.taskNameHash = taskNameHash;
-        _clone.ttls = ttls;
-        _clone.nearTtls = nearTtls;
+        _clone.ttls = ttls != null ? (GridLongList)ttls.clone() : null;
+        _clone.nearTtls = nearTtls != null ? (GridLongList)nearTtls.clone() : null;
     }
 
     /** {@inheritDoc} */
@@ -414,7 +414,7 @@ public class GridDhtTxFinishRequest<K, V> extends GridDistributedTxFinishRequest
                 state++;
 
             case 24:
-                if (!writer.writeMessage("nearTtls", nearTtls != null ? nearTtls.clone()
: null))
+                if (!writer.writeMessage("nearTtls", nearTtls))
                     return false;
 
                 state++;
@@ -462,13 +462,13 @@ public class GridDhtTxFinishRequest<K, V> extends GridDistributedTxFinishRequest
                 state++;
 
             case 32:
-                if (!writer.writeMessage("ttls", ttls != null ? ttls.clone() : null))
+                if (!writer.writeMessage("ttls", ttls))
                     return false;
 
                 state++;
 
             case 33:
-                if (!writer.writeMessage("writeVer", writeVer != null ? writeVer.clone()
: null))
+                if (!writer.writeMessage("writeVer", writeVer))
                     return false;
 
                 state++;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/46ea0dd7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
index a57827c..92078f6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareRequest.java
@@ -336,7 +336,7 @@ public class GridDhtTxPrepareRequest<K, V> extends GridDistributedTxPrepareReque
         _clone.nearWritesBytes = nearWritesBytes;
         _clone.owned = owned;
         _clone.ownedBytes = ownedBytes;
-        _clone.nearXidVer = nearXidVer;
+        _clone.nearXidVer = nearXidVer != null ? (GridCacheVersion)nearXidVer.clone() : null;
         _clone.last = last;
         _clone.subjId = subjId;
         _clone.taskNameHash = taskNameHash;
@@ -396,7 +396,7 @@ public class GridDhtTxPrepareRequest<K, V> extends GridDistributedTxPrepareReque
                 state++;
 
             case 28:
-                if (!writer.writeMessage("nearXidVer", nearXidVer != null ? nearXidVer.clone()
: null))
+                if (!writer.writeMessage("nearXidVer", nearXidVer))
                     return false;
 
                 state++;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/46ea0dd7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateRequest.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateRequest.java
index 6b59e82..7672f6c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateRequest.java
@@ -697,18 +697,18 @@ public class GridDhtAtomicUpdateRequest<K, V> extends GridCacheMessage<K,
V> imp
         GridDhtAtomicUpdateRequest _clone = (GridDhtAtomicUpdateRequest)_msg;
 
         _clone.nodeId = nodeId;
-        _clone.futVer = futVer;
-        _clone.writeVer = writeVer;
+        _clone.futVer = futVer != null ? (GridCacheVersion)futVer.clone() : null;
+        _clone.writeVer = writeVer != null ? (GridCacheVersion)writeVer.clone() : null;
         _clone.topVer = topVer;
         _clone.keys = keys;
         _clone.keyBytes = keyBytes;
         _clone.vals = vals;
         _clone.valBytes = valBytes;
         _clone.drVers = drVers;
-        _clone.ttls = ttls;
-        _clone.drExpireTimes = drExpireTimes;
-        _clone.nearTtls = nearTtls;
-        _clone.nearExpireTimes = nearExpireTimes;
+        _clone.ttls = ttls != null ? (GridLongList)ttls.clone() : null;
+        _clone.drExpireTimes = drExpireTimes != null ? (GridLongList)drExpireTimes.clone()
: null;
+        _clone.nearTtls = nearTtls != null ? (GridLongList)nearTtls.clone() : null;
+        _clone.nearExpireTimes = nearExpireTimes != null ? (GridLongList)nearExpireTimes.clone()
: null;
         _clone.syncMode = syncMode;
         _clone.nearKeys = nearKeys;
         _clone.nearKeyBytes = nearKeyBytes;
@@ -742,7 +742,7 @@ public class GridDhtAtomicUpdateRequest<K, V> extends GridCacheMessage<K,
V> imp
 
         switch (state) {
             case 3:
-                if (!writer.writeMessage("drExpireTimes", drExpireTimes != null ? drExpireTimes.clone()
: null))
+                if (!writer.writeMessage("drExpireTimes", drExpireTimes))
                     return false;
 
                 state++;
@@ -766,7 +766,7 @@ public class GridDhtAtomicUpdateRequest<K, V> extends GridCacheMessage<K,
V> imp
                 state++;
 
             case 7:
-                if (!writer.writeMessage("futVer", futVer != null ? futVer.clone() : null))
+                if (!writer.writeMessage("futVer", futVer))
                     return false;
 
                 state++;
@@ -790,7 +790,7 @@ public class GridDhtAtomicUpdateRequest<K, V> extends GridCacheMessage<K,
V> imp
                 state++;
 
             case 11:
-                if (!writer.writeMessage("nearExpireTimes", nearExpireTimes != null ? nearExpireTimes.clone()
: null))
+                if (!writer.writeMessage("nearExpireTimes", nearExpireTimes))
                     return false;
 
                 state++;
@@ -802,7 +802,7 @@ public class GridDhtAtomicUpdateRequest<K, V> extends GridCacheMessage<K,
V> imp
                 state++;
 
             case 13:
-                if (!writer.writeMessage("nearTtls", nearTtls != null ? nearTtls.clone()
: null))
+                if (!writer.writeMessage("nearTtls", nearTtls))
                     return false;
 
                 state++;
@@ -844,7 +844,7 @@ public class GridDhtAtomicUpdateRequest<K, V> extends GridCacheMessage<K,
V> imp
                 state++;
 
             case 20:
-                if (!writer.writeMessage("ttls", ttls != null ? ttls.clone() : null))
+                if (!writer.writeMessage("ttls", ttls))
                     return false;
 
                 state++;
@@ -856,7 +856,7 @@ public class GridDhtAtomicUpdateRequest<K, V> extends GridCacheMessage<K,
V> imp
                 state++;
 
             case 22:
-                if (!writer.writeMessage("writeVer", writeVer != null ? writeVer.clone()
: null))
+                if (!writer.writeMessage("writeVer", writeVer))
                     return false;
 
                 state++;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/46ea0dd7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateResponse.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateResponse.java
index 256c4b6..94be1c3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateResponse.java
@@ -193,7 +193,7 @@ public class GridDhtAtomicUpdateResponse<K, V> extends GridCacheMessage<K,
V> im
 
         GridDhtAtomicUpdateResponse _clone = (GridDhtAtomicUpdateResponse)_msg;
 
-        _clone.futVer = futVer;
+        _clone.futVer = futVer != null ? (GridCacheVersion)futVer.clone() : null;
         _clone.failedKeys = failedKeys;
         _clone.failedKeysBytes = failedKeysBytes;
         _clone.err = err;
@@ -231,7 +231,7 @@ public class GridDhtAtomicUpdateResponse<K, V> extends GridCacheMessage<K,
V> im
                 state++;
 
             case 5:
-                if (!writer.writeMessage("futVer", futVer != null ? futVer.clone() : null))
+                if (!writer.writeMessage("futVer", futVer))
                     return false;
 
                 state++;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/46ea0dd7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java
index cf23451..894a80f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateRequest.java
@@ -558,9 +558,9 @@ public class GridNearAtomicUpdateRequest<K, V> extends GridCacheMessage<K,
V> im
         GridNearAtomicUpdateRequest _clone = (GridNearAtomicUpdateRequest)_msg;
 
         _clone.nodeId = nodeId;
-        _clone.futVer = futVer;
+        _clone.futVer = futVer != null ? (GridCacheVersion)futVer.clone() : null;
         _clone.fastMap = fastMap;
-        _clone.updateVer = updateVer;
+        _clone.updateVer = updateVer != null ? (GridCacheVersion)updateVer.clone() : null;
         _clone.topVer = topVer;
         _clone.syncMode = syncMode;
         _clone.op = op;
@@ -571,8 +571,8 @@ public class GridNearAtomicUpdateRequest<K, V> extends GridCacheMessage<K,
V> im
         _clone.invokeArgs = invokeArgs;
         _clone.invokeArgsBytes = invokeArgsBytes;
         _clone.drVers = drVers;
-        _clone.drTtls = drTtls;
-        _clone.drExpireTimes = drExpireTimes;
+        _clone.drTtls = drTtls != null ? (GridLongList)drTtls.clone() : null;
+        _clone.drExpireTimes = drExpireTimes != null ? (GridLongList)drExpireTimes.clone()
: null;
         _clone.retval = retval;
         _clone.expiryPlc = expiryPlc;
         _clone.expiryPlcBytes = expiryPlcBytes;
@@ -601,13 +601,13 @@ public class GridNearAtomicUpdateRequest<K, V> extends GridCacheMessage<K,
V> im
 
         switch (state) {
             case 3:
-                if (!writer.writeMessage("drExpireTimes", drExpireTimes != null ? drExpireTimes.clone()
: null))
+                if (!writer.writeMessage("drExpireTimes", drExpireTimes))
                     return false;
 
                 state++;
 
             case 4:
-                if (!writer.writeMessage("drTtls", drTtls != null ? drTtls.clone() : null))
+                if (!writer.writeMessage("drTtls", drTtls))
                     return false;
 
                 state++;
@@ -643,7 +643,7 @@ public class GridNearAtomicUpdateRequest<K, V> extends GridCacheMessage<K,
V> im
                 state++;
 
             case 10:
-                if (!writer.writeMessage("futVer", futVer != null ? futVer.clone() : null))
+                if (!writer.writeMessage("futVer", futVer))
                     return false;
 
                 state++;
@@ -703,7 +703,7 @@ public class GridNearAtomicUpdateRequest<K, V> extends GridCacheMessage<K,
V> im
                 state++;
 
             case 20:
-                if (!writer.writeMessage("updateVer", updateVer != null ? updateVer.clone()
: null))
+                if (!writer.writeMessage("updateVer", updateVer))
                     return false;
 
                 state++;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/46ea0dd7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateResponse.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateResponse.java
index 23bca9b..05b7463 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateResponse.java
@@ -434,7 +434,7 @@ public class GridNearAtomicUpdateResponse<K, V> extends GridCacheMessage<K,
V> i
         GridNearAtomicUpdateResponse _clone = (GridNearAtomicUpdateResponse)_msg;
 
         _clone.nodeId = nodeId;
-        _clone.futVer = futVer;
+        _clone.futVer = futVer != null ? (GridCacheVersion)futVer.clone() : null;
         _clone.err = err;
         _clone.errBytes = errBytes;
         _clone.retVal = retVal;
@@ -447,9 +447,9 @@ public class GridNearAtomicUpdateResponse<K, V> extends GridCacheMessage<K,
V> i
         _clone.nearSkipIdxs = nearSkipIdxs;
         _clone.nearVals = nearVals;
         _clone.nearValBytes = nearValBytes;
-        _clone.nearVer = nearVer;
-        _clone.nearTtls = nearTtls;
-        _clone.nearExpireTimes = nearExpireTimes;
+        _clone.nearVer = nearVer != null ? (GridCacheVersion)nearVer.clone() : null;
+        _clone.nearTtls = nearTtls != null ? (GridLongList)nearTtls.clone() : null;
+        _clone.nearExpireTimes = nearExpireTimes != null ? (GridLongList)nearExpireTimes.clone()
: null;
     }
 
     /** {@inheritDoc} */
@@ -481,13 +481,13 @@ public class GridNearAtomicUpdateResponse<K, V> extends GridCacheMessage<K,
V> i
                 state++;
 
             case 5:
-                if (!writer.writeMessage("futVer", futVer != null ? futVer.clone() : null))
+                if (!writer.writeMessage("futVer", futVer))
                     return false;
 
                 state++;
 
             case 6:
-                if (!writer.writeMessage("nearExpireTimes", nearExpireTimes != null ? nearExpireTimes.clone()
: null))
+                if (!writer.writeMessage("nearExpireTimes", nearExpireTimes))
                     return false;
 
                 state++;
@@ -499,7 +499,7 @@ public class GridNearAtomicUpdateResponse<K, V> extends GridCacheMessage<K,
V> i
                 state++;
 
             case 8:
-                if (!writer.writeMessage("nearTtls", nearTtls != null ? nearTtls.clone()
: null))
+                if (!writer.writeMessage("nearTtls", nearTtls))
                     return false;
 
                 state++;
@@ -517,7 +517,7 @@ public class GridNearAtomicUpdateResponse<K, V> extends GridCacheMessage<K,
V> i
                 state++;
 
             case 11:
-                if (!writer.writeMessage("nearVer", nearVer != null ? nearVer.clone() : null))
+                if (!writer.writeMessage("nearVer", nearVer))
                     return false;
 
                 state++;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/46ea0dd7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsAbstractMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsAbstractMessage.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsAbstractMessage.java
index 961da85..763152a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsAbstractMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsAbstractMessage.java
@@ -80,8 +80,8 @@ abstract class GridDhtPartitionsAbstractMessage<K, V> extends GridCacheMessage<K
 
         GridDhtPartitionsAbstractMessage _clone = (GridDhtPartitionsAbstractMessage)_msg;
 
-        _clone.exchId = exchId;
-        _clone.lastVer = lastVer;
+        _clone.exchId = exchId != null ? (GridDhtPartitionExchangeId)exchId.clone() : null;
+        _clone.lastVer = lastVer != null ? (GridCacheVersion)lastVer.clone() : null;
     }
 
     /** {@inheritDoc} */
@@ -101,13 +101,13 @@ abstract class GridDhtPartitionsAbstractMessage<K, V> extends
GridCacheMessage<K
 
         switch (state) {
             case 3:
-                if (!writer.writeMessage("exchId", exchId != null ? exchId.clone() : null))
+                if (!writer.writeMessage("exchId", exchId))
                     return false;
 
                 state++;
 
             case 4:
-                if (!writer.writeMessage("lastVer", lastVer != null ? lastVer.clone() : null))
+                if (!writer.writeMessage("lastVer", lastVer))
                     return false;
 
                 state++;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/46ea0dd7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java
index 44088aa..0e96170 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java
@@ -265,7 +265,7 @@ public class GridNearGetRequest<K, V> extends GridCacheMessage<K,
V> implements
 
         _clone.futId = futId;
         _clone.miniId = miniId;
-        _clone.ver = ver;
+        _clone.ver = ver != null ? (GridCacheVersion)ver.clone() : null;
         _clone.keys = keys;
         _clone.reload = reload;
         _clone.readThrough = readThrough;
@@ -355,7 +355,7 @@ public class GridNearGetRequest<K, V> extends GridCacheMessage<K,
V> implements
                 state++;
 
             case 13:
-                if (!writer.writeMessage("ver", ver != null ? ver.clone() : null))
+                if (!writer.writeMessage("ver", ver))
                     return false;
 
                 state++;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/46ea0dd7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetResponse.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetResponse.java
index 63c9e46..93d48fb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetResponse.java
@@ -217,7 +217,7 @@ public class GridNearGetResponse<K, V> extends GridCacheMessage<K,
V> implements
 
         _clone.futId = futId;
         _clone.miniId = miniId;
-        _clone.ver = ver;
+        _clone.ver = ver != null ? (GridCacheVersion)ver.clone() : null;
         _clone.entries = entries;
         _clone.entriesBytes = entriesBytes;
         _clone.invalidParts = invalidParts;
@@ -279,7 +279,7 @@ public class GridNearGetResponse<K, V> extends GridCacheMessage<K,
V> implements
                 state++;
 
             case 9:
-                if (!writer.writeMessage("ver", ver != null ? ver.clone() : null))
+                if (!writer.writeMessage("ver", ver))
                     return false;
 
                 state++;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/46ea0dd7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareResponse.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareResponse.java
index 8eb63b1..8de39b9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareResponse.java
@@ -242,7 +242,7 @@ public class GridNearTxPrepareResponse<K, V> extends GridDistributedTxPrepareRes
         _clone.pending = pending;
         _clone.futId = futId;
         _clone.miniId = miniId;
-        _clone.dhtVer = dhtVer;
+        _clone.dhtVer = dhtVer != null ? (GridCacheVersion)dhtVer.clone() : null;
         _clone.invalidParts = invalidParts;
         _clone.ownedVals = ownedVals;
         _clone.ownedValsBytes = ownedValsBytes;
@@ -265,7 +265,7 @@ public class GridNearTxPrepareResponse<K, V> extends GridDistributedTxPrepareRes
 
         switch (state) {
             case 10:
-                if (!writer.writeMessage("dhtVer", dhtVer != null ? dhtVer.clone() : null))
+                if (!writer.writeMessage("dhtVer", dhtVer))
                     return false;
 
                 state++;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/46ea0dd7/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaSnapshotMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaSnapshotMessage.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaSnapshotMessage.java
index 61fe044..8063d2a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaSnapshotMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaSnapshotMessage.java
@@ -85,7 +85,7 @@ public class GridClockDeltaSnapshotMessage extends MessageAdapter {
     @Override protected void clone0(MessageAdapter _msg) {
         GridClockDeltaSnapshotMessage _clone = (GridClockDeltaSnapshotMessage)_msg;
 
-        _clone.snapVer = snapVer;
+        _clone.snapVer = snapVer != null ? (GridClockDeltaVersion)snapVer.clone() : null;
         _clone.deltas = deltas;
     }
 
@@ -109,7 +109,7 @@ public class GridClockDeltaSnapshotMessage extends MessageAdapter {
                 state++;
 
             case 1:
-                if (!writer.writeMessage("snapVer", snapVer != null ? snapVer.clone() : null))
+                if (!writer.writeMessage("snapVer", snapVer))
                     return false;
 
                 state++;


Mime
View raw message