ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [33/50] [abbrv] ignite git commit: WIP
Date Wed, 07 Sep 2016 11:17:18 GMT
WIP


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

Branch: refs/heads/ignite-2649
Commit: bb65c7f020c6ad8e3da298a233b8cd76091f6f2b
Parents: 66917b3
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Wed Sep 7 12:29:37 2016 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Wed Sep 7 12:29:37 2016 +0300

----------------------------------------------------------------------
 .../cache/CacheEntrySerializablePredicate.java         |  7 ++-----
 .../processors/cache/CacheInvokeDirectResult.java      | 10 +++-------
 .../internal/processors/cache/GridCacheMessage.java    | 13 ++++---------
 .../processors/cache/transactions/IgniteTxEntry.java   | 11 ++++-------
 .../cache/version/GridCacheRawVersionedEntry.java      |  7 ++-----
 5 files changed, 15 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/bb65c7f0/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntrySerializablePredicate.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntrySerializablePredicate.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntrySerializablePredicate.java
index f3cf1e5..61b6db3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntrySerializablePredicate.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntrySerializablePredicate.java
@@ -21,8 +21,6 @@ import java.nio.ByteBuffer;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.internal.GridDirectTransient;
 import org.apache.ignite.internal.util.tostring.GridToStringInclude;
-import org.apache.ignite.internal.util.typedef.internal.CU;
-import org.apache.ignite.marshaller.MarshallerUtils;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.plugin.extensions.communication.MessageReader;
 import org.apache.ignite.plugin.extensions.communication.MessageWriter;
@@ -82,8 +80,7 @@ public class CacheEntrySerializablePredicate implements CacheEntryPredicate
{
         assert p != null || bytes != null;
 
         if (p == null) {
-            p = MarshallerUtils.unmarshal(ctx.gridName(), ctx.marshaller(), bytes,
-                U.resolveClassLoader(ldr, ctx.gridConfig()));
+            p = ctx.marshaller().unmarshal(bytes, U.resolveClassLoader(ldr, ctx.gridConfig()));
 
             p.finishUnmarshal(ctx, ldr);
         }
@@ -95,7 +92,7 @@ public class CacheEntrySerializablePredicate implements CacheEntryPredicate
{
 
         p.prepareMarshal(ctx);
 
-        bytes = CU.marshal(ctx, p);
+        bytes = ctx.marshaller().marshal(p);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/bb65c7f0/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeDirectResult.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeDirectResult.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeDirectResult.java
index fb4b830..c6e8bee 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeDirectResult.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeDirectResult.java
@@ -23,9 +23,7 @@ import javax.cache.processor.MutableEntry;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.internal.GridDirectTransient;
 import org.apache.ignite.internal.util.tostring.GridToStringInclude;
-import org.apache.ignite.internal.util.typedef.internal.CU;
 import org.apache.ignite.internal.util.typedef.internal.S;
-import org.apache.ignite.marshaller.MarshallerUtils;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.plugin.extensions.communication.Message;
 import org.apache.ignite.plugin.extensions.communication.MessageReader;
@@ -108,7 +106,7 @@ public class CacheInvokeDirectResult implements Message {
         key.prepareMarshal(ctx.cacheObjectContext());
 
         if (err != null)
-            errBytes = CU.marshal(ctx, err);
+            errBytes = ctx.marshaller().marshal(err);
 
         if (res != null)
             res.prepareMarshal(ctx.cacheObjectContext());
@@ -122,10 +120,8 @@ public class CacheInvokeDirectResult implements Message {
     public void finishUnmarshal(GridCacheContext ctx, ClassLoader ldr) throws IgniteCheckedException
{
         key.finishUnmarshal(ctx.cacheObjectContext(), ldr);
 
-        if (errBytes != null) {
-            err = MarshallerUtils.unmarshal(ctx.gridName(), ctx.marshaller(), errBytes,
-                U.resolveClassLoader(ldr, ctx.gridConfig()));
-        }
+        if (errBytes != null)
+            err = ctx.marshaller().unmarshal(errBytes, U.resolveClassLoader(ldr, ctx.gridConfig()));
 
         if (res != null)
             res.finishUnmarshal(ctx.cacheObjectContext(), ldr);

http://git-wip-us.apache.org/repos/asf/ignite/blob/bb65c7f0/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 53a0c16..f99d2cd 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
@@ -37,7 +37,6 @@ import org.apache.ignite.internal.util.typedef.internal.CU;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.marshaller.Marshaller;
-import org.apache.ignite.marshaller.MarshallerUtils;
 import org.apache.ignite.plugin.extensions.communication.Message;
 import org.apache.ignite.plugin.extensions.communication.MessageReader;
 import org.apache.ignite.plugin.extensions.communication.MessageWriter;
@@ -458,10 +457,8 @@ public abstract class GridCacheMessage implements Message {
 
         Marshaller marsh = ctx.marshaller();
 
-        for (int i = 0; i < byteCol.length; i++) {
-            args[i] = byteCol[i] == null ? null : MarshallerUtils.unmarshal(ctx.gridName(),
marsh, byteCol[i],
-                U.resolveClassLoader(ldr, ctx.gridConfig()));
-        }
+        for (int i = 0; i < byteCol.length; i++)
+            args[i] = byteCol[i] == null ? null : marsh.unmarshal(byteCol[i], U.resolveClassLoader(ldr,
ctx.gridConfig()));
 
         return args;
     }
@@ -611,10 +608,8 @@ public abstract class GridCacheMessage implements Message {
 
         Marshaller marsh = ctx.marshaller();
 
-        for (byte[] bytes : byteCol) {
-            col.add(bytes == null ? null : MarshallerUtils.<T>unmarshal(ctx.gridName(),
marsh, bytes,
-                U.resolveClassLoader(ldr, ctx.gridConfig())));
-        }
+        for (byte[] bytes : byteCol)
+            col.add(bytes == null ? null : marsh.<T>unmarshal(bytes, U.resolveClassLoader(ldr,
ctx.gridConfig())));
 
         return col;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/bb65c7f0/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
index e7fc5de..3258ce9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java
@@ -48,7 +48,6 @@ import org.apache.ignite.internal.util.tostring.GridToStringInclude;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.T2;
 import org.apache.ignite.internal.util.typedef.internal.CU;
-import org.apache.ignite.marshaller.MarshallerUtils;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.plugin.extensions.communication.Message;
 import org.apache.ignite.plugin.extensions.communication.MessageCollectionItemType;
@@ -879,8 +878,8 @@ public class IgniteTxEntry implements GridPeerDeployAware, Message {
 
         // Unmarshal transform closure anyway if it exists.
         if (transformClosBytes != null && entryProcessorsCol == null)
-            entryProcessorsCol = MarshallerUtils.unmarshal(ctx.gridName(), ctx.marshaller(),
-                    transformClosBytes, U.resolveClassLoader(clsLdr, ctx.gridConfig()));
+            entryProcessorsCol = ctx.marshaller().unmarshal(transformClosBytes,
+                U.resolveClassLoader(clsLdr, ctx.gridConfig()));
 
         if (filters == null)
             filters = CU.empty0();
@@ -895,10 +894,8 @@ public class IgniteTxEntry implements GridPeerDeployAware, Message {
 
         val.unmarshal(this.ctx, clsLdr);
 
-        if (expiryPlcBytes != null) {
-            expiryPlc = MarshallerUtils.unmarshal(ctx.gridName(), ctx.marshaller(), expiryPlcBytes,
-                U.resolveClassLoader(clsLdr, ctx.gridConfig()));
-        }
+        if (expiryPlcBytes != null)
+            expiryPlc = ctx.marshaller().unmarshal(expiryPlcBytes, U.resolveClassLoader(clsLdr,
ctx.gridConfig()));
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/bb65c7f0/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheRawVersionedEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheRawVersionedEntry.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheRawVersionedEntry.java
index 5120822..4c5a704 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheRawVersionedEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheRawVersionedEntry.java
@@ -31,7 +31,6 @@ import org.apache.ignite.internal.processors.datastreamer.DataStreamerEntry;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.marshaller.Marshaller;
-import org.apache.ignite.marshaller.MarshallerUtils;
 import org.apache.ignite.plugin.extensions.communication.MessageReader;
 import org.apache.ignite.plugin.extensions.communication.MessageWriter;
 import org.jetbrains.annotations.Nullable;
@@ -192,8 +191,7 @@ public class GridCacheRawVersionedEntry<K, V> extends DataStreamerEntry
implemen
         unmarshalKey(ctx, marsh);
 
         if (val == null && valBytes != null) {
-            val = MarshallerUtils.unmarshal(ctx.kernalContext().gridName(), marsh, valBytes,
-                U.resolveClassLoader(ctx.kernalContext().config()));
+            val = marsh.unmarshal(valBytes, U.resolveClassLoader(ctx.kernalContext().config()));
 
             val.finishUnmarshal(ctx, null);
         }
@@ -224,8 +222,7 @@ public class GridCacheRawVersionedEntry<K, V> extends DataStreamerEntry
implemen
         if (key == null) {
             assert keyBytes != null;
 
-            key = MarshallerUtils.unmarshal(ctx.kernalContext().gridName(), marsh, keyBytes,
-                U.resolveClassLoader(ctx.kernalContext().config()));
+            key = marsh.unmarshal(keyBytes, U.resolveClassLoader(ctx.kernalContext().config()));
 
             key.finishUnmarshal(ctx, null);
         }


Mime
View raw message