You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2016/09/07 11:17:14 UTC
[29/50] [abbrv] ignite git commit: WIP
WIP
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/5cc8ce0e
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/5cc8ce0e
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/5cc8ce0e
Branch: refs/heads/ignite-2649
Commit: 5cc8ce0e8e9d7151c9d40636ebd1e7afc01379c0
Parents: 4dc6294
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Wed Sep 7 12:17:44 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Wed Sep 7 12:17:44 2016 +0300
----------------------------------------------------------------------
.../internal/managers/communication/GridIoManager.java | 13 ++++++-------
.../processors/affinity/GridAffinityUtils.java | 5 ++---
2 files changed, 8 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/5cc8ce0e/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
index faedcea..8ba6a1c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
@@ -67,7 +67,6 @@ import org.apache.ignite.lang.IgniteInClosure;
import org.apache.ignite.lang.IgniteRunnable;
import org.apache.ignite.lang.IgniteUuid;
import org.apache.ignite.marshaller.Marshaller;
-import org.apache.ignite.marshaller.MarshallerUtils;
import org.apache.ignite.plugin.extensions.communication.IoPool;
import org.apache.ignite.plugin.extensions.communication.Message;
import org.apache.ignite.plugin.extensions.communication.MessageFactory;
@@ -595,7 +594,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
int topicOrd = msg.topicOrdinal();
msg.topic(topicOrd >= 0 ? GridTopic.fromOrdinal(topicOrd) :
- MarshallerUtils.unmarshal(ctx.gridName(), marsh, msg.topicBytes(), U.resolveClassLoader(ctx.config())));
+ marsh.unmarshal(msg.topicBytes(), U.resolveClassLoader(ctx.config())));
}
if (!started) {
@@ -1118,7 +1117,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
}
else {
if (topicOrd < 0)
- ioMsg.topicBytes(MarshallerUtils.marshal(ctx, topic));
+ ioMsg.topicBytes(marsh.marshal(topic));
try {
if ((CommunicationSpi)getSpi() instanceof TcpCommunicationSpi)
@@ -1378,10 +1377,10 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
byte[] serTopic = null;
if (!loc) {
- serMsg = MarshallerUtils.marshal(ctx, msg);
+ serMsg = marsh.marshal(msg);
if (topic != null)
- serTopic = MarshallerUtils.marshal(ctx, topic);
+ serTopic = marsh.marshal(topic);
}
GridDeployment dep = null;
@@ -2038,7 +2037,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
// Unmarshall message topic if needed.
if (msgTopic == null && msgTopicBytes != null) {
- msgTopic = MarshallerUtils.unmarshal(ctx.gridName(), marsh, msgTopicBytes,
+ msgTopic = marsh.unmarshal(msgTopicBytes,
U.resolveClassLoader(dep != null ? dep.classLoader() : null, ctx.config()));
ioMsg.topic(msgTopic); // Save topic to avoid future unmarshallings.
@@ -2048,7 +2047,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
return;
if (msgBody == null) {
- msgBody = MarshallerUtils.unmarshal(ctx.gridName(), marsh, ioMsg.bodyBytes(),
+ msgBody = marsh.unmarshal(ioMsg.bodyBytes(),
U.resolveClassLoader(dep != null ? dep.classLoader() : null, ctx.config()));
ioMsg.body(msgBody); // Save body to avoid future unmarshallings.
http://git-wip-us.apache.org/repos/asf/ignite/blob/5cc8ce0e/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityUtils.java
index 6f42e4d..f670960 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityUtils.java
@@ -37,7 +37,6 @@ import org.apache.ignite.internal.processors.task.GridInternal;
import org.apache.ignite.internal.util.lang.GridTuple3;
import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.marshaller.MarshallerUtils;
import org.apache.ignite.resources.IgniteInstanceResource;
import org.apache.ignite.resources.LoggerResource;
import org.jetbrains.annotations.NotNull;
@@ -78,7 +77,7 @@ class GridAffinityUtils {
throw new IgniteDeploymentCheckedException("Failed to deploy affinity object with class: " + cls.getName());
return new GridAffinityMessage(
- MarshallerUtils.marshal(ctx, o),
+ ctx.config().getMarshaller().marshal(o),
cls.getName(),
dep.classLoaderId(),
dep.deployMode(),
@@ -111,7 +110,7 @@ class GridAffinityUtils {
throw new IgniteDeploymentCheckedException("Failed to obtain affinity object (is peer class loading turned on?): " +
msg);
- Object src = MarshallerUtils.unmarshal(ctx.gridName(), ctx.config().getMarshaller(), msg.source(),
+ Object src = ctx.config().getMarshaller().unmarshal(msg.source(),
U.resolveClassLoader(dep.classLoader(), ctx.config()));
// Resource injection.