ignite-commits mailing list archives

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


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

Branch: refs/heads/ignite-2649
Commit: be343cad840dd395bc54c7cc1d554309d6389058
Parents: 0d7049c
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Tue Sep 6 18:55:40 2016 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Tue Sep 6 18:55:40 2016 +0300

----------------------------------------------------------------------
 .../rendezvous/RendezvousAffinityFunction.java  |  3 +--
 .../cache/store/jdbc/CacheJdbcBlobStore.java    | 16 ++++++++++----
 .../ignite/internal/binary/BinaryContext.java   |  5 +++--
 .../internal/binary/BinaryEnumObjectImpl.java   |  2 +-
 .../internal/binary/BinaryWriterExImpl.java     |  2 +-
 .../processors/cache/GridCacheUtils.java        |  4 ++--
 .../cache/query/GridCacheSqlQuery.java          |  2 +-
 .../jdbc/GridCacheQueryJdbcMetadataTask.java    |  4 ++--
 .../query/jdbc/GridCacheQueryJdbcTask.java      |  5 +++--
 .../version/GridCacheRawVersionedEntry.java     |  4 ++--
 .../processors/continuous/StartRequestData.java |  2 +-
 .../processors/igfs/IgfsAckMessage.java         |  2 +-
 .../processors/igfs/IgfsDeleteMessage.java      |  2 +-
 .../AbstractNodeNameAwareMarshaller.java        |  6 +++++-
 .../ignite/marshaller/MarshallerUtils.java      | 22 +-------------------
 .../optimized/OptimizedMarshaller.java          |  8 +++----
 .../spi/swapspace/file/FileSwapSpaceSpi.java    |  2 +-
 17 files changed, 42 insertions(+), 49 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/be343cad/modules/core/src/main/java/org/apache/ignite/cache/affinity/rendezvous/RendezvousAffinityFunction.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/affinity/rendezvous/RendezvousAffinityFunction.java
b/modules/core/src/main/java/org/apache/ignite/cache/affinity/rendezvous/RendezvousAffinityFunction.java
index 1b90581..d643426 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/affinity/rendezvous/RendezvousAffinityFunction.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/affinity/rendezvous/RendezvousAffinityFunction.java
@@ -337,8 +337,7 @@ public class RendezvousAffinityFunction implements AffinityFunction, Externaliza
             try {
                 ByteArrayOutputStream out = new ByteArrayOutputStream();
 
-                byte[] nodeHashBytes =
-                    MarshallerUtils.marshal(ignite.name(), ignite.configuration().getMarshaller(),
nodeHash);
+                byte[] nodeHashBytes = ignite.configuration().getMarshaller().marshal(nodeHash);
 
                 out.write(U.intToBytes(part), 0, 4); // Avoid IOException.
                 out.write(nodeHashBytes, 0, nodeHashBytes.length); // Avoid IOException.

http://git-wip-us.apache.org/repos/asf/ignite/blob/be343cad/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStore.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStore.java
b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStore.java
index 15aa111..dd3da31 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStore.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStore.java
@@ -43,7 +43,6 @@ import org.apache.ignite.internal.util.tostring.GridToStringExclude;
 import org.apache.ignite.internal.util.typedef.F;
 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.marshaller.jdk.JdkMarshaller;
 import org.apache.ignite.resources.CacheStoreSessionResource;
@@ -110,7 +109,7 @@ public class CacheJdbcBlobStore<K, V> extends CacheStoreAdapter<K,
V> {
     private static final String ATTR_CONN = "JDBC_STORE_CONNECTION";
 
     /** Marshaller. */
-    private static final Marshaller marsh = new JdkMarshaller();
+    private static final JdkMarshaller marsh = new JdkMarshaller();
 
     /** Connection URL. */
     private String connUrl = DFLT_CONN_URL;
@@ -152,7 +151,6 @@ public class CacheJdbcBlobStore<K, V> extends CacheStoreAdapter<K,
V> {
     private IgniteLogger log;
 
     /** Marshaller. */
-    @IgniteInstanceResource
     private Ignite ignite;
 
     /** Init guard. */
@@ -561,7 +559,7 @@ public class CacheJdbcBlobStore<K, V> extends CacheStoreAdapter<K,
V> {
      * @throws IgniteCheckedException If failed to convert.
      */
     protected byte[] toBytes(Object obj) throws IgniteCheckedException {
-        return MarshallerUtils.marshal(ignite.name(), marsh, obj);
+        return marsh.marshal(obj);
     }
 
     /**
@@ -594,4 +592,14 @@ public class CacheJdbcBlobStore<K, V> extends CacheStoreAdapter<K,
V> {
     protected CacheStoreSession session() {
         return ses;
     }
+
+    /**
+     * @param ignite Ignite instance.
+     */
+    @IgniteInstanceResource
+    public void setIgnite(Ignite ignite) {
+        this.ignite = ignite;
+
+        marsh.nodeName(ignite.name());
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/be343cad/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java
b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java
index d78c126..aa9e8a5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java
@@ -128,7 +128,6 @@ public class BinaryContext {
     /** Set of system classes that should be marshalled with BinaryMarshaller. */
     private static final Set<String> BINARYLIZABLE_SYS_CLSS;
 
-    /** Binarylizable system classes set initialization. */
     static {
         Set<String> sysClss = new HashSet<>();
 
@@ -225,7 +224,7 @@ public class BinaryContext {
     private IgniteLogger log;
 
     /** */
-    private final OptimizedMarshaller optmMarsh = new OptimizedMarshaller(false);
+    private final OptimizedMarshaller optmMarsh;
 
     /** Compact footer flag. */
     private boolean compactFooter;
@@ -242,6 +241,8 @@ public class BinaryContext {
         assert metaHnd != null;
         assert igniteCfg != null;
 
+        optmMarsh = new OptimizedMarshaller(false).nodeName(igniteCfg.getGridName());
+
         this.metaHnd = metaHnd;
         this.igniteCfg = igniteCfg;
         this.log = log;

http://git-wip-us.apache.org/repos/asf/ignite/blob/be343cad/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryEnumObjectImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryEnumObjectImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryEnumObjectImpl.java
index 0f9e2e5..0e1c539 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryEnumObjectImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryEnumObjectImpl.java
@@ -244,7 +244,7 @@ public class BinaryEnumObjectImpl implements BinaryObjectEx, Externalizable,
Cac
 
     /** {@inheritDoc} */
     @Override public byte[] valueBytes(CacheObjectContext cacheCtx) throws IgniteCheckedException
{
-        return MarshallerUtils.marshal(ctx.configuration().getGridName(), ctx.marshaller(),
this);
+        return ctx.marshaller().marshal(this);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/be343cad/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryWriterExImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryWriterExImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryWriterExImpl.java
index 9536f31..1b06a06 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryWriterExImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryWriterExImpl.java
@@ -176,7 +176,7 @@ public class BinaryWriterExImpl implements BinaryWriter, BinaryRawWriterEx,
Obje
             out.writeByte(GridBinaryMarshaller.OPTM_MARSH);
 
             try {
-                byte[] arr = MarshallerUtils.marshal(ctx.configuration().getGridName(), ctx.optimizedMarsh(),
obj);
+                byte[] arr = ctx.optimizedMarsh().marshal(obj);
 
                 writeInt(arr.length);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/be343cad/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
index 6264648..0a005ca 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
@@ -991,7 +991,7 @@ public class GridCacheUtils {
             }
         }
 
-        return MarshallerUtils.marshal(ctx.gridName(), ctx.marshaller(), obj);
+        return ctx.marshaller().marshal(obj);
     }
 
     /**
@@ -1901,6 +1901,6 @@ public class GridCacheUtils {
      * @throws IgniteCheckedException If failed.
      */
     public static byte[] marshal(GridCacheSharedContext ctx, Object obj) throws IgniteCheckedException
{
-        return MarshallerUtils.marshal(ctx.gridName(), ctx.marshaller(), obj);
+        return ctx.marshaller().marshal(obj);
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/be343cad/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
index 7a77ea5..bd10bac 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java
@@ -142,7 +142,7 @@ public class GridCacheSqlQuery implements Message {
 
         assert params != null;
 
-        paramsBytes = MarshallerUtils.marshal(kernalCtx.gridName(), m, params);
+        paramsBytes = m.marshal(params);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/be343cad/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/jdbc/GridCacheQueryJdbcMetadataTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/jdbc/GridCacheQueryJdbcMetadataTask.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/jdbc/GridCacheQueryJdbcMetadataTask.java
index d659f10..90cfc8c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/jdbc/GridCacheQueryJdbcMetadataTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/jdbc/GridCacheQueryJdbcMetadataTask.java
@@ -154,7 +154,7 @@ public class GridCacheQueryJdbcMetadataTask extends ComputeTaskAdapter<String,
b
 
                 status = 0;
 
-                data = MarshallerUtils.marshal(ignite.name(), MARSHALLER, F.asList(schemasMap,
indexesInfo));
+                data = MARSHALLER.marshal(F.asList(schemasMap, indexesInfo));
             }
             catch (Throwable t) {
                 U.error(log, "Failed to get metadata for JDBC.", t);
@@ -164,7 +164,7 @@ public class GridCacheQueryJdbcMetadataTask extends ComputeTaskAdapter<String,
b
                 status = 1;
 
                 try {
-                    data = MarshallerUtils.marshal(ignite.name(), MARSHALLER, err);
+                    data = MARSHALLER.marshal(err);
                 }
                 catch (IgniteCheckedException e) {
                     throw new IgniteException(e);

http://git-wip-us.apache.org/repos/asf/ignite/blob/be343cad/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/jdbc/GridCacheQueryJdbcTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/jdbc/GridCacheQueryJdbcTask.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/jdbc/GridCacheQueryJdbcTask.java
index a6c5f14..688ab27 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/jdbc/GridCacheQueryJdbcTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/jdbc/GridCacheQueryJdbcTask.java
@@ -75,6 +75,7 @@ public class GridCacheQueryJdbcTask extends ComputeTaskAdapter<byte[],
byte[]> {
     /** Scheduler. */
     private static final ScheduledExecutorService SCHEDULER = Executors.newScheduledThreadPool(1);
 
+    /** Ignite instance. */
     @IgniteInstanceResource
     private Ignite ignite;
 
@@ -131,12 +132,12 @@ public class GridCacheQueryJdbcTask extends ComputeTaskAdapter<byte[],
byte[]> {
             if (res.getException() == null) {
                 status = 0;
 
-                bytes = MarshallerUtils.marshal(ignite.name(), MARSHALLER, res.getData());
+                bytes = MARSHALLER.marshal(res.getData());
             }
             else {
                 status = 1;
 
-                bytes = MarshallerUtils.marshal(ignite.name(), MARSHALLER, new SQLException(res.getException().getMessage())
+                bytes = MARSHALLER.marshal(new SQLException(res.getException().getMessage())
                 );
             }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/be343cad/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 98c651b..5120822 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
@@ -242,13 +242,13 @@ public class GridCacheRawVersionedEntry<K, V> extends DataStreamerEntry
implemen
         if (keyBytes == null) {
             key.prepareMarshal(ctx);
 
-            keyBytes = MarshallerUtils.marshal(ctx.kernalContext().gridName(), marsh, key);
+            keyBytes = marsh.marshal(key);
         }
 
         if (valBytes == null && val != null) {
             val.prepareMarshal(ctx);
 
-            valBytes = MarshallerUtils.marshal(ctx.kernalContext().gridName(), marsh, val);
+            valBytes = marsh.marshal(val);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/be343cad/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/StartRequestData.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/StartRequestData.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/StartRequestData.java
index 619bd86..bc5739a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/StartRequestData.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/StartRequestData.java
@@ -98,7 +98,7 @@ class StartRequestData implements Externalizable {
     void p2pMarshal(Marshaller marsh, final GridKernalContext kernalCtx) throws IgniteCheckedException
{
         assert marsh != null;
 
-        prjPredBytes = MarshallerUtils.marshal(kernalCtx.gridName(), marsh, prjPred);
+        prjPredBytes = marsh.marshal(prjPred);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/be343cad/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsAckMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsAckMessage.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsAckMessage.java
index 20c80bb..936f209 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsAckMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsAckMessage.java
@@ -98,7 +98,7 @@ public class IgfsAckMessage extends IgfsCommunicationMessage {
         super.prepareMarshal(marsh, kernalCtx);
 
         if (err != null)
-            errBytes = MarshallerUtils.marshal(kernalCtx.gridName(), marsh, err);
+            errBytes = marsh.marshal(err);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/be343cad/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDeleteMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDeleteMessage.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDeleteMessage.java
index d0776bd..53ca9a9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDeleteMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDeleteMessage.java
@@ -97,7 +97,7 @@ public class IgfsDeleteMessage extends IgfsCommunicationMessage {
         super.prepareMarshal(marsh, kernalCtx);
 
         if (err != null)
-            errBytes = MarshallerUtils.marshal(kernalCtx.gridName(), marsh, err);
+            errBytes = marsh.marshal(err);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/be343cad/modules/core/src/main/java/org/apache/ignite/marshaller/AbstractNodeNameAwareMarshaller.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/marshaller/AbstractNodeNameAwareMarshaller.java
b/modules/core/src/main/java/org/apache/ignite/marshaller/AbstractNodeNameAwareMarshaller.java
index 270fdea..5f7af9b 100644
--- a/modules/core/src/main/java/org/apache/ignite/marshaller/AbstractNodeNameAwareMarshaller.java
+++ b/modules/core/src/main/java/org/apache/ignite/marshaller/AbstractNodeNameAwareMarshaller.java
@@ -37,9 +37,13 @@ public abstract class AbstractNodeNameAwareMarshaller extends AbstractMarshaller
      * Set node name.
      *
      * @param nodeName Node name.
+     * @return This instance for chaining.
      */
-    public void nodeName(@Nullable String nodeName) {
+    @SuppressWarnings("unchecked")
+    public <T> T nodeName(@Nullable String nodeName) {
         this.nodeName = nodeName;
+
+        return (T)this;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/be343cad/modules/core/src/main/java/org/apache/ignite/marshaller/MarshallerUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/marshaller/MarshallerUtils.java
b/modules/core/src/main/java/org/apache/ignite/marshaller/MarshallerUtils.java
index 0775622..8c86160 100644
--- a/modules/core/src/main/java/org/apache/ignite/marshaller/MarshallerUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/marshaller/MarshallerUtils.java
@@ -30,26 +30,6 @@ import java.io.OutputStream;
  */
 public class MarshallerUtils {
     /**
-     * Marshal object with provided node name.
-     *
-     * @param name Grid name.
-     * @param marsh Marshaller.
-     * @param obj Object to marshal.
-     * @return Result.
-     * @throws IgniteCheckedException If failed.
-     */
-    public static byte[] marshal(String name, Marshaller marsh, @Nullable Object obj) throws
IgniteCheckedException {
-        String oldName = IgniteUtils.setCurrentIgniteName(name);
-
-        try {
-            return marsh.marshal(obj);
-        }
-        finally {
-            IgniteUtils.restoreCurrentIgniteName(oldName);
-        }
-    }
-
-    /**
      * Marshal object to stream and set grid name thread local.
      *
      * @param name Grid name.
@@ -79,7 +59,7 @@ public class MarshallerUtils {
      * @throws IgniteCheckedException If failed.
      */
     public static byte[] marshal(GridKernalContext ctx, @Nullable Object obj) throws IgniteCheckedException
{
-        return marshal(ctx.gridName(), ctx.config().getMarshaller(), obj);
+        return ctx.config().getMarshaller().marshal(obj);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/be343cad/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/OptimizedMarshaller.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/OptimizedMarshaller.java
b/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/OptimizedMarshaller.java
index 7c22dee..1b4bbb5 100644
--- a/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/OptimizedMarshaller.java
+++ b/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/OptimizedMarshaller.java
@@ -159,7 +159,7 @@ public class OptimizedMarshaller extends AbstractNodeNameAwareMarshaller
{
     }
 
     /** {@inheritDoc} */
-    @Override public void marshal0(@Nullable Object obj, OutputStream out) throws IgniteCheckedException
{
+    @Override protected void marshal0(@Nullable Object obj, OutputStream out) throws IgniteCheckedException
{
         assert out != null;
 
         OptimizedObjectOutputStream objOut = null;
@@ -182,7 +182,7 @@ public class OptimizedMarshaller extends AbstractNodeNameAwareMarshaller
{
     }
 
     /** {@inheritDoc} */
-    @Override public byte[] marshal0(@Nullable Object obj) throws IgniteCheckedException
{
+    @Override protected byte[] marshal0(@Nullable Object obj) throws IgniteCheckedException
{
         OptimizedObjectOutputStream objOut = null;
 
         try {
@@ -204,7 +204,7 @@ public class OptimizedMarshaller extends AbstractNodeNameAwareMarshaller
{
 
     /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
-    @Override public <T> T unmarshal0(InputStream in, @Nullable ClassLoader clsLdr)
throws IgniteCheckedException {
+    @Override protected <T> T unmarshal0(InputStream in, @Nullable ClassLoader clsLdr)
throws IgniteCheckedException {
         assert in != null;
 
         OptimizedObjectInputStream objIn = null;
@@ -233,7 +233,7 @@ public class OptimizedMarshaller extends AbstractNodeNameAwareMarshaller
{
 
     /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
-    @Override public <T> T unmarshal0(byte[] arr, @Nullable ClassLoader clsLdr) throws
IgniteCheckedException {
+    @Override protected <T> T unmarshal0(byte[] arr, @Nullable ClassLoader clsLdr)
throws IgniteCheckedException {
         assert arr != null;
 
         OptimizedObjectInputStream objIn = null;

http://git-wip-us.apache.org/repos/asf/ignite/blob/be343cad/modules/core/src/main/java/org/apache/ignite/spi/swapspace/file/FileSwapSpaceSpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/swapspace/file/FileSwapSpaceSpi.java
b/modules/core/src/main/java/org/apache/ignite/spi/swapspace/file/FileSwapSpaceSpi.java
index 052a422..10fd9b8 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/swapspace/file/FileSwapSpaceSpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/swapspace/file/FileSwapSpaceSpi.java
@@ -595,7 +595,7 @@ public class FileSwapSpaceSpi extends IgniteSpiAdapter implements SwapSpaceSpi,
 
         if (keyBytes == null) {
             try {
-                keyBytes = MarshallerUtils.marshal(ignite.name(), ignite.configuration().getMarshaller(),
key.key());
+                keyBytes = ignite.configuration().getMarshaller().marshal(key.key());
             }
             catch (IgniteCheckedException e) {
                 throw new IgniteSpiException("Failed to marshal key: " + key.key(), e);


Mime
View raw message