You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2014/12/05 00:24:05 UTC
[13/53] [abbrv] incubator-ignite git commit: # gg-9470-rename
# gg-9470-rename
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/580b2aa1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/580b2aa1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/580b2aa1
Branch: refs/heads/master
Commit: 580b2aa1d8c3f8bdc87356fd818ac12b519a1894
Parents: 78736f3
Author: sboikov <sb...@gridgain.com>
Authored: Thu Dec 4 21:51:25 2014 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Thu Dec 4 21:51:25 2014 +0300
----------------------------------------------------------------------
.../processors/rest/GridTestMemcacheClient.java | 2 +-
.../configuration/IgniteConfiguration.java | 3 +-
.../ignite/marshaller/GridMarshaller.java | 3 +-
.../marshaller/jdk/GridJdkMarshaller.java | 135 +++++++++++++++++++
.../jdk/GridJdkMarshallerDummySerializable.java | 22 +++
.../GridJdkMarshallerInputStreamWrapper.java | 73 ++++++++++
.../jdk/GridJdkMarshallerObjectInputStream.java | 53 ++++++++
.../GridJdkMarshallerObjectOutputStream.java | 37 +++++
.../GridJdkMarshallerOutputStreamWrapper.java | 51 +++++++
.../apache/ignite/marshaller/jdk/package.html | 15 +++
.../org/gridgain/grid/kernal/GridGainEx.java | 2 +-
.../jdbc/GridCacheQueryJdbcMetadataTask.java | 2 +-
.../query/jdbc/GridCacheQueryJdbcTask.java | 2 +-
.../tcp/GridTcpMemcachedNioListener.java | 2 +-
.../rest/protocols/tcp/GridTcpRestParser.java | 2 +-
.../rest/protocols/tcp/GridTcpRestProtocol.java | 2 +-
.../grid/marshaller/jdk/GridJdkMarshaller.java | 135 -------------------
.../jdk/GridJdkMarshallerDummySerializable.java | 22 ---
.../GridJdkMarshallerInputStreamWrapper.java | 73 ----------
.../jdk/GridJdkMarshallerObjectInputStream.java | 53 --------
.../GridJdkMarshallerObjectOutputStream.java | 37 -----
.../GridJdkMarshallerOutputStreamWrapper.java | 51 -------
.../gridgain/grid/marshaller/jdk/package.html | 15 ---
.../optimized/GridOptimizedMarshaller.java | 3 +-
.../tcp/GridTcpDiscoverySpiAdapter.java | 2 +-
.../GridTcpDiscoveryMulticastIpFinder.java | 2 +-
.../org/gridgain/jdbc/util/GridJdbcUtils.java | 2 +-
.../grid/GridExternalizableAbstractTest.java | 2 +-
.../communication/GridIoManagerSelfTest.java | 2 +-
.../GridDeploymentManagerStopSelfTest.java | 2 +-
.../cache/GridCacheP2PUndeploySelfTest.java | 2 +-
.../marshaller/GridMarshallerResourceBean.java | 2 +-
.../jdk/GridJdkMarshallerSelfTest.java | 1 +
.../tcp/GridCacheDhtLockBackupSelfTest.java | 2 +-
...GridTcpDiscoveryMarshallerCheckSelfTest.java | 2 +-
.../testframework/junits/GridAbstractTest.java | 2 +-
36 files changed, 408 insertions(+), 410 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580b2aa1/modules/clients/src/test/java/org/gridgain/grid/kernal/processors/rest/GridTestMemcacheClient.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/gridgain/grid/kernal/processors/rest/GridTestMemcacheClient.java b/modules/clients/src/test/java/org/gridgain/grid/kernal/processors/rest/GridTestMemcacheClient.java
index 08d13a7..994603d 100644
--- a/modules/clients/src/test/java/org/gridgain/grid/kernal/processors/rest/GridTestMemcacheClient.java
+++ b/modules/clients/src/test/java/org/gridgain/grid/kernal/processors/rest/GridTestMemcacheClient.java
@@ -12,8 +12,8 @@ package org.gridgain.grid.kernal.processors.rest;
import org.apache.ignite.*;
import org.apache.ignite.logger.java.*;
import org.apache.ignite.marshaller.*;
+import org.apache.ignite.marshaller.jdk.*;
import org.gridgain.grid.*;
-import org.gridgain.grid.marshaller.jdk.*;
import org.gridgain.grid.util.typedef.internal.*;
import org.jetbrains.annotations.*;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580b2aa1/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
index 18075c7..d7dc2c1 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
@@ -25,7 +25,6 @@ import org.gridgain.grid.dr.hub.sender.*;
import org.gridgain.grid.ggfs.*;
import org.gridgain.grid.hadoop.*;
import org.gridgain.grid.kernal.managers.eventstorage.*;
-import org.gridgain.grid.marshaller.jdk.*;
import org.gridgain.grid.marshaller.optimized.*;
import org.gridgain.grid.portables.*;
import org.gridgain.grid.security.*;
@@ -1457,7 +1456,7 @@ public class IgniteConfiguration {
/**
* Should return an instance of marshaller to use in grid. If not provided,
* {@link GridOptimizedMarshaller} will be used on Java HotSpot VM, and
- * {@link GridJdkMarshaller} will be used on other VMs.
+ * {@link org.apache.ignite.marshaller.jdk.GridJdkMarshaller} will be used on other VMs.
*
* @return Marshaller to use in grid.
*/
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580b2aa1/modules/core/src/main/java/org/apache/ignite/marshaller/GridMarshaller.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/marshaller/GridMarshaller.java b/modules/core/src/main/java/org/apache/ignite/marshaller/GridMarshaller.java
index 703eb51..9c8685f 100644
--- a/modules/core/src/main/java/org/apache/ignite/marshaller/GridMarshaller.java
+++ b/modules/core/src/main/java/org/apache/ignite/marshaller/GridMarshaller.java
@@ -10,7 +10,6 @@
package org.apache.ignite.marshaller;
import org.gridgain.grid.*;
-import org.gridgain.grid.marshaller.jdk.*;
import org.gridgain.grid.marshaller.optimized.*;
import org.jetbrains.annotations.*;
@@ -24,7 +23,7 @@ import java.io.*;
* Gridgain provides the following {@code GridMarshaller} implementations:
* <ul>
* <li>{@link GridOptimizedMarshaller} - default</li>
- * <li>{@link GridJdkMarshaller}</li>
+ * <li>{@link org.apache.ignite.marshaller.jdk.GridJdkMarshaller}</li>
* </ul>
* <p>
* Below are examples of marshaller configuration, usage, and injection into tasks, jobs,
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580b2aa1/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/GridJdkMarshaller.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/GridJdkMarshaller.java b/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/GridJdkMarshaller.java
new file mode 100644
index 0000000..da75a2e
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/GridJdkMarshaller.java
@@ -0,0 +1,135 @@
+/* @java.file.header */
+
+/* _________ _____ __________________ _____
+ * __ ____/___________(_)______ /__ ____/______ ____(_)_______
+ * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
+ * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
+ * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
+ */
+
+package org.apache.ignite.marshaller.jdk;
+
+import org.apache.ignite.marshaller.*;
+import org.gridgain.grid.*;
+import org.gridgain.grid.marshaller.optimized.*;
+import org.gridgain.grid.util.typedef.internal.*;
+import org.jetbrains.annotations.*;
+
+import java.io.*;
+
+/**
+ * Implementation of {@link GridMarshaller} based on JDK serialization mechanism.
+ * <p>
+ * <h1 class="header">Configuration</h1>
+ * <h2 class="header">Mandatory</h2>
+ * This marshaller has no mandatory configuration parameters.
+ * <h2 class="header">Java Example</h2>
+ * {@code GridJdkMarshaller} needs to be explicitly configured to override default {@link GridOptimizedMarshaller}.
+ * <pre name="code" class="java">
+ * GridJdkMarshaller marshaller = new GridJdkMarshaller();
+ *
+ * GridConfiguration cfg = new GridConfiguration();
+ *
+ * // Override default marshaller.
+ * cfg.setMarshaller(marshaller);
+ *
+ * // Starts grid.
+ * G.start(cfg);
+ * </pre>
+ * <h2 class="header">Spring Example</h2>
+ * GridJdkMarshaller can be configured from Spring XML configuration file:
+ * <pre name="code" class="xml">
+ * <bean id="grid.custom.cfg" class="org.gridgain.grid.GridConfiguration" singleton="true">
+ * ...
+ * <property name="marshaller">
+ * <bean class="org.gridgain.grid.marshaller.jdk.GridJdkMarshaller"/>
+ * </property>
+ * ...
+ * </bean>
+ * </pre>
+ * <p>
+ * <img src="http://www.gridgain.com/images/spring-small.png">
+ * <br>
+ * For information about Spring framework visit <a href="http://www.springframework.org/">www.springframework.org</a>
+ * <h2 class="header">Injection Example</h2>
+ * GridMarshaller can be injected in users task, job or SPI as following:
+ * <pre name="code" class="java">
+ * public class MyGridJob implements GridComputeJob {
+ * ...
+ * @GridMarshallerResource
+ * private GridMarshaller marshaller;
+ * ...
+ * }
+ * </pre>
+ * or
+ * <pre name="code" class="java">
+ * public class MyGridJob implements GridComputeJob {
+ * ...
+ * private GridMarshaller marshaller;
+ * ...
+ * @GridMarshallerResource
+ * public void setMarshaller(GridMarshaller marshaller) {
+ * this.marshaller = marshaller;
+ * }
+ * ...
+ * }
+ * </pre>
+ * <br>
+ *
+ */
+public class GridJdkMarshaller extends GridAbstractMarshaller {
+ /** {@inheritDoc} */
+ @Override public void marshal(@Nullable Object obj, OutputStream out) throws GridException {
+ assert out != null;
+
+ ObjectOutputStream objOut = null;
+
+ try {
+ objOut = new GridJdkMarshallerObjectOutputStream(new GridJdkMarshallerOutputStreamWrapper(out));
+
+ // Make sure that we serialize only task, without class loader.
+ objOut.writeObject(obj);
+
+ objOut.flush();
+ }
+ catch (IOException e) {
+ throw new GridException("Failed to serialize object: " + obj, e);
+ }
+ finally{
+ U.closeQuiet(objOut);
+ }
+ }
+
+ /** {@inheritDoc} */
+ @SuppressWarnings({"unchecked"})
+ @Override public <T> T unmarshal(InputStream in, @Nullable ClassLoader clsLdr) throws GridException {
+ assert in != null;
+
+ if (clsLdr == null)
+ clsLdr = getClass().getClassLoader();
+
+ ObjectInputStream objIn = null;
+
+ try {
+ objIn = new GridJdkMarshallerObjectInputStream(new GridJdkMarshallerInputStreamWrapper(in), clsLdr);
+
+ return (T)objIn.readObject();
+ }
+ catch (IOException e) {
+ throw new GridException("Failed to deserialize object with given class loader: " + clsLdr, e);
+ }
+ catch (ClassNotFoundException e) {
+ throw new GridException("Failed to find class with given class loader for unmarshalling " +
+ "(make sure same versions of all classes are available on all nodes or enable peer-class-loading): " +
+ clsLdr, e);
+ }
+ finally{
+ U.closeQuiet(objIn);
+ }
+ }
+
+ /** {@inheritDoc} */
+ @Override public String toString() {
+ return S.toString(GridJdkMarshaller.class, this);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580b2aa1/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/GridJdkMarshallerDummySerializable.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/GridJdkMarshallerDummySerializable.java b/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/GridJdkMarshallerDummySerializable.java
new file mode 100644
index 0000000..6487717
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/GridJdkMarshallerDummySerializable.java
@@ -0,0 +1,22 @@
+/* @java.file.header */
+
+/* _________ _____ __________________ _____
+ * __ ____/___________(_)______ /__ ____/______ ____(_)_______
+ * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
+ * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
+ * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
+ */
+
+package org.apache.ignite.marshaller.jdk;
+
+import java.io.*;
+
+/**
+ * Serializable object used for {@link Object} replacement.
+ */
+class GridJdkMarshallerDummySerializable implements Serializable {
+ /** */
+ private static final long serialVersionUID = 0L;
+
+ // No-op.
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580b2aa1/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/GridJdkMarshallerInputStreamWrapper.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/GridJdkMarshallerInputStreamWrapper.java b/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/GridJdkMarshallerInputStreamWrapper.java
new file mode 100644
index 0000000..fb08f40
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/GridJdkMarshallerInputStreamWrapper.java
@@ -0,0 +1,73 @@
+/* @java.file.header */
+
+/* _________ _____ __________________ _____
+ * __ ____/___________(_)______ /__ ____/______ ____(_)_______
+ * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
+ * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
+ * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
+ */
+
+package org.apache.ignite.marshaller.jdk;
+
+import java.io.*;
+
+/**
+ * Wrapper for {@link InputStream}.
+ */
+class GridJdkMarshallerInputStreamWrapper extends InputStream {
+ /** */
+ private InputStream in;
+
+ /**
+ * Creates wrapper.
+ *
+ * @param in Wrapped input stream
+ */
+ GridJdkMarshallerInputStreamWrapper(InputStream in) {
+ assert in != null;
+
+ this.in = in;
+ }
+
+ /** {@inheritDoc} */
+ @Override public int read() throws IOException {
+ return in.read();
+ }
+
+ /** {@inheritDoc} */
+ @Override public int read(byte[] b) throws IOException {
+ return in.read(b);
+ }
+
+ /** {@inheritDoc} */
+ @Override public int read(byte[] b, int off, int len) throws IOException {
+ return in.read(b, off, len);
+ }
+
+ /** {@inheritDoc} */
+ @Override public long skip(long n) throws IOException {
+ return in.skip(n);
+ }
+
+ /** {@inheritDoc} */
+ @Override public int available() throws IOException {
+ return in.available();
+ }
+
+ /** {@inheritDoc} */
+ @SuppressWarnings({"NonSynchronizedMethodOverridesSynchronizedMethod"})
+ @Override public void mark(int readLimit) {
+ in.mark(readLimit);
+ }
+
+ /** {@inheritDoc} */
+ @SuppressWarnings({"NonSynchronizedMethodOverridesSynchronizedMethod"})
+ @Override public void reset() throws IOException {
+ in.reset();
+ }
+
+ /** {@inheritDoc} */
+ @Override public boolean markSupported() {
+ return in.markSupported();
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580b2aa1/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/GridJdkMarshallerObjectInputStream.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/GridJdkMarshallerObjectInputStream.java b/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/GridJdkMarshallerObjectInputStream.java
new file mode 100644
index 0000000..5a64a75
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/GridJdkMarshallerObjectInputStream.java
@@ -0,0 +1,53 @@
+/* @java.file.header */
+
+/* _________ _____ __________________ _____
+ * __ ____/___________(_)______ /__ ____/______ ____(_)_______
+ * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
+ * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
+ * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
+ */
+
+package org.apache.ignite.marshaller.jdk;
+
+import java.io.*;
+
+/**
+ * This class defines custom JDK object input stream.
+ */
+class GridJdkMarshallerObjectInputStream extends ObjectInputStream {
+ /** */
+ private final ClassLoader clsLdr;
+
+ /**
+ * @param in Parent input stream.
+ * @param clsLdr Custom class loader.
+ * @throws IOException If initialization failed.
+ */
+ GridJdkMarshallerObjectInputStream(InputStream in, ClassLoader clsLdr) throws IOException {
+ super(in);
+
+ assert clsLdr != null;
+
+ this.clsLdr = clsLdr;
+
+ enableResolveObject(true);
+ }
+
+ /** {@inheritDoc} */
+ @Override protected Class<?> resolveClass(ObjectStreamClass desc) throws IOException, ClassNotFoundException {
+ // NOTE: DO NOT CHANGE TO 'clsLoader.loadClass()'
+ // Must have 'Class.forName()' instead of clsLoader.loadClass()
+ // due to weird ClassNotFoundExceptions for arrays of classes
+ // in certain cases.
+ return Class.forName(desc.getName(), true, clsLdr);
+ }
+
+ /** {@inheritDoc} */
+ @Override protected Object resolveObject(Object o) throws IOException {
+ if (o != null && o.getClass().equals(GridJdkMarshallerDummySerializable.class))
+ return new Object();
+
+ return super.resolveObject(o);
+ }
+}
+
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580b2aa1/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/GridJdkMarshallerObjectOutputStream.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/GridJdkMarshallerObjectOutputStream.java b/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/GridJdkMarshallerObjectOutputStream.java
new file mode 100644
index 0000000..51cfdd6
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/GridJdkMarshallerObjectOutputStream.java
@@ -0,0 +1,37 @@
+/* @java.file.header */
+
+/* _________ _____ __________________ _____
+ * __ ____/___________(_)______ /__ ____/______ ____(_)_______
+ * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
+ * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
+ * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
+ */
+
+package org.apache.ignite.marshaller.jdk;
+
+import org.apache.ignite.marshaller.*;
+import org.jetbrains.annotations.*;
+
+import java.io.*;
+
+/**
+ * This class defines own object output stream.
+ */
+class GridJdkMarshallerObjectOutputStream extends ObjectOutputStream {
+ /**
+ * @param out Output stream.
+ * @throws IOException Thrown in case of any I/O errors.
+ */
+ GridJdkMarshallerObjectOutputStream(OutputStream out) throws IOException {
+ super(out);
+
+ enableReplaceObject(true);
+ }
+
+ /** {@inheritDoc} */
+ @Nullable @Override protected Object replaceObject(Object o) throws IOException {
+ return o == null || GridMarshallerExclusions.isExcluded(o.getClass()) ? null :
+ o.getClass().equals(Object.class) ? new GridJdkMarshallerDummySerializable() : super.replaceObject(o);
+ }
+}
+
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580b2aa1/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/GridJdkMarshallerOutputStreamWrapper.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/GridJdkMarshallerOutputStreamWrapper.java b/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/GridJdkMarshallerOutputStreamWrapper.java
new file mode 100644
index 0000000..b5e9e06
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/GridJdkMarshallerOutputStreamWrapper.java
@@ -0,0 +1,51 @@
+/* @java.file.header */
+
+/* _________ _____ __________________ _____
+ * __ ____/___________(_)______ /__ ____/______ ____(_)_______
+ * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
+ * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
+ * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
+ */
+
+package org.apache.ignite.marshaller.jdk;
+
+import java.io.*;
+
+/**
+ * Wrapper for {@link OutputStream}.
+ */
+class GridJdkMarshallerOutputStreamWrapper extends OutputStream {
+ /** */
+ private OutputStream out;
+
+ /**
+ * Creates wrapper.
+ *
+ * @param out Wrapped output stream
+ */
+ GridJdkMarshallerOutputStreamWrapper(OutputStream out) {
+ assert out != null;
+
+ this.out = out;
+ }
+
+ /** {@inheritDoc} */
+ @Override public void write(int b) throws IOException {
+ out.write(b);
+ }
+
+ /** {@inheritDoc} */
+ @Override public void write(byte[] b) throws IOException {
+ out.write(b);
+ }
+
+ /** {@inheritDoc} */
+ @Override public void write(byte[] b, int off, int len) throws IOException {
+ out.write(b, off, len);
+ }
+
+ /** {@inheritDoc} */
+ @Override public void flush() throws IOException {
+ out.flush();
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580b2aa1/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/package.html
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/package.html b/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/package.html
new file mode 100644
index 0000000..6ccdc47
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/marshaller/jdk/package.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+ @html.file.header
+ _________ _____ __________________ _____
+ __ ____/___________(_)______ /__ ____/______ ____(_)_______
+ _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
+ / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
+ \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
+-->
+<html>
+<body>
+ <!-- Package description. -->
+ Contains JDK <tt>java.io</tt> based marshaller.
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580b2aa1/modules/core/src/main/java/org/gridgain/grid/kernal/GridGainEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridGainEx.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridGainEx.java
index 1fe7cbd..b662845 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridGainEx.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridGainEx.java
@@ -15,6 +15,7 @@ import org.apache.ignite.lang.*;
import org.apache.ignite.logger.*;
import org.apache.ignite.logger.java.*;
import org.apache.ignite.marshaller.*;
+import org.apache.ignite.marshaller.jdk.*;
import org.apache.ignite.mbean.*;
import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
@@ -23,7 +24,6 @@ import org.gridgain.grid.ggfs.*;
import org.gridgain.grid.kernal.processors.interop.*;
import org.gridgain.grid.kernal.processors.resource.*;
import org.gridgain.grid.kernal.processors.spring.*;
-import org.gridgain.grid.marshaller.jdk.*;
import org.gridgain.grid.marshaller.optimized.*;
import org.gridgain.grid.segmentation.*;
import org.gridgain.grid.spi.*;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580b2aa1/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/jdbc/GridCacheQueryJdbcMetadataTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/jdbc/GridCacheQueryJdbcMetadataTask.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/jdbc/GridCacheQueryJdbcMetadataTask.java
index 434a290..fa8801a 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/jdbc/GridCacheQueryJdbcMetadataTask.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/jdbc/GridCacheQueryJdbcMetadataTask.java
@@ -13,12 +13,12 @@ import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.marshaller.*;
+import org.apache.ignite.marshaller.jdk.*;
import org.apache.ignite.resources.*;
import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.kernal.*;
import org.gridgain.grid.kernal.processors.cache.query.*;
-import org.gridgain.grid.marshaller.jdk.*;
import org.gridgain.grid.marshaller.optimized.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.grid.util.typedef.internal.*;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580b2aa1/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/jdbc/GridCacheQueryJdbcTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/jdbc/GridCacheQueryJdbcTask.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/jdbc/GridCacheQueryJdbcTask.java
index eaf57e1..00064a6 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/jdbc/GridCacheQueryJdbcTask.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/jdbc/GridCacheQueryJdbcTask.java
@@ -13,13 +13,13 @@ import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.marshaller.*;
+import org.apache.ignite.marshaller.jdk.*;
import org.apache.ignite.resources.*;
import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.cache.query.*;
import org.gridgain.grid.kernal.*;
import org.gridgain.grid.kernal.processors.cache.query.*;
-import org.gridgain.grid.marshaller.jdk.*;
import org.gridgain.grid.marshaller.optimized.*;
import org.gridgain.grid.spi.indexing.*;
import org.gridgain.grid.util.lang.*;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580b2aa1/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/protocols/tcp/GridTcpMemcachedNioListener.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/protocols/tcp/GridTcpMemcachedNioListener.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/protocols/tcp/GridTcpMemcachedNioListener.java
index 6f14c58..b3c8b22 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/protocols/tcp/GridTcpMemcachedNioListener.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/protocols/tcp/GridTcpMemcachedNioListener.java
@@ -12,12 +12,12 @@ package org.gridgain.grid.kernal.processors.rest.protocols.tcp;
import org.apache.ignite.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.marshaller.*;
+import org.apache.ignite.marshaller.jdk.*;
import org.gridgain.grid.*;
import org.gridgain.grid.kernal.*;
import org.gridgain.grid.kernal.processors.rest.*;
import org.gridgain.grid.kernal.processors.rest.handlers.cache.*;
import org.gridgain.grid.kernal.processors.rest.request.*;
-import org.gridgain.grid.marshaller.jdk.*;
import org.gridgain.grid.util.future.*;
import org.gridgain.grid.util.lang.*;
import org.gridgain.grid.util.nio.*;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580b2aa1/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/protocols/tcp/GridTcpRestParser.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/protocols/tcp/GridTcpRestParser.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/protocols/tcp/GridTcpRestParser.java
index a45179c..71ed4f3 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/protocols/tcp/GridTcpRestParser.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/protocols/tcp/GridTcpRestParser.java
@@ -9,10 +9,10 @@
package org.gridgain.grid.kernal.processors.rest.protocols.tcp;
import org.apache.ignite.marshaller.*;
+import org.apache.ignite.marshaller.jdk.*;
import org.gridgain.client.marshaller.*;
import org.gridgain.grid.*;
import org.gridgain.grid.kernal.processors.rest.client.message.*;
-import org.gridgain.grid.marshaller.jdk.*;
import org.gridgain.grid.util.*;
import org.gridgain.grid.util.nio.*;
import org.gridgain.grid.util.typedef.internal.*;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580b2aa1/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/protocols/tcp/GridTcpRestProtocol.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/protocols/tcp/GridTcpRestProtocol.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/protocols/tcp/GridTcpRestProtocol.java
index ee574af..28dce35 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/protocols/tcp/GridTcpRestProtocol.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/protocols/tcp/GridTcpRestProtocol.java
@@ -11,6 +11,7 @@ package org.gridgain.grid.kernal.processors.rest.protocols.tcp;
import org.apache.ignite.configuration.*;
import org.apache.ignite.marshaller.*;
+import org.apache.ignite.marshaller.jdk.*;
import org.gridgain.client.marshaller.*;
import org.gridgain.client.marshaller.jdk.*;
import org.gridgain.client.marshaller.optimized.*;
@@ -20,7 +21,6 @@ import org.gridgain.grid.kernal.*;
import org.gridgain.grid.kernal.processors.rest.*;
import org.gridgain.grid.kernal.processors.rest.client.message.*;
import org.gridgain.grid.kernal.processors.rest.protocols.*;
-import org.gridgain.grid.marshaller.jdk.*;
import org.gridgain.grid.spi.*;
import org.gridgain.grid.util.direct.*;
import org.gridgain.grid.util.nio.*;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580b2aa1/modules/core/src/main/java/org/gridgain/grid/marshaller/jdk/GridJdkMarshaller.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/marshaller/jdk/GridJdkMarshaller.java b/modules/core/src/main/java/org/gridgain/grid/marshaller/jdk/GridJdkMarshaller.java
deleted file mode 100644
index b8826a5..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/marshaller/jdk/GridJdkMarshaller.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/* @java.file.header */
-
-/* _________ _____ __________________ _____
- * __ ____/___________(_)______ /__ ____/______ ____(_)_______
- * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
- * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
- * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
- */
-
-package org.gridgain.grid.marshaller.jdk;
-
-import org.apache.ignite.marshaller.*;
-import org.gridgain.grid.*;
-import org.gridgain.grid.marshaller.optimized.*;
-import org.gridgain.grid.util.typedef.internal.*;
-import org.jetbrains.annotations.*;
-
-import java.io.*;
-
-/**
- * Implementation of {@link GridMarshaller} based on JDK serialization mechanism.
- * <p>
- * <h1 class="header">Configuration</h1>
- * <h2 class="header">Mandatory</h2>
- * This marshaller has no mandatory configuration parameters.
- * <h2 class="header">Java Example</h2>
- * {@code GridJdkMarshaller} needs to be explicitly configured to override default {@link GridOptimizedMarshaller}.
- * <pre name="code" class="java">
- * GridJdkMarshaller marshaller = new GridJdkMarshaller();
- *
- * GridConfiguration cfg = new GridConfiguration();
- *
- * // Override default marshaller.
- * cfg.setMarshaller(marshaller);
- *
- * // Starts grid.
- * G.start(cfg);
- * </pre>
- * <h2 class="header">Spring Example</h2>
- * GridJdkMarshaller can be configured from Spring XML configuration file:
- * <pre name="code" class="xml">
- * <bean id="grid.custom.cfg" class="org.gridgain.grid.GridConfiguration" singleton="true">
- * ...
- * <property name="marshaller">
- * <bean class="org.gridgain.grid.marshaller.jdk.GridJdkMarshaller"/>
- * </property>
- * ...
- * </bean>
- * </pre>
- * <p>
- * <img src="http://www.gridgain.com/images/spring-small.png">
- * <br>
- * For information about Spring framework visit <a href="http://www.springframework.org/">www.springframework.org</a>
- * <h2 class="header">Injection Example</h2>
- * GridMarshaller can be injected in users task, job or SPI as following:
- * <pre name="code" class="java">
- * public class MyGridJob implements GridComputeJob {
- * ...
- * @GridMarshallerResource
- * private GridMarshaller marshaller;
- * ...
- * }
- * </pre>
- * or
- * <pre name="code" class="java">
- * public class MyGridJob implements GridComputeJob {
- * ...
- * private GridMarshaller marshaller;
- * ...
- * @GridMarshallerResource
- * public void setMarshaller(GridMarshaller marshaller) {
- * this.marshaller = marshaller;
- * }
- * ...
- * }
- * </pre>
- * <br>
- *
- */
-public class GridJdkMarshaller extends GridAbstractMarshaller {
- /** {@inheritDoc} */
- @Override public void marshal(@Nullable Object obj, OutputStream out) throws GridException {
- assert out != null;
-
- ObjectOutputStream objOut = null;
-
- try {
- objOut = new GridJdkMarshallerObjectOutputStream(new GridJdkMarshallerOutputStreamWrapper(out));
-
- // Make sure that we serialize only task, without class loader.
- objOut.writeObject(obj);
-
- objOut.flush();
- }
- catch (IOException e) {
- throw new GridException("Failed to serialize object: " + obj, e);
- }
- finally{
- U.closeQuiet(objOut);
- }
- }
-
- /** {@inheritDoc} */
- @SuppressWarnings({"unchecked"})
- @Override public <T> T unmarshal(InputStream in, @Nullable ClassLoader clsLdr) throws GridException {
- assert in != null;
-
- if (clsLdr == null)
- clsLdr = getClass().getClassLoader();
-
- ObjectInputStream objIn = null;
-
- try {
- objIn = new GridJdkMarshallerObjectInputStream(new GridJdkMarshallerInputStreamWrapper(in), clsLdr);
-
- return (T)objIn.readObject();
- }
- catch (IOException e) {
- throw new GridException("Failed to deserialize object with given class loader: " + clsLdr, e);
- }
- catch (ClassNotFoundException e) {
- throw new GridException("Failed to find class with given class loader for unmarshalling " +
- "(make sure same versions of all classes are available on all nodes or enable peer-class-loading): " +
- clsLdr, e);
- }
- finally{
- U.closeQuiet(objIn);
- }
- }
-
- /** {@inheritDoc} */
- @Override public String toString() {
- return S.toString(GridJdkMarshaller.class, this);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580b2aa1/modules/core/src/main/java/org/gridgain/grid/marshaller/jdk/GridJdkMarshallerDummySerializable.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/marshaller/jdk/GridJdkMarshallerDummySerializable.java b/modules/core/src/main/java/org/gridgain/grid/marshaller/jdk/GridJdkMarshallerDummySerializable.java
deleted file mode 100644
index b0e8645..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/marshaller/jdk/GridJdkMarshallerDummySerializable.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/* @java.file.header */
-
-/* _________ _____ __________________ _____
- * __ ____/___________(_)______ /__ ____/______ ____(_)_______
- * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
- * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
- * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
- */
-
-package org.gridgain.grid.marshaller.jdk;
-
-import java.io.*;
-
-/**
- * Serializable object used for {@link Object} replacement.
- */
-class GridJdkMarshallerDummySerializable implements Serializable {
- /** */
- private static final long serialVersionUID = 0L;
-
- // No-op.
-}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580b2aa1/modules/core/src/main/java/org/gridgain/grid/marshaller/jdk/GridJdkMarshallerInputStreamWrapper.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/marshaller/jdk/GridJdkMarshallerInputStreamWrapper.java b/modules/core/src/main/java/org/gridgain/grid/marshaller/jdk/GridJdkMarshallerInputStreamWrapper.java
deleted file mode 100644
index 63bc09b..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/marshaller/jdk/GridJdkMarshallerInputStreamWrapper.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/* @java.file.header */
-
-/* _________ _____ __________________ _____
- * __ ____/___________(_)______ /__ ____/______ ____(_)_______
- * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
- * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
- * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
- */
-
-package org.gridgain.grid.marshaller.jdk;
-
-import java.io.*;
-
-/**
- * Wrapper for {@link InputStream}.
- */
-class GridJdkMarshallerInputStreamWrapper extends InputStream {
- /** */
- private InputStream in;
-
- /**
- * Creates wrapper.
- *
- * @param in Wrapped input stream
- */
- GridJdkMarshallerInputStreamWrapper(InputStream in) {
- assert in != null;
-
- this.in = in;
- }
-
- /** {@inheritDoc} */
- @Override public int read() throws IOException {
- return in.read();
- }
-
- /** {@inheritDoc} */
- @Override public int read(byte[] b) throws IOException {
- return in.read(b);
- }
-
- /** {@inheritDoc} */
- @Override public int read(byte[] b, int off, int len) throws IOException {
- return in.read(b, off, len);
- }
-
- /** {@inheritDoc} */
- @Override public long skip(long n) throws IOException {
- return in.skip(n);
- }
-
- /** {@inheritDoc} */
- @Override public int available() throws IOException {
- return in.available();
- }
-
- /** {@inheritDoc} */
- @SuppressWarnings({"NonSynchronizedMethodOverridesSynchronizedMethod"})
- @Override public void mark(int readLimit) {
- in.mark(readLimit);
- }
-
- /** {@inheritDoc} */
- @SuppressWarnings({"NonSynchronizedMethodOverridesSynchronizedMethod"})
- @Override public void reset() throws IOException {
- in.reset();
- }
-
- /** {@inheritDoc} */
- @Override public boolean markSupported() {
- return in.markSupported();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580b2aa1/modules/core/src/main/java/org/gridgain/grid/marshaller/jdk/GridJdkMarshallerObjectInputStream.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/marshaller/jdk/GridJdkMarshallerObjectInputStream.java b/modules/core/src/main/java/org/gridgain/grid/marshaller/jdk/GridJdkMarshallerObjectInputStream.java
deleted file mode 100644
index a402db3..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/marshaller/jdk/GridJdkMarshallerObjectInputStream.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/* @java.file.header */
-
-/* _________ _____ __________________ _____
- * __ ____/___________(_)______ /__ ____/______ ____(_)_______
- * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
- * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
- * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
- */
-
-package org.gridgain.grid.marshaller.jdk;
-
-import java.io.*;
-
-/**
- * This class defines custom JDK object input stream.
- */
-class GridJdkMarshallerObjectInputStream extends ObjectInputStream {
- /** */
- private final ClassLoader clsLdr;
-
- /**
- * @param in Parent input stream.
- * @param clsLdr Custom class loader.
- * @throws IOException If initialization failed.
- */
- GridJdkMarshallerObjectInputStream(InputStream in, ClassLoader clsLdr) throws IOException {
- super(in);
-
- assert clsLdr != null;
-
- this.clsLdr = clsLdr;
-
- enableResolveObject(true);
- }
-
- /** {@inheritDoc} */
- @Override protected Class<?> resolveClass(ObjectStreamClass desc) throws IOException, ClassNotFoundException {
- // NOTE: DO NOT CHANGE TO 'clsLoader.loadClass()'
- // Must have 'Class.forName()' instead of clsLoader.loadClass()
- // due to weird ClassNotFoundExceptions for arrays of classes
- // in certain cases.
- return Class.forName(desc.getName(), true, clsLdr);
- }
-
- /** {@inheritDoc} */
- @Override protected Object resolveObject(Object o) throws IOException {
- if (o != null && o.getClass().equals(GridJdkMarshallerDummySerializable.class))
- return new Object();
-
- return super.resolveObject(o);
- }
-}
-
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580b2aa1/modules/core/src/main/java/org/gridgain/grid/marshaller/jdk/GridJdkMarshallerObjectOutputStream.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/marshaller/jdk/GridJdkMarshallerObjectOutputStream.java b/modules/core/src/main/java/org/gridgain/grid/marshaller/jdk/GridJdkMarshallerObjectOutputStream.java
deleted file mode 100644
index e820977..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/marshaller/jdk/GridJdkMarshallerObjectOutputStream.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/* @java.file.header */
-
-/* _________ _____ __________________ _____
- * __ ____/___________(_)______ /__ ____/______ ____(_)_______
- * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
- * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
- * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
- */
-
-package org.gridgain.grid.marshaller.jdk;
-
-import org.apache.ignite.marshaller.*;
-import org.jetbrains.annotations.*;
-
-import java.io.*;
-
-/**
- * This class defines own object output stream.
- */
-class GridJdkMarshallerObjectOutputStream extends ObjectOutputStream {
- /**
- * @param out Output stream.
- * @throws IOException Thrown in case of any I/O errors.
- */
- GridJdkMarshallerObjectOutputStream(OutputStream out) throws IOException {
- super(out);
-
- enableReplaceObject(true);
- }
-
- /** {@inheritDoc} */
- @Nullable @Override protected Object replaceObject(Object o) throws IOException {
- return o == null || GridMarshallerExclusions.isExcluded(o.getClass()) ? null :
- o.getClass().equals(Object.class) ? new GridJdkMarshallerDummySerializable() : super.replaceObject(o);
- }
-}
-
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580b2aa1/modules/core/src/main/java/org/gridgain/grid/marshaller/jdk/GridJdkMarshallerOutputStreamWrapper.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/marshaller/jdk/GridJdkMarshallerOutputStreamWrapper.java b/modules/core/src/main/java/org/gridgain/grid/marshaller/jdk/GridJdkMarshallerOutputStreamWrapper.java
deleted file mode 100644
index 29a7eda..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/marshaller/jdk/GridJdkMarshallerOutputStreamWrapper.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/* @java.file.header */
-
-/* _________ _____ __________________ _____
- * __ ____/___________(_)______ /__ ____/______ ____(_)_______
- * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
- * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
- * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
- */
-
-package org.gridgain.grid.marshaller.jdk;
-
-import java.io.*;
-
-/**
- * Wrapper for {@link OutputStream}.
- */
-class GridJdkMarshallerOutputStreamWrapper extends OutputStream {
- /** */
- private OutputStream out;
-
- /**
- * Creates wrapper.
- *
- * @param out Wrapped output stream
- */
- GridJdkMarshallerOutputStreamWrapper(OutputStream out) {
- assert out != null;
-
- this.out = out;
- }
-
- /** {@inheritDoc} */
- @Override public void write(int b) throws IOException {
- out.write(b);
- }
-
- /** {@inheritDoc} */
- @Override public void write(byte[] b) throws IOException {
- out.write(b);
- }
-
- /** {@inheritDoc} */
- @Override public void write(byte[] b, int off, int len) throws IOException {
- out.write(b, off, len);
- }
-
- /** {@inheritDoc} */
- @Override public void flush() throws IOException {
- out.flush();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580b2aa1/modules/core/src/main/java/org/gridgain/grid/marshaller/jdk/package.html
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/marshaller/jdk/package.html b/modules/core/src/main/java/org/gridgain/grid/marshaller/jdk/package.html
deleted file mode 100644
index 6ccdc47..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/marshaller/jdk/package.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<!--
- @html.file.header
- _________ _____ __________________ _____
- __ ____/___________(_)______ /__ ____/______ ____(_)_______
- _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \
- / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / /
- \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/
--->
-<html>
-<body>
- <!-- Package description. -->
- Contains JDK <tt>java.io</tt> based marshaller.
-</body>
-</html>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580b2aa1/modules/core/src/main/java/org/gridgain/grid/marshaller/optimized/GridOptimizedMarshaller.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/marshaller/optimized/GridOptimizedMarshaller.java b/modules/core/src/main/java/org/gridgain/grid/marshaller/optimized/GridOptimizedMarshaller.java
index 203ddb7..d3ae173 100644
--- a/modules/core/src/main/java/org/gridgain/grid/marshaller/optimized/GridOptimizedMarshaller.java
+++ b/modules/core/src/main/java/org/gridgain/grid/marshaller/optimized/GridOptimizedMarshaller.java
@@ -11,7 +11,6 @@ package org.gridgain.grid.marshaller.optimized;
import org.apache.ignite.marshaller.*;
import org.gridgain.grid.*;
-import org.gridgain.grid.marshaller.jdk.*;
import org.gridgain.grid.util.*;
import org.gridgain.grid.util.typedef.*;
import org.gridgain.grid.util.typedef.internal.*;
@@ -25,7 +24,7 @@ import java.util.*;
import static org.gridgain.grid.marshaller.optimized.GridOptimizedMarshallerUtils.*;
/**
- * Optimized implementation of {@link GridMarshaller}. Unlike {@link GridJdkMarshaller},
+ * Optimized implementation of {@link GridMarshaller}. Unlike {@link org.apache.ignite.marshaller.jdk.GridJdkMarshaller},
* which is based on standard {@link ObjectOutputStream}, this marshaller does not
* enforce that all serialized objects implement {@link Serializable} interface. It is also
* about 20 times faster as it removes lots of serialization overhead that exists in
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580b2aa1/modules/core/src/main/java/org/gridgain/grid/spi/discovery/tcp/GridTcpDiscoverySpiAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/spi/discovery/tcp/GridTcpDiscoverySpiAdapter.java b/modules/core/src/main/java/org/gridgain/grid/spi/discovery/tcp/GridTcpDiscoverySpiAdapter.java
index e8dd237..f1f8761 100644
--- a/modules/core/src/main/java/org/gridgain/grid/spi/discovery/tcp/GridTcpDiscoverySpiAdapter.java
+++ b/modules/core/src/main/java/org/gridgain/grid/spi/discovery/tcp/GridTcpDiscoverySpiAdapter.java
@@ -12,9 +12,9 @@ package org.gridgain.grid.spi.discovery.tcp;
import org.apache.ignite.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.marshaller.*;
+import org.apache.ignite.marshaller.jdk.*;
import org.apache.ignite.resources.*;
import org.gridgain.grid.*;
-import org.gridgain.grid.marshaller.jdk.*;
import org.gridgain.grid.product.*;
import org.gridgain.grid.spi.*;
import org.gridgain.grid.spi.discovery.*;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580b2aa1/modules/core/src/main/java/org/gridgain/grid/spi/discovery/tcp/ipfinder/multicast/GridTcpDiscoveryMulticastIpFinder.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/spi/discovery/tcp/ipfinder/multicast/GridTcpDiscoveryMulticastIpFinder.java b/modules/core/src/main/java/org/gridgain/grid/spi/discovery/tcp/ipfinder/multicast/GridTcpDiscoveryMulticastIpFinder.java
index c0e460b..792bdfc 100644
--- a/modules/core/src/main/java/org/gridgain/grid/spi/discovery/tcp/ipfinder/multicast/GridTcpDiscoveryMulticastIpFinder.java
+++ b/modules/core/src/main/java/org/gridgain/grid/spi/discovery/tcp/ipfinder/multicast/GridTcpDiscoveryMulticastIpFinder.java
@@ -11,9 +11,9 @@ package org.gridgain.grid.spi.discovery.tcp.ipfinder.multicast;
import org.apache.ignite.*;
import org.apache.ignite.marshaller.*;
+import org.apache.ignite.marshaller.jdk.*;
import org.apache.ignite.resources.*;
import org.gridgain.grid.*;
-import org.gridgain.grid.marshaller.jdk.*;
import org.gridgain.grid.spi.*;
import org.gridgain.grid.spi.discovery.tcp.*;
import org.gridgain.grid.spi.discovery.tcp.ipfinder.vm.*;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580b2aa1/modules/core/src/main/java/org/gridgain/jdbc/util/GridJdbcUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/jdbc/util/GridJdbcUtils.java b/modules/core/src/main/java/org/gridgain/jdbc/util/GridJdbcUtils.java
index 1ddadfe..faedd51 100644
--- a/modules/core/src/main/java/org/gridgain/jdbc/util/GridJdbcUtils.java
+++ b/modules/core/src/main/java/org/gridgain/jdbc/util/GridJdbcUtils.java
@@ -10,8 +10,8 @@
package org.gridgain.jdbc.util;
import org.apache.ignite.marshaller.*;
+import org.apache.ignite.marshaller.jdk.*;
import org.gridgain.grid.*;
-import org.gridgain.grid.marshaller.jdk.*;
import org.gridgain.grid.util.typedef.internal.*;
import java.sql.*;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580b2aa1/modules/core/src/test/java/org/gridgain/grid/GridExternalizableAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/GridExternalizableAbstractTest.java b/modules/core/src/test/java/org/gridgain/grid/GridExternalizableAbstractTest.java
index bfddb5a..2a52ec4 100644
--- a/modules/core/src/test/java/org/gridgain/grid/GridExternalizableAbstractTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/GridExternalizableAbstractTest.java
@@ -10,7 +10,7 @@
package org.gridgain.grid;
import org.apache.ignite.marshaller.*;
-import org.gridgain.grid.marshaller.jdk.*;
+import org.apache.ignite.marshaller.jdk.*;
import org.gridgain.grid.marshaller.optimized.*;
import org.gridgain.testframework.junits.common.*;
import java.util.*;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580b2aa1/modules/core/src/test/java/org/gridgain/grid/kernal/managers/communication/GridIoManagerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/managers/communication/GridIoManagerSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/managers/communication/GridIoManagerSelfTest.java
index 6cdf5b6..1178e14 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/managers/communication/GridIoManagerSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/managers/communication/GridIoManagerSelfTest.java
@@ -11,10 +11,10 @@ package org.gridgain.grid.kernal.managers.communication;
import org.apache.commons.collections.*;
import org.apache.ignite.cluster.*;
+import org.apache.ignite.marshaller.jdk.*;
import org.gridgain.grid.*;
import org.gridgain.grid.kernal.*;
import org.gridgain.grid.kernal.managers.discovery.*;
-import org.gridgain.grid.marshaller.jdk.*;
import org.gridgain.grid.spi.communication.tcp.*;
import org.gridgain.grid.util.direct.*;
import org.gridgain.grid.util.typedef.*;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580b2aa1/modules/core/src/test/java/org/gridgain/grid/kernal/managers/deployment/GridDeploymentManagerStopSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/managers/deployment/GridDeploymentManagerStopSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/managers/deployment/GridDeploymentManagerStopSelfTest.java
index cc3bfc0..7a0ce0f 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/managers/deployment/GridDeploymentManagerStopSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/managers/deployment/GridDeploymentManagerStopSelfTest.java
@@ -9,9 +9,9 @@
package org.gridgain.grid.kernal.managers.deployment;
+import org.apache.ignite.marshaller.jdk.*;
import org.gridgain.grid.kernal.*;
import org.gridgain.grid.kernal.processors.resource.*;
-import org.gridgain.grid.marshaller.jdk.*;
import org.gridgain.grid.spi.*;
import org.gridgain.grid.spi.deployment.*;
import org.gridgain.testframework.junits.*;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580b2aa1/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheP2PUndeploySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheP2PUndeploySelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheP2PUndeploySelfTest.java
index 239e128..5757f86 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheP2PUndeploySelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheP2PUndeploySelfTest.java
@@ -11,11 +11,11 @@ package org.gridgain.grid.kernal.processors.cache;
import org.apache.ignite.*;
import org.apache.ignite.configuration.*;
+import org.apache.ignite.marshaller.jdk.*;
import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.kernal.*;
import org.gridgain.grid.kernal.processors.cache.distributed.*;
-import org.gridgain.grid.marshaller.jdk.*;
import org.gridgain.grid.spi.discovery.tcp.*;
import org.gridgain.grid.spi.discovery.tcp.ipfinder.*;
import org.gridgain.grid.spi.discovery.tcp.ipfinder.vm.*;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580b2aa1/modules/core/src/test/java/org/gridgain/grid/marshaller/GridMarshallerResourceBean.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/marshaller/GridMarshallerResourceBean.java b/modules/core/src/test/java/org/gridgain/grid/marshaller/GridMarshallerResourceBean.java
index c138707..0f35995 100644
--- a/modules/core/src/test/java/org/gridgain/grid/marshaller/GridMarshallerResourceBean.java
+++ b/modules/core/src/test/java/org/gridgain/grid/marshaller/GridMarshallerResourceBean.java
@@ -14,9 +14,9 @@ import org.apache.ignite.cluster.*;
import org.apache.ignite.compute.*;
import org.apache.ignite.logger.java.*;
import org.apache.ignite.marshaller.*;
+import org.apache.ignite.marshaller.jdk.*;
import org.gridgain.grid.*;
import org.gridgain.grid.kernal.managers.loadbalancer.*;
-import org.gridgain.grid.marshaller.jdk.*;
import org.gridgain.grid.thread.*;
import org.springframework.context.*;
import org.springframework.context.support.*;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580b2aa1/modules/core/src/test/java/org/gridgain/grid/marshaller/jdk/GridJdkMarshallerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/marshaller/jdk/GridJdkMarshallerSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/marshaller/jdk/GridJdkMarshallerSelfTest.java
index 9f93fc4..5920ff7 100644
--- a/modules/core/src/test/java/org/gridgain/grid/marshaller/jdk/GridJdkMarshallerSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/marshaller/jdk/GridJdkMarshallerSelfTest.java
@@ -10,6 +10,7 @@
package org.gridgain.grid.marshaller.jdk;
import org.apache.ignite.marshaller.*;
+import org.apache.ignite.marshaller.jdk.*;
import org.gridgain.grid.marshaller.*;
import org.gridgain.testframework.junits.common.*;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580b2aa1/modules/core/src/test/java/org/gridgain/grid/spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java
index 0f66823..fe21efe 100644
--- a/modules/core/src/test/java/org/gridgain/grid/spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java
@@ -13,12 +13,12 @@ import org.apache.ignite.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.marshaller.*;
+import org.apache.ignite.marshaller.jdk.*;
import org.apache.ignite.resources.*;
import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.kernal.managers.communication.*;
import org.gridgain.grid.kernal.processors.cache.distributed.near.*;
-import org.gridgain.grid.marshaller.jdk.*;
import org.gridgain.grid.spi.communication.*;
import org.gridgain.grid.spi.discovery.tcp.*;
import org.gridgain.grid.spi.discovery.tcp.ipfinder.*;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580b2aa1/modules/core/src/test/java/org/gridgain/grid/spi/discovery/tcp/GridTcpDiscoveryMarshallerCheckSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/spi/discovery/tcp/GridTcpDiscoveryMarshallerCheckSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/spi/discovery/tcp/GridTcpDiscoveryMarshallerCheckSelfTest.java
index 0eaa098..83ead72 100644
--- a/modules/core/src/test/java/org/gridgain/grid/spi/discovery/tcp/GridTcpDiscoveryMarshallerCheckSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/spi/discovery/tcp/GridTcpDiscoveryMarshallerCheckSelfTest.java
@@ -10,8 +10,8 @@
package org.gridgain.grid.spi.discovery.tcp;
import org.apache.ignite.configuration.*;
+import org.apache.ignite.marshaller.jdk.*;
import org.gridgain.grid.*;
-import org.gridgain.grid.marshaller.jdk.*;
import org.gridgain.grid.marshaller.optimized.*;
import org.gridgain.grid.spi.*;
import org.gridgain.grid.spi.discovery.tcp.ipfinder.*;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/580b2aa1/modules/core/src/test/java/org/gridgain/testframework/junits/GridAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/testframework/junits/GridAbstractTest.java b/modules/core/src/test/java/org/gridgain/testframework/junits/GridAbstractTest.java
index 910d3c5..0a20f9f 100644
--- a/modules/core/src/test/java/org/gridgain/testframework/junits/GridAbstractTest.java
+++ b/modules/core/src/test/java/org/gridgain/testframework/junits/GridAbstractTest.java
@@ -16,13 +16,13 @@ import org.apache.ignite.configuration.*;
import org.apache.ignite.events.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.marshaller.*;
+import org.apache.ignite.marshaller.jdk.*;
import org.apache.log4j.*;
import org.gridgain.grid.*;
import org.gridgain.grid.cache.*;
import org.gridgain.grid.kernal.*;
import org.gridgain.grid.kernal.processors.license.*;
import org.gridgain.grid.kernal.processors.resource.*;
-import org.gridgain.grid.marshaller.jdk.*;
import org.gridgain.grid.marshaller.optimized.*;
import org.gridgain.grid.spi.checkpoint.sharedfs.*;
import org.gridgain.grid.spi.communication.tcp.*;