ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [15/53] [abbrv] incubator-ignite git commit: # gg-9470-rename
Date Thu, 04 Dec 2014 23:24:07 GMT
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a50fccdd/modules/core/src/main/java/org/gridgain/grid/marshaller/optimized/GridOptimizedObjectInputStream.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/marshaller/optimized/GridOptimizedObjectInputStream.java b/modules/core/src/main/java/org/gridgain/grid/marshaller/optimized/GridOptimizedObjectInputStream.java
deleted file mode 100644
index 92ad62c..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/marshaller/optimized/GridOptimizedObjectInputStream.java
+++ /dev/null
@@ -1,1008 +0,0 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid.marshaller.optimized;
-
-import org.apache.ignite.lang.*;
-import org.gridgain.grid.util.*;
-import org.gridgain.grid.util.io.*;
-import org.gridgain.grid.util.typedef.*;
-import org.gridgain.grid.util.typedef.internal.*;
-import sun.misc.*;
-
-import java.io.*;
-import java.lang.reflect.*;
-import java.util.*;
-
-import static org.gridgain.grid.marshaller.optimized.GridOptimizedMarshallerUtils.*;
-
-/**
- * Optimized object input stream.
- */
-class GridOptimizedObjectInputStream extends ObjectInputStream {
-    /** Unsafe. */
-    private static final Unsafe UNSAFE = GridUnsafe.unsafe();
-
-    /** Dummy object for HashSet. */
-    private static final Object DUMMY = new Object();
-
-    /** */
-    private final HandleTable handles = new HandleTable(10);
-
-    /** */
-    private ClassLoader clsLdr;
-
-    /** */
-    private GridDataInput in;
-
-    /** */
-    private Object curObj;
-
-    /** */
-    private List<T2<GridOptimizedFieldType, Long>> curFields;
-
-    /** */
-    private List<IgniteBiTuple<Integer, GridOptimizedFieldType>> curFieldInfoList;
-
-    /** */
-    private Map<String, IgniteBiTuple<Integer, GridOptimizedFieldType>> curFieldInfoMap;
-
-    /** */
-    private Class<?> curCls;
-
-    /**
-     * @param in Input.
-     * @throws IOException In case of error.
-     */
-    GridOptimizedObjectInputStream(GridDataInput in) throws IOException {
-        this.in = in;
-    }
-
-    /**
-     * @throws IOException In case of error.
-     */
-    GridOptimizedObjectInputStream() throws IOException {
-        // No-op.
-    }
-
-    /**
-     * @param clsLdr Class loader.
-     */
-    void classLoader(ClassLoader clsLdr) {
-        this.clsLdr = clsLdr;
-    }
-
-    /**
-     * @return Class loader.
-     */
-    ClassLoader classLoader() {
-        return clsLdr;
-    }
-
-    /**
-     * @return Input.
-     */
-    public GridDataInput in() {
-        return in;
-    }
-
-    /**
-     * @param in Input.
-     */
-    public void in(GridDataInput in) {
-        this.in = in;
-    }
-
-    /** {@inheritDoc} */
-    @Override public void close() throws IOException {
-        reset();
-    }
-
-    /** {@inheritDoc} */
-    @SuppressWarnings("NonSynchronizedMethodOverridesSynchronizedMethod")
-    @Override public void reset() throws IOException {
-        in.reset();
-        handles.clear();
-
-        curObj = null;
-        curFields = null;
-        curFieldInfoList = null;
-        curFieldInfoMap = null;
-    }
-
-    /** {@inheritDoc} */
-    @Override public Object readObjectOverride() throws ClassNotFoundException, IOException {
-        curObj = null;
-        curFields = null;
-        curFieldInfoList = null;
-        curFieldInfoMap = null;
-
-        byte ref = in.readByte();
-
-        switch (ref) {
-            case NULL:
-                return null;
-
-            case HANDLE:
-                return handles.lookup(readInt());
-
-            case OBJECT:
-                GridOptimizedClassDescriptor desc = GridOptimizedClassResolver.readClass(this, clsLdr);
-
-                curCls = desc.describedClass();
-
-                return desc.read(this);
-
-            default:
-                SB msg = new SB("Unexpected error occurred during unmarshalling");
-
-                if (curCls != null)
-                    msg.a(" of an instance of the class: ").a(curCls.getName());
-
-                msg.a(". Check that all nodes are running the same version of GridGain and that all nodes have " +
-                    "GridOptimizedMarshaller configured with identical optimized classes lists, if any " +
-                    "(see setClassNames and setClassNamesPath methods). If your serialized classes implement " +
-                    "java.io.Externalizable interface, verify that serialization logic is correct.");
-
-                throw new IOException(msg.toString());
-        }
-    }
-
-    /**
-     * Reads array from this stream.
-     *
-     * @param compType Array component type.
-     * @return Array.
-     * @throws ClassNotFoundException If class not found.
-     * @throws IOException In case of error.
-     */
-    <T> T[] readArray(Class<T> compType) throws ClassNotFoundException, IOException {
-        int len = in.readInt();
-
-        T[] arr = (T[])Array.newInstance(compType, len);
-
-        handles.assign(arr);
-
-        for (int i = 0; i < len; i++)
-            arr[i] = (T)readObject();
-
-        return arr;
-    }
-
-    /**
-     * Reads {@link UUID} from this stream.
-     *
-     * @return UUID.
-     * @throws IOException In case of error.
-     */
-    UUID readUuid() throws IOException {
-        UUID uuid = new UUID(readLong(), readLong());
-
-        handles.assign(uuid);
-
-        return uuid;
-    }
-
-    /**
-     * Reads {@link Properties} from this stream.
-     *
-     * @return Properties.
-     * @throws ClassNotFoundException If class not found.
-     * @throws IOException In case of error.
-     */
-    Properties readProperties() throws ClassNotFoundException, IOException {
-        Properties dflts = readBoolean() ? null : (Properties)readObject();
-
-        Properties props = new Properties(dflts);
-
-        int size = in.readInt();
-
-        for (int i = 0; i < size; i++)
-            props.setProperty(readUTF(), readUTF());
-
-        handles.assign(props);
-
-        return props;
-    }
-
-    /**
-     * Reads and sets all non-static and non-transient field values from this stream.
-     *
-     * @param obj Object.
-     * @param fieldOffs Field offsets.
-     * @throws ClassNotFoundException If class not found.
-     * @throws IOException In case of error.
-     */
-    @SuppressWarnings("ForLoopReplaceableByForEach")
-    void readFields(Object obj, List<T2<GridOptimizedFieldType, Long>> fieldOffs) throws ClassNotFoundException,
-        IOException {
-        for (int i = 0; i < fieldOffs.size(); i++) {
-            T2<GridOptimizedFieldType, Long> t = fieldOffs.get(i);
-
-            switch ((t.get1())) {
-                case BYTE:
-                    setByte(obj, t.get2(), readByte());
-
-                    break;
-
-                case SHORT:
-                    setShort(obj, t.get2(), readShort());
-
-                    break;
-
-                case INT:
-                    setInt(obj, t.get2(), readInt());
-
-                    break;
-
-                case LONG:
-                    setLong(obj, t.get2(), readLong());
-
-                    break;
-
-                case FLOAT:
-                    setFloat(obj, t.get2(), readFloat());
-
-                    break;
-
-                case DOUBLE:
-                    setDouble(obj, t.get2(), readDouble());
-
-                    break;
-
-                case CHAR:
-                    setChar(obj, t.get2(), readChar());
-
-                    break;
-
-                case BOOLEAN:
-                    setBoolean(obj, t.get2(), readBoolean());
-
-                    break;
-
-                case OTHER:
-                    setObject(obj, t.get2(), readObject());
-            }
-        }
-    }
-
-    /**
-     * Reads {@link Externalizable} object.
-     *
-     * @param constructor Constructor.
-     * @param readResolveMtd {@code readResolve} method.
-     * @return Object.
-     * @throws ClassNotFoundException If class not found.
-     * @throws IOException In case of error.
-     */
-    Object readExternalizable(Constructor<?> constructor, Method readResolveMtd)
-        throws ClassNotFoundException, IOException {
-        Object obj;
-
-        try {
-            obj = constructor.newInstance();
-        }
-        catch (InstantiationException | InvocationTargetException | IllegalAccessException e) {
-            throw new IOException(e);
-        }
-
-        int handle = handles.assign(obj);
-
-        Externalizable extObj = ((Externalizable)obj);
-
-        extObj.readExternal(this);
-
-        if (readResolveMtd != null) {
-            try {
-                obj = readResolveMtd.invoke(obj);
-
-                handles.set(handle, obj);
-            }
-            catch (IllegalAccessException | InvocationTargetException e) {
-                throw new IOException(e);
-            }
-        }
-
-        return obj;
-    }
-
-    /**
-     * Reads serializable object.
-     *
-     * @param cls Class.
-     * @param mtds {@code readObject} methods.
-     * @param readResolveMtd {@code readResolve} method.
-     * @param fields class fields details.
-     * @return Object.
-     * @throws ClassNotFoundException If class not found.
-     * @throws IOException In case of error.
-     */
-    @SuppressWarnings("ForLoopReplaceableByForEach")
-    Object readSerializable(Class<?> cls, List<Method> mtds, Method readResolveMtd,
-        GridOptimizedClassDescriptor.Fields fields) throws ClassNotFoundException, IOException {
-        Object obj;
-
-        try {
-            obj = UNSAFE.allocateInstance(cls);
-        }
-        catch (InstantiationException e) {
-            throw new IOException(e);
-        }
-
-        int handle = handles.assign(obj);
-
-        for (int i = 0; i < mtds.size(); i++) {
-            Method mtd = mtds.get(i);
-
-            if (mtd != null) {
-                curObj = obj;
-                curFields = fields.fieldOffs(i);
-                curFieldInfoList = fields.fieldInfoList(i);
-                curFieldInfoMap = fields.fieldInfoMap(i);
-
-                try {
-                    mtd.invoke(obj, this);
-                }
-                catch (IllegalAccessException | InvocationTargetException e) {
-                    throw new IOException(e);
-                }
-            }
-            else
-                readFields(obj, fields.fieldOffs(i));
-        }
-
-        if (readResolveMtd != null) {
-            try {
-                obj = readResolveMtd.invoke(obj);
-
-                handles.set(handle, obj);
-            }
-            catch (IllegalAccessException | InvocationTargetException e) {
-                throw new IOException(e);
-            }
-        }
-
-        return obj;
-    }
-
-    /**
-     * Reads {@link ArrayList}.
-     *
-     * @return List.
-     * @throws ClassNotFoundException If class not found.
-     * @throws IOException In case of error.
-     */
-    ArrayList<?> readArrayList() throws ClassNotFoundException, IOException {
-        int size = readInt();
-
-        ArrayList<Object> list = new ArrayList<>(size);
-
-        handles.assign(list);
-
-        for (int i = 0; i < size; i++)
-            list.add(readObject());
-
-        return list;
-    }
-
-    /**
-     * Reads {@link HashMap}.
-     *
-     * @param set Whether reading underlying map from {@link HashSet}.
-     * @return Map.
-     * @throws ClassNotFoundException If class not found.
-     * @throws IOException In case of error.
-     */
-    HashMap<?, ?> readHashMap(boolean set) throws ClassNotFoundException, IOException {
-        int size = readInt();
-        float loadFactor = readFloat();
-
-        HashMap<Object, Object> map = new HashMap<>(size, loadFactor);
-
-        if (!set)
-            handles.assign(map);
-
-        for (int i = 0; i < size; i++) {
-            Object key = readObject();
-            Object val = !set ? readObject() : DUMMY;
-
-            map.put(key, val);
-        }
-
-        return map;
-    }
-
-    /**
-     * Reads {@link HashSet}.
-     *
-     * @param mapFieldOff Map field offset.
-     * @return Set.
-     * @throws ClassNotFoundException If class not found.
-     * @throws IOException In case of error.
-     */
-    HashSet<?> readHashSet(long mapFieldOff) throws ClassNotFoundException, IOException {
-        try {
-            HashSet<Object> set = (HashSet<Object>)UNSAFE.allocateInstance(HashSet.class);
-
-            handles.assign(set);
-
-            setObject(set, mapFieldOff, readHashMap(true));
-
-            return set;
-        }
-        catch (InstantiationException e) {
-            throw new IOException(e);
-        }
-    }
-
-    /**
-     * Reads {@link LinkedList}.
-     *
-     * @return List.
-     * @throws ClassNotFoundException If class not found.
-     * @throws IOException In case of error.
-     */
-    LinkedList<?> readLinkedList() throws ClassNotFoundException, IOException {
-        int size = readInt();
-
-        LinkedList<Object> list = new LinkedList<>();
-
-        handles.assign(list);
-
-        for (int i = 0; i < size; i++)
-            list.add(readObject());
-
-        return list;
-    }
-
-    /**
-     * Reads {@link LinkedHashMap}.
-     *
-     * @param set Whether reading underlying map from {@link LinkedHashSet}.
-     * @return Map.
-     * @throws ClassNotFoundException If class not found.
-     * @throws IOException In case of error.
-     */
-    LinkedHashMap<?, ?> readLinkedHashMap(boolean set) throws ClassNotFoundException, IOException {
-        int size = readInt();
-        float loadFactor = readFloat();
-        boolean accessOrder = readBoolean();
-
-        LinkedHashMap<Object, Object> map = new LinkedHashMap<>(size, loadFactor, accessOrder);
-
-        if (!set)
-            handles.assign(map);
-
-        for (int i = 0; i < size; i++) {
-            Object key = readObject();
-            Object val = !set ? readObject() : DUMMY;
-
-            map.put(key, val);
-        }
-
-        return map;
-    }
-
-    /**
-     * Reads {@link LinkedHashSet}.
-     *
-     * @param mapFieldOff Map field offset.
-     * @return Set.
-     * @throws ClassNotFoundException If class not found.
-     * @throws IOException In case of error.
-     */
-    LinkedHashSet<?> readLinkedHashSet(long mapFieldOff) throws ClassNotFoundException, IOException {
-        try {
-            LinkedHashSet<Object> set = (LinkedHashSet<Object>)UNSAFE.allocateInstance(LinkedHashSet.class);
-
-            handles.assign(set);
-
-            setObject(set, mapFieldOff, readLinkedHashMap(true));
-
-            return set;
-        }
-        catch (InstantiationException e) {
-            throw new IOException(e);
-        }
-    }
-
-    /**
-     * Reads {@link Date}.
-     *
-     * @return Date.
-     * @throws ClassNotFoundException If class not found.
-     * @throws IOException In case of error.
-     */
-    Date readDate() throws ClassNotFoundException, IOException {
-        Date date = new Date(readLong());
-
-        handles.assign(date);
-
-        return date;
-    }
-
-    /**
-     * Reads array of {@code byte}s.
-     *
-     * @return Array.
-     * @throws IOException In case of error.
-     */
-    byte[] readByteArray() throws IOException {
-        byte[] arr = in.readByteArray();
-
-        handles.assign(arr);
-
-        return arr;
-    }
-
-    /**
-     * Reads array of {@code short}s.
-     *
-     * @return Array.
-     * @throws IOException In case of error.
-     */
-    short[] readShortArray() throws IOException {
-        short[] arr = in.readShortArray();
-
-        handles.assign(arr);
-
-        return arr;
-    }
-
-    /**
-     * Reads array of {@code int}s.
-     *
-     * @return Array.
-     * @throws IOException In case of error.
-     */
-    int[] readIntArray() throws IOException {
-        int[] arr = in.readIntArray();
-
-        handles.assign(arr);
-
-        return arr;
-    }
-
-    /**
-     * Reads array of {@code long}s.
-     *
-     * @return Array.
-     * @throws IOException In case of error.
-     */
-    long[] readLongArray() throws IOException {
-        long[] arr = in.readLongArray();
-
-        handles.assign(arr);
-
-        return arr;
-    }
-
-    /**
-     * Reads array of {@code float}s.
-     *
-     * @return Array.
-     * @throws IOException In case of error.
-     */
-    float[] readFloatArray() throws IOException {
-        float[] arr = in.readFloatArray();
-
-        handles.assign(arr);
-
-        return arr;
-    }
-
-    /**
-     * Reads array of {@code double}s.
-     *
-     * @return Array.
-     * @throws IOException In case of error.
-     */
-    double[] readDoubleArray() throws IOException {
-        double[] arr = in.readDoubleArray();
-
-        handles.assign(arr);
-
-        return arr;
-    }
-
-    /**
-     * Reads array of {@code char}s.
-     *
-     * @return Array.
-     * @throws IOException In case of error.
-     */
-    char[] readCharArray() throws IOException {
-        char[] arr = in.readCharArray();
-
-        handles.assign(arr);
-
-        return arr;
-    }
-
-    /**
-     * Reads array of {@code boolean}s.
-     *
-     * @return Array.
-     * @throws IOException In case of error.
-     */
-    boolean[] readBooleanArray() throws IOException {
-        boolean[] arr = in.readBooleanArray();
-
-        handles.assign(arr);
-
-        return arr;
-    }
-
-    /**
-     * Reads {@link String}.
-     *
-     * @return String.
-     * @throws IOException In case of error.
-     */
-    public String readString() throws IOException {
-        String str = in.readUTF();
-
-        handles.assign(str);
-
-        return str;
-    }
-
-    /** {@inheritDoc} */
-    @Override public void readFully(byte[] b) throws IOException {
-        in.readFully(b);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void readFully(byte[] b, int off, int len) throws IOException {
-        in.readFully(b, off, len);
-    }
-
-    /** {@inheritDoc} */
-    @Override public int skipBytes(int n) throws IOException {
-        return in.skipBytes(n);
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean readBoolean() throws IOException {
-        return in.readBoolean();
-    }
-
-    /** {@inheritDoc} */
-    @Override public byte readByte() throws IOException {
-        return in.readByte();
-    }
-
-    /** {@inheritDoc} */
-    @Override public int readUnsignedByte() throws IOException {
-        return in.readUnsignedByte();
-    }
-
-    /** {@inheritDoc} */
-    @Override public short readShort() throws IOException {
-        return in.readShort();
-    }
-
-    /** {@inheritDoc} */
-    @Override public int readUnsignedShort() throws IOException {
-        return in.readUnsignedShort();
-    }
-
-    /** {@inheritDoc} */
-    @Override public char readChar() throws IOException {
-        return in.readChar();
-    }
-
-    /** {@inheritDoc} */
-    @Override public int readInt() throws IOException {
-        return in.readInt();
-    }
-
-    /** {@inheritDoc} */
-    @Override public long readLong() throws IOException {
-        return in.readLong();
-    }
-
-    /** {@inheritDoc} */
-    @Override public float readFloat() throws IOException {
-        return in.readFloat();
-    }
-
-    /** {@inheritDoc} */
-    @Override public double readDouble() throws IOException {
-        return in.readDouble();
-    }
-
-    /** {@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} */
-    @SuppressWarnings("deprecation")
-    @Override public String readLine() throws IOException {
-        return in.readLine();
-    }
-
-    /** {@inheritDoc} */
-    @Override public String readUTF() throws IOException {
-        return in.readUTF();
-    }
-
-    /** {@inheritDoc} */
-    @Override public Object readUnshared() throws IOException, ClassNotFoundException {
-        return readObject();
-    }
-
-    /** {@inheritDoc} */
-    @Override public void defaultReadObject() throws IOException, ClassNotFoundException {
-        if (curObj == null)
-            throw new NotActiveException("Not in readObject() call.");
-
-        readFields(curObj, curFields);
-    }
-
-    /** {@inheritDoc} */
-    @Override public ObjectInputStream.GetField readFields() throws IOException, ClassNotFoundException {
-        if (curObj == null)
-            throw new NotActiveException("Not in readObject() call.");
-
-        return new GetFieldImpl(this);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void registerValidation(ObjectInputValidation obj, int pri) {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override public int available() throws IOException {
-        return -1;
-    }
-
-    /**
-     * Returns objects that were added to handles table.
-     * Used ONLY for test purposes.
-     *
-     * @return Handled objects.
-     */
-    Object[] handledObjects() {
-        return handles.entries;
-    }
-
-    /**
-     * Lightweight identity hash table which maps objects to integer handles,
-     * assigned in ascending order.
-     */
-    private static class HandleTable {
-        /** Array mapping handle -> object/exception (depending on status). */
-        private Object[] entries;
-
-        /** Number of handles in table. */
-        private int size;
-
-        /**
-         * Creates handle table with the given initial capacity.
-         *
-         * @param initCap Initial capacity.
-         */
-        HandleTable(int initCap) {
-            entries = new Object[initCap];
-        }
-
-        /**
-         * Assigns next available handle to given object, and returns assigned
-         * handle.
-         *
-         * @param obj Object.
-         * @return Handle.
-         */
-        int assign(Object obj) {
-            if (size >= entries.length)
-                grow();
-
-            entries[size] = obj;
-
-            return size++;
-        }
-
-        /**
-         * Assigns new object to existing handle. Old object is forgotten.
-         *
-         * @param handle Handle.
-         * @param obj Object.
-         */
-        void set(int handle, Object obj) {
-            entries[handle] = obj;
-        }
-
-        /**
-         * Looks up and returns object associated with the given handle.
-         *
-         * @param handle Handle.
-         * @return Object.
-         */
-        Object lookup(int handle) {
-            return entries[handle];
-        }
-
-        /**
-         * Resets table to its initial state.
-         */
-        void clear() {
-            Arrays.fill(entries, 0, size, null);
-
-            size = 0;
-        }
-
-        /**
-         * Expands capacity of internal arrays.
-         */
-        private void grow() {
-            int newCap = (entries.length << 1) + 1;
-
-            Object[] newEntries = new Object[newCap];
-
-            System.arraycopy(entries, 0, newEntries, 0, size);
-
-            entries = newEntries;
-        }
-    }
-
-    /**
-     * {@link GetField} implementation.
-     */
-    private static class GetFieldImpl extends GetField {
-        /** Field info map. */
-        private final Map<String, IgniteBiTuple<Integer, GridOptimizedFieldType>> fieldInfoMap;
-
-        /** Values. */
-        private final Object[] objs;
-
-        /**
-         * @param in Stream.
-         * @throws IOException In case of error.
-         * @throws ClassNotFoundException If class not found.
-         */
-        @SuppressWarnings("ForLoopReplaceableByForEach")
-        private GetFieldImpl(GridOptimizedObjectInputStream in) throws IOException, ClassNotFoundException {
-            fieldInfoMap = in.curFieldInfoMap;
-
-            List<IgniteBiTuple<Integer, GridOptimizedFieldType>> infos = in.curFieldInfoList;
-
-            objs = new Object[infos.size()];
-
-            for (int i = 0; i < infos.size(); i++) {
-                IgniteBiTuple<Integer, GridOptimizedFieldType> t = infos.get(i);
-
-                Object obj = null;
-
-                switch (t.get2()) {
-                    case BYTE:
-                        obj = in.readByte();
-
-                        break;
-
-                    case SHORT:
-                        obj = in.readShort();
-
-                        break;
-
-                    case INT:
-                        obj = in.readInt();
-
-                        break;
-
-                    case LONG:
-                        obj = in.readLong();
-
-                        break;
-
-                    case FLOAT:
-                        obj = in.readFloat();
-
-                        break;
-
-                    case DOUBLE:
-                        obj = in.readDouble();
-
-                        break;
-
-                    case CHAR:
-                        obj = in.readChar();
-
-                        break;
-
-                    case BOOLEAN:
-                        obj = in.readBoolean();
-
-                        break;
-
-                    case OTHER:
-                        obj = in.readObject();
-                }
-
-                objs[t.get1()] = obj;
-            }
-        }
-
-        /** {@inheritDoc} */
-        @Override public ObjectStreamClass getObjectStreamClass() {
-            throw new UnsupportedOperationException();
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean defaulted(String name) throws IOException {
-            return objs[fieldInfoMap.get(name).get1()] == null;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean get(String name, boolean dflt) throws IOException {
-            return value(name, dflt);
-        }
-
-        /** {@inheritDoc} */
-        @Override public byte get(String name, byte dflt) throws IOException {
-            return value(name, dflt);
-        }
-
-        /** {@inheritDoc} */
-        @Override public char get(String name, char dflt) throws IOException {
-            return value(name, dflt);
-        }
-
-        /** {@inheritDoc} */
-        @Override public short get(String name, short dflt) throws IOException {
-            return value(name, dflt);
-        }
-
-        /** {@inheritDoc} */
-        @Override public int get(String name, int dflt) throws IOException {
-            return value(name, dflt);
-        }
-
-        /** {@inheritDoc} */
-        @Override public long get(String name, long dflt) throws IOException {
-            return value(name, dflt);
-        }
-
-        /** {@inheritDoc} */
-        @Override public float get(String name, float dflt) throws IOException {
-            return value(name, dflt);
-        }
-
-        /** {@inheritDoc} */
-        @Override public double get(String name, double dflt) throws IOException {
-            return value(name, dflt);
-        }
-
-        /** {@inheritDoc} */
-        @Override public Object get(String name, Object dflt) throws IOException {
-            return value(name, dflt);
-        }
-
-        /**
-         * @param name Field name.
-         * @param dflt Default value.
-         * @return Value.
-         */
-        private <T> T value(String name, T dflt) {
-            return objs[fieldInfoMap.get(name).get1()] != null ? (T)objs[fieldInfoMap.get(name).get1()] : dflt;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a50fccdd/modules/core/src/main/java/org/gridgain/grid/marshaller/optimized/GridOptimizedObjectOutputStream.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/marshaller/optimized/GridOptimizedObjectOutputStream.java b/modules/core/src/main/java/org/gridgain/grid/marshaller/optimized/GridOptimizedObjectOutputStream.java
deleted file mode 100644
index 0365699..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/marshaller/optimized/GridOptimizedObjectOutputStream.java
+++ /dev/null
@@ -1,831 +0,0 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid.marshaller.optimized;
-
-import org.apache.ignite.lang.*;
-import org.gridgain.grid.util.*;
-import org.gridgain.grid.util.io.*;
-import org.gridgain.grid.util.typedef.*;
-
-import java.io.*;
-import java.lang.reflect.*;
-import java.util.*;
-
-import static org.gridgain.grid.marshaller.optimized.GridOptimizedMarshallerUtils.*;
-
-/**
- * Optimized object output stream.
- */
-class GridOptimizedObjectOutputStream extends ObjectOutputStream {
-    /** */
-    private static final Collection<String> CONVERTED_ERR = F.asList(
-        "weblogic/management/ManagementException",
-        "Externalizable class doesn't have default constructor: class " +
-            "org.gridgain.grid.kernal.processors.email.GridEmailProcessor$2"
-    );
-
-    /** */
-    private final GridHandleTable handles = new GridHandleTable(10, 3.00f);
-
-    /** */
-    private boolean requireSer;
-
-    /** */
-    private GridDataOutput out;
-
-    /** */
-    private Object curObj;
-
-    /** */
-    private List<T2<GridOptimizedFieldType, Long>> curFields;
-
-    /** */
-    private Map<String, IgniteBiTuple<Integer, GridOptimizedFieldType>> curFieldInfoMap;
-
-    /** */
-    private PutFieldImpl curPut;
-
-
-    /**
-     * @throws IOException In case of error.
-     */
-    GridOptimizedObjectOutputStream() throws IOException {
-        // No-op.
-    }
-
-    /**
-     * @param out Output.
-     * @throws IOException In case of error.
-     */
-    GridOptimizedObjectOutputStream(GridDataOutput out) throws IOException {
-        this.out = out;
-    }
-
-    /**
-     * @param requireSer Require {@link Serializable} flag.
-     */
-    void requireSerializable(boolean requireSer) {
-        this.requireSer = requireSer;
-    }
-
-    /**
-     * @return Require {@link Serializable} flag.
-     */
-    boolean requireSerializable() {
-        return requireSer;
-    }
-
-    /**
-     * @param out Output.
-     */
-    public void out(GridDataOutput out) {
-        this.out = out;
-    }
-
-    /**
-     * @return Output.
-     */
-    public GridDataOutput out() {
-        return out;
-    }
-
-    /** {@inheritDoc} */
-    @Override public void close() throws IOException {
-        reset();
-    }
-
-    /** {@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 protected void writeObjectOverride(Object obj) throws IOException {
-        try {
-            writeObject0(obj);
-        }
-        catch (IOException e) {
-            Throwable t = e;
-
-            do {
-                if (CONVERTED_ERR.contains(t.getMessage()))
-                    throw new IOException("You are trying to serialize internal classes that are not supposed " +
-                        "to be serialized. Check that all non-serializable fields are transient. Consider using " +
-                        "static inner classes instead of non-static inner classes and anonymous classes.", e);
-            }
-            while ((t = t.getCause()) != null);
-
-            throw e;
-        }
-    }
-
-    /**
-     * Writes object to stream.
-     *
-     * @param obj Object.
-     * @throws IOException In case of error.
-     */
-    private void writeObject0(Object obj) throws IOException {
-        curObj = null;
-        curFields = null;
-        curPut = null;
-        curFieldInfoMap = null;
-
-        if (obj == null)
-            writeByte(NULL);
-        else {
-            Class<?> cls = obj.getClass();
-
-            GridOptimizedClassDescriptor desc = classDescriptor(cls, obj);
-
-            if (desc.excluded()) {
-                writeByte(NULL);
-
-                return;
-            }
-
-            Object obj0 = desc.replace(obj);
-
-            if (obj0 == null) {
-                writeByte(NULL);
-
-                return;
-            }
-
-            int handle = -1;
-
-            if (!desc.isPrimitive() && !desc.isEnum() && !desc.isClass())
-                handle = handles.lookup(obj);
-
-            if (obj0 != obj) {
-                obj = obj0;
-
-                desc = classDescriptor(obj.getClass(), obj);
-            }
-
-            if (handle >= 0) {
-                writeByte(HANDLE);
-                writeInt(handle);
-            }
-            else {
-                writeByte(OBJECT);
-
-                GridOptimizedClassResolver.writeClass(this, desc);
-
-                desc.write(this, obj);
-            }
-        }
-    }
-
-    /**
-     * Writes array to this stream.
-     *
-     * @param arr Array.
-     * @throws IOException In case of error.
-     */
-    @SuppressWarnings("ForLoopReplaceableByForEach")
-    void writeArray(Object[] arr) throws IOException {
-        int len = arr.length;
-
-        writeInt(len);
-
-        for (int i = 0; i < len; i++) {
-            Object obj = arr[i];
-
-            writeObject0(obj);
-        }
-    }
-
-    /**
-     * Writes {@link UUID} to this stream.
-     *
-     * @param uuid UUID.
-     * @throws IOException In case of error.
-     */
-    void writeUuid(UUID uuid) throws IOException {
-        writeLong(uuid.getMostSignificantBits());
-        writeLong(uuid.getLeastSignificantBits());
-    }
-
-    /**
-     * Writes {@link Properties} to this stream.
-     *
-     * @param props Properties.
-     * @param dfltsFieldOff Defaults field offset.
-     * @throws IOException In case of error.
-     */
-    void writeProperties(Properties props, long dfltsFieldOff) throws IOException {
-        Properties dflts = (Properties)getObject(props, dfltsFieldOff);
-
-        if (dflts == null)
-            writeBoolean(true);
-        else {
-            writeBoolean(false);
-
-            writeObject0(dflts);
-        }
-
-        Set<String> names = props.stringPropertyNames();
-
-        writeInt(names.size());
-
-        for (String name : names) {
-            writeUTF(name);
-            writeUTF(props.getProperty(name));
-        }
-    }
-
-    /**
-     * Writes externalizable object.
-     *
-     * @param obj Object.
-     * @throws IOException In case of error.
-     */
-    void writeExternalizable(Object obj) throws IOException {
-        Externalizable extObj = (Externalizable)obj;
-
-        extObj.writeExternal(this);
-    }
-
-    /**
-     * Writes serializable object.
-     *
-     * @param obj Object.
-     * @param mtds {@code writeObject} methods.
-     * @param fields class fields details.
-     * @throws IOException In case of error.
-     */
-    @SuppressWarnings("ForLoopReplaceableByForEach")
-    void writeSerializable(Object obj, List<Method> mtds, GridOptimizedClassDescriptor.Fields fields)
-        throws IOException {
-        for (int i = 0; i < mtds.size(); i++) {
-            Method mtd = mtds.get(i);
-
-            if (mtd != null) {
-                curObj = obj;
-                curFields = fields.fieldOffs(i);
-                curFieldInfoMap = fields.fieldInfoMap(i);
-
-                try {
-                    mtd.invoke(obj, this);
-                }
-                catch (IllegalAccessException e) {
-                    throw new IOException(e);
-                }
-                catch (InvocationTargetException e) {
-                    throw new IOException(e.getCause());
-                }
-            }
-            else
-                writeFields(obj, fields.fieldOffs(i));
-        }
-    }
-
-    /**
-     * Writes {@link ArrayList}.
-     *
-     * @param list List.
-     * @throws IOException In case of error.
-     */
-    @SuppressWarnings({"ForLoopReplaceableByForEach", "TypeMayBeWeakened"})
-    void writeArrayList(ArrayList<?> list) throws IOException {
-        int size = list.size();
-
-        writeInt(size);
-
-        for (int i = 0; i < size; i++)
-            writeObject0(list.get(i));
-    }
-
-    /**
-     * Writes {@link HashMap}.
-     *
-     * @param map Map.
-     * @param loadFactorFieldOff Load factor field offset.
-     * @param set Whether writing underlying map from {@link HashSet}.
-     * @throws IOException In case of error.
-     */
-    @SuppressWarnings("TypeMayBeWeakened")
-    void writeHashMap(HashMap<?, ?> map, long loadFactorFieldOff, boolean set) throws IOException {
-        int size = map.size();
-
-        writeInt(size);
-        writeFloat(getFloat(map, loadFactorFieldOff));
-
-        for (Map.Entry<?, ?> e : map.entrySet()) {
-            writeObject0(e.getKey());
-
-            if (!set)
-                writeObject0(e.getValue());
-        }
-    }
-
-    /**
-     * Writes {@link HashSet}.
-     *
-     * @param set Set.
-     * @param mapFieldOff Map field offset.
-     * @param loadFactorFieldOff Load factor field offset.
-     * @throws IOException In case of error.
-     */
-    void writeHashSet(HashSet<?> set, long mapFieldOff, long loadFactorFieldOff) throws IOException {
-        writeHashMap((HashMap<?, ?>)getObject(set, mapFieldOff), loadFactorFieldOff, true);
-    }
-
-    /**
-     * Writes {@link LinkedList}.
-     *
-     * @param list List.
-     * @throws IOException In case of error.
-     */
-    @SuppressWarnings("TypeMayBeWeakened")
-    void writeLinkedList(LinkedList<?> list) throws IOException {
-        int size = list.size();
-
-        writeInt(size);
-
-        for (Object obj : list)
-            writeObject0(obj);
-    }
-
-    /**
-     * Writes {@link LinkedHashMap}.
-     *
-     * @param map Map.
-     * @param loadFactorFieldOff Load factor field offset.
-     * @param accessOrderFieldOff access order field offset.
-     * @param set Whether writing underlying map from {@link LinkedHashSet}.
-     * @throws IOException In case of error.
-     */
-    @SuppressWarnings("TypeMayBeWeakened")
-    void writeLinkedHashMap(LinkedHashMap<?, ?> map, long loadFactorFieldOff, long accessOrderFieldOff, boolean set)
-        throws IOException {
-        int size = map.size();
-
-        writeInt(size);
-        writeFloat(getFloat(map, loadFactorFieldOff));
-
-        if (accessOrderFieldOff >= 0)
-            writeBoolean(getBoolean(map, accessOrderFieldOff));
-        else
-            writeBoolean(false);
-
-        for (Map.Entry<?, ?> e : map.entrySet()) {
-            writeObject0(e.getKey());
-
-            if (!set)
-                writeObject0(e.getValue());
-        }
-    }
-
-    /**
-     * Writes {@link LinkedHashSet}.
-     *
-     * @param set Set.
-     * @param mapFieldOff Map field offset.
-     * @param loadFactorFieldOff Load factor field offset.
-     * @throws IOException In case of error.
-     */
-    void writeLinkedHashSet(LinkedHashSet<?> set, long mapFieldOff, long loadFactorFieldOff) throws IOException {
-        LinkedHashMap<?, ?> map = (LinkedHashMap<?, ?>)getObject(set, mapFieldOff);
-
-        writeLinkedHashMap(map, loadFactorFieldOff, -1, true);
-    }
-
-    /**
-     * Writes {@link Date}.
-     *
-     * @param date Date.
-     * @throws IOException In case of error.
-     */
-    void writeDate(Date date) throws IOException {
-        writeLong(date.getTime());
-    }
-
-    /**
-     * Writes all non-static and non-transient field values to this stream.
-     *
-     * @param obj Object.
-     * @param fieldOffs Field offsets.
-     * @throws IOException In case of error.
-     */
-    @SuppressWarnings("ForLoopReplaceableByForEach")
-    private void writeFields(Object obj, List<T2<GridOptimizedFieldType, Long>> fieldOffs) throws IOException {
-        for (int i = 0; i < fieldOffs.size(); i++) {
-            T2<GridOptimizedFieldType, Long> t = fieldOffs.get(i);
-
-            switch (t.get1()) {
-                case BYTE:
-                    writeByte(getByte(obj, t.get2()));
-
-                    break;
-
-                case SHORT:
-                    writeShort(getShort(obj, t.get2()));
-
-                    break;
-
-                case INT:
-                    writeInt(getInt(obj, t.get2()));
-
-                    break;
-
-                case LONG:
-                    writeLong(getLong(obj, t.get2()));
-
-                    break;
-
-                case FLOAT:
-                    writeFloat(getFloat(obj, t.get2()));
-
-                    break;
-
-                case DOUBLE:
-                    writeDouble(getDouble(obj, t.get2()));
-
-                    break;
-
-                case CHAR:
-                    writeChar(getChar(obj, t.get2()));
-
-                    break;
-
-                case BOOLEAN:
-                    writeBoolean(getBoolean(obj, t.get2()));
-
-                    break;
-
-                case OTHER:
-                    writeObject0(getObject(obj, t.get2()));
-            }
-        }
-    }
-
-    /**
-     * Writes array of {@code byte}s.
-     *
-     * @param arr Array.
-     * @throws IOException In case of error.
-     */
-    void writeByteArray(byte[] arr) throws IOException {
-        out.writeByteArray(arr);
-    }
-
-    /**
-     * Writes array of {@code short}s.
-     *
-     * @param arr Array.
-     * @throws IOException In case of error.
-     */
-    void writeShortArray(short[] arr) throws IOException {
-        out.writeShortArray(arr);
-    }
-
-    /**
-     * Writes array of {@code int}s.
-     *
-     * @param arr Array.
-     * @throws IOException In case of error.
-     */
-    void writeIntArray(int[] arr) throws IOException {
-        out.writeIntArray(arr);
-    }
-
-    /**
-     * Writes array of {@code long}s.
-     *
-     * @param arr Array.
-     * @throws IOException In case of error.
-     */
-    void writeLongArray(long[] arr) throws IOException {
-        out.writeLongArray(arr);
-    }
-
-    /**
-     * Writes array of {@code float}s.
-     *
-     * @param arr Array.
-     * @throws IOException In case of error.
-     */
-    void writeFloatArray(float[] arr) throws IOException {
-        out.writeFloatArray(arr);
-    }
-
-    /**
-     * Writes array of {@code double}s.
-     *
-     * @param arr Array.
-     * @throws IOException In case of error.
-     */
-    void writeDoubleArray(double[] arr) throws IOException {
-        out.writeDoubleArray(arr);
-    }
-
-    /**
-     * Writes array of {@code char}s.
-     *
-     * @param arr Array.
-     * @throws IOException In case of error.
-     */
-    void writeCharArray(char[] arr) throws IOException {
-        out.writeCharArray(arr);
-    }
-
-    /**
-     * Writes array of {@code boolean}s.
-     *
-     * @param arr Array.
-     * @throws IOException In case of error.
-     */
-    void writeBooleanArray(boolean[] arr) throws IOException {
-        out.writeBooleanArray(arr);
-    }
-
-    /**
-     * Writes {@link String}.
-     *
-     * @param str String.
-     * @throws IOException In case of error.
-     */
-    void writeString(String str) throws IOException {
-        out.writeUTF(str);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeBoolean(boolean v) throws IOException {
-        out.writeBoolean(v);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeByte(int v) throws IOException {
-        out.writeByte(v);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeShort(int v) throws IOException {
-        out.writeShort(v);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeChar(int v) throws IOException {
-        out.writeChar(v);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeInt(int v) throws IOException {
-        out.writeInt(v);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeLong(long v) throws IOException {
-        out.writeLong(v);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeFloat(float v) throws IOException {
-        out.writeFloat(v);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeDouble(double v) throws IOException {
-        out.writeDouble(v);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void write(int b) throws IOException {
-        writeByte(b);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeBytes(String s) throws IOException {
-        out.writeBytes(s);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeChars(String s) throws IOException {
-        out.writeChars(s);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeUTF(String s) throws IOException {
-        out.writeUTF(s);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void useProtocolVersion(int ver) throws IOException {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeUnshared(Object obj) throws IOException {
-        writeObject0(obj);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void defaultWriteObject() throws IOException {
-        if (curObj == null)
-            throw new NotActiveException("Not in writeObject() call.");
-
-        writeFields(curObj, curFields);
-    }
-
-    /** {@inheritDoc} */
-    @Override public ObjectOutputStream.PutField putFields() throws IOException {
-        if (curObj == null)
-            throw new NotActiveException("Not in writeObject() call or fields already written.");
-
-        if (curPut == null)
-            curPut = new PutFieldImpl(this);
-
-        return curPut;
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeFields() throws IOException {
-        if (curObj == null)
-            throw new NotActiveException("Not in writeObject() call.");
-
-        if (curPut == null)
-            throw new NotActiveException("putFields() was not called.");
-
-        for (IgniteBiTuple<GridOptimizedFieldType, Object> t : curPut.objs) {
-            switch (t.get1()) {
-                case BYTE:
-                    writeByte((Byte)t.get2());
-
-                    break;
-
-                case SHORT:
-                    writeShort((Short)t.get2());
-
-                    break;
-
-                case INT:
-                    writeInt((Integer)t.get2());
-
-                    break;
-
-                case LONG:
-                    writeLong((Long)t.get2());
-
-                    break;
-
-                case FLOAT:
-                    writeFloat((Float)t.get2());
-
-                    break;
-
-                case DOUBLE:
-                    writeDouble((Double)t.get2());
-
-                    break;
-
-                case CHAR:
-                    writeChar((Character)t.get2());
-
-                    break;
-
-                case BOOLEAN:
-                    writeBoolean((Boolean)t.get2());
-
-                    break;
-
-                case OTHER:
-                    writeObject0(t.get2());
-            }
-        }
-    }
-
-    /** {@inheritDoc} */
-    @Override public void reset() throws IOException {
-        out.reset();
-        handles.clear();
-
-        curObj = null;
-        curFields = null;
-        curPut = null;
-        curFieldInfoMap = null;
-    }
-
-    /** {@inheritDoc} */
-    @Override public void flush() throws IOException {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override public void drain() throws IOException {
-        // No-op.
-    }
-
-    /**
-     * Returns objects that were added to handles table.
-     * Used ONLY for test purposes.
-     *
-     * @return Handled objects.
-     */
-    Object[] handledObjects() {
-        return handles.objects();
-    }
-
-    /**
-     * {@link PutField} implementation.
-     */
-    private static class PutFieldImpl extends PutField {
-        /** Stream. */
-        private final GridOptimizedObjectOutputStream out;
-
-        /** Field info map. */
-        private final Map<String, IgniteBiTuple<Integer, GridOptimizedFieldType>> fieldInfoMap;
-
-        /** Values. */
-        private final IgniteBiTuple<GridOptimizedFieldType, Object>[] objs;
-
-        /**
-         * @param out Output stream.
-         * @throws IOException In case of error.
-         */
-        @SuppressWarnings("unchecked")
-        private PutFieldImpl(GridOptimizedObjectOutputStream out) {
-            this.out = out;
-
-            fieldInfoMap = out.curFieldInfoMap;
-
-            objs = new IgniteBiTuple[fieldInfoMap.size()];
-        }
-
-        /** {@inheritDoc} */
-        @Override public void put(String name, boolean val) {
-            value(name, val);
-        }
-
-        /** {@inheritDoc} */
-        @Override public void put(String name, byte val) {
-            value(name, val);
-        }
-
-        /** {@inheritDoc} */
-        @Override public void put(String name, char val) {
-            value(name, val);
-        }
-
-        /** {@inheritDoc} */
-        @Override public void put(String name, short val) {
-            value(name, val);
-        }
-
-        /** {@inheritDoc} */
-        @Override public void put(String name, int val) {
-            value(name, val);
-        }
-
-        /** {@inheritDoc} */
-        @Override public void put(String name, long val) {
-            value(name, val);
-        }
-
-        /** {@inheritDoc} */
-        @Override public void put(String name, float val) {
-            value(name, val);
-        }
-
-        /** {@inheritDoc} */
-        @Override public void put(String name, double val) {
-            value(name, val);
-        }
-
-        /** {@inheritDoc} */
-        @Override public void put(String name, Object val) {
-            value(name, val);
-        }
-
-        /** {@inheritDoc} */
-        @Override public void write(ObjectOutput out) throws IOException {
-            if (out != this.out)
-                throw new IllegalArgumentException("Wrong stream.");
-
-            this.out.writeFields();
-        }
-
-        /**
-         * @param name Field name.
-         * @param val Value.
-         */
-        private void value(String name, Object val) {
-            IgniteBiTuple<Integer, GridOptimizedFieldType> info = fieldInfoMap.get(name);
-
-            objs[info.get1()] = F.t(info.get2(), val);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a50fccdd/modules/core/src/main/java/org/gridgain/grid/marshaller/optimized/GridOptimizedObjectStreamRegistry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/marshaller/optimized/GridOptimizedObjectStreamRegistry.java b/modules/core/src/main/java/org/gridgain/grid/marshaller/optimized/GridOptimizedObjectStreamRegistry.java
deleted file mode 100644
index c95e1d8..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/marshaller/optimized/GridOptimizedObjectStreamRegistry.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid.marshaller.optimized;
-
-import org.gridgain.grid.*;
-import org.gridgain.grid.util.typedef.internal.*;
-import org.gridgain.grid.util.io.*;
-
-import java.io.*;
-import java.util.concurrent.*;
-
-/**
- * Storage for object streams.
- */
-class GridOptimizedObjectStreamRegistry {
-    /** Holders. */
-    private static final ThreadLocal<StreamHolder> holders = new ThreadLocal<>();
-
-    /** Holders pool. */
-    private static BlockingQueue<StreamHolder> pool;
-
-    /**
-     * Ensures singleton.
-     */
-    private GridOptimizedObjectStreamRegistry() {
-        // No-op.
-    }
-
-    /**
-     * Sets streams pool size.
-     *
-     * @param size Streams pool size.
-     */
-    static void poolSize(int size) {
-        if (size > 0) {
-            pool = new LinkedBlockingQueue<>(size);
-
-            for (int i = 0; i < size; i++) {
-                boolean b = pool.offer(new StreamHolder());
-
-                assert b;
-            }
-        }
-        else
-            pool = null;
-    }
-
-    /**
-     * Gets output stream.
-     *
-     * @return Object output stream.
-     * @throws GridInterruptedException If thread is interrupted while trying to take holder from pool.
-     */
-    static GridOptimizedObjectOutputStream out() throws GridInterruptedException {
-        return holder().acquireOut();
-    }
-
-    /**
-     * Gets input stream.
-     *
-     * @return Object input stream.
-     * @throws GridInterruptedException If thread is interrupted while trying to take holder from pool.
-     */
-    static GridOptimizedObjectInputStream in() throws GridInterruptedException {
-        return holder().acquireIn();
-    }
-
-    /**
-     * Closes and releases output stream.
-     *
-     * @param out Object output stream.
-     */
-    static void closeOut(GridOptimizedObjectOutputStream out) {
-        U.close(out, null);
-
-        StreamHolder holder = holders.get();
-
-        holder.releaseOut();
-
-        if (pool != null) {
-            holders.remove();
-
-            boolean b = pool.offer(holder);
-
-            assert b;
-        }
-    }
-
-    /**
-     * Closes and releases input stream.
-     *
-     * @param in Object input stream.
-     */
-    @SuppressWarnings("TypeMayBeWeakened")
-    static void closeIn(GridOptimizedObjectInputStream in) {
-        U.close(in, null);
-
-        StreamHolder holder = holders.get();
-
-        holder.releaseIn();
-
-        if (pool != null) {
-            holders.remove();
-
-            boolean b = pool.offer(holder);
-
-            assert b;
-        }
-    }
-
-    /**
-     * Gets holder from pool or thread local.
-     *
-     * @return Stream holder.
-     * @throws GridInterruptedException If thread is interrupted while trying to take holder from pool.
-     */
-    private static StreamHolder holder() throws GridInterruptedException {
-        StreamHolder holder = holders.get();
-
-        if (holder == null) {
-            try {
-                holders.set(holder = pool != null ? pool.take() : new StreamHolder());
-            }
-            catch (InterruptedException e) {
-                throw new GridInterruptedException("Failed to take object stream from pool (thread interrupted).", e);
-            }
-        }
-
-        return holder;
-    }
-
-    /**
-     * Streams holder.
-     */
-    private static class StreamHolder {
-        /** Output stream. */
-        private final GridOptimizedObjectOutputStream out = createOut();
-
-        /** Input stream. */
-        private final GridOptimizedObjectInputStream in = createIn();
-
-        /** Output streams counter. */
-        private int outAcquireCnt;
-
-        /** Input streams counter. */
-        private int inAcquireCnt;
-
-        /**
-         * Gets output stream.
-         *
-         * @return Object output stream.
-         */
-        GridOptimizedObjectOutputStream acquireOut() {
-            return outAcquireCnt++ > 0 ? createOut() : out;
-        }
-
-        /**
-         * Gets input stream.
-         *
-         * @return Object input stream.
-         */
-        GridOptimizedObjectInputStream acquireIn() {
-            return inAcquireCnt++ > 0 ? createIn() : in;
-        }
-
-        /**
-         * Releases output stream.
-         */
-        void releaseOut() {
-            outAcquireCnt--;
-        }
-
-        /**
-         * Releases input stream.
-         */
-        void releaseIn() {
-            inAcquireCnt--;
-        }
-
-        /**
-         * Creates output stream.
-         *
-         * @return Object output stream.
-         */
-        private GridOptimizedObjectOutputStream createOut() {
-            try {
-                return new GridOptimizedObjectOutputStream(new GridUnsafeDataOutput(4 * 1024));
-            }
-            catch (IOException e) {
-                throw new GridRuntimeException("Failed to create object output stream.", e);
-            }
-        }
-
-        /**
-         * Creates input stream.
-         *
-         * @return Object input stream.
-         */
-        private GridOptimizedObjectInputStream createIn() {
-            try {
-                return new GridOptimizedObjectInputStream(new GridUnsafeDataInput());
-            }
-            catch (IOException e) {
-                throw new GridRuntimeException("Failed to create object input stream.", e);
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a50fccdd/modules/core/src/test/config/example-cache.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/example-cache.xml b/modules/core/src/test/config/example-cache.xml
index ab01c16..0ae4a11 100644
--- a/modules/core/src/test/config/example-cache.xml
+++ b/modules/core/src/test/config/example-cache.xml
@@ -38,7 +38,7 @@
         <property name="peerClassLoadingEnabled" value="true"/>
 
         <property name="marshaller">
-            <bean class="org.gridgain.grid.marshaller.optimized.GridOptimizedMarshaller">
+            <bean class="org.apache.ignite.marshaller.optimized.GridOptimizedMarshaller">
                 <!-- Set to false to allow non-serializable objects in examples, default is true. -->
                 <property name="requireSerializable" value="false"/>
             </bean>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a50fccdd/modules/core/src/test/config/ggfs-loopback.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/ggfs-loopback.xml b/modules/core/src/test/config/ggfs-loopback.xml
index a029536..d7f2480 100644
--- a/modules/core/src/test/config/ggfs-loopback.xml
+++ b/modules/core/src/test/config/ggfs-loopback.xml
@@ -58,7 +58,7 @@
             Configure optimized marshaller.
         -->
         <property name="marshaller">
-            <bean class="org.gridgain.grid.marshaller.optimized.GridOptimizedMarshaller">
+            <bean class="org.apache.ignite.marshaller.optimized.GridOptimizedMarshaller">
                 <!--
                     For better performance set this property to true in case
                     all marshalled classes implement java.io.Serializable.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a50fccdd/modules/core/src/test/config/ggfs-no-endpoint.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/ggfs-no-endpoint.xml b/modules/core/src/test/config/ggfs-no-endpoint.xml
index 7d82733..5b4b861 100644
--- a/modules/core/src/test/config/ggfs-no-endpoint.xml
+++ b/modules/core/src/test/config/ggfs-no-endpoint.xml
@@ -59,7 +59,7 @@
             Configure optimized marshaller.
         -->
         <property name="marshaller">
-            <bean class="org.gridgain.grid.marshaller.optimized.GridOptimizedMarshaller">
+            <bean class="org.apache.ignite.marshaller.optimized.GridOptimizedMarshaller">
                 <!--
                     For better performance set this property to true in case
                     all marshalled classes implement java.io.Serializable.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a50fccdd/modules/core/src/test/config/ggfs-shmem.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/ggfs-shmem.xml b/modules/core/src/test/config/ggfs-shmem.xml
index 97f1a66..3602b4f 100644
--- a/modules/core/src/test/config/ggfs-shmem.xml
+++ b/modules/core/src/test/config/ggfs-shmem.xml
@@ -58,7 +58,7 @@
             Configure optimized marshaller.
         -->
         <property name="marshaller">
-            <bean class="org.gridgain.grid.marshaller.optimized.GridOptimizedMarshaller">
+            <bean class="org.apache.ignite.marshaller.optimized.GridOptimizedMarshaller">
                 <!--
                     For better performance set this property to true in case
                     all marshalled classes implement java.io.Serializable.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a50fccdd/modules/core/src/test/config/io-manager-benchmark.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/io-manager-benchmark.xml b/modules/core/src/test/config/io-manager-benchmark.xml
index 6f0d589..87223bf 100644
--- a/modules/core/src/test/config/io-manager-benchmark.xml
+++ b/modules/core/src/test/config/io-manager-benchmark.xml
@@ -28,7 +28,7 @@
         </property>
 
         <property name="marshaller">
-            <bean class="org.gridgain.grid.marshaller.optimized.GridOptimizedMarshaller">
+            <bean class="org.apache.ignite.marshaller.optimized.GridOptimizedMarshaller">
                 <property name="requireSerializable" value="true"/>
 
                 <property name="classNames">

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a50fccdd/modules/core/src/test/config/jobs-load-base.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/jobs-load-base.xml b/modules/core/src/test/config/jobs-load-base.xml
index 88619dc..870b0e6 100644
--- a/modules/core/src/test/config/jobs-load-base.xml
+++ b/modules/core/src/test/config/jobs-load-base.xml
@@ -13,7 +13,7 @@
         <property name="localHost" value="127.0.0.1"/>
 
         <property name="marshaller">
-            <bean class="org.gridgain.grid.marshaller.optimized.GridOptimizedMarshaller">
+            <bean class="org.apache.ignite.marshaller.optimized.GridOptimizedMarshaller">
                 <property name="classNames">
                     <list>
                         <value>org.gridgain.loadtests.job.GridJobExecutionLoadTestJob</value>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a50fccdd/modules/core/src/test/config/load/dsi-load-base.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/load/dsi-load-base.xml b/modules/core/src/test/config/load/dsi-load-base.xml
index bd21c02..5cf4c20 100644
--- a/modules/core/src/test/config/load/dsi-load-base.xml
+++ b/modules/core/src/test/config/load/dsi-load-base.xml
@@ -27,7 +27,7 @@
         <property name="localHost" value="127.0.0.1"/>
 
         <property name="marshaller">
-            <bean class="org.gridgain.grid.marshaller.optimized.GridOptimizedMarshaller">
+            <bean class="org.apache.ignite.marshaller.optimized.GridOptimizedMarshaller">
                 <property name="classNames">
                     <list>
                         <value>org.gridgain.loadtests.dsi.GridDsiSession</value>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a50fccdd/modules/core/src/test/config/spring-start-nodes-attr.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/spring-start-nodes-attr.xml b/modules/core/src/test/config/spring-start-nodes-attr.xml
index f294c4b..d02d6f8 100644
--- a/modules/core/src/test/config/spring-start-nodes-attr.xml
+++ b/modules/core/src/test/config/spring-start-nodes-attr.xml
@@ -31,7 +31,7 @@
         <property name="restEnabled" value="false"/>
 
         <property name="marshaller">
-            <bean class="org.gridgain.grid.marshaller.optimized.GridOptimizedMarshaller">
+            <bean class="org.apache.ignite.marshaller.optimized.GridOptimizedMarshaller">
                 <property name="requireSerializable" value="false"/>
             </bean>
         </property>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a50fccdd/modules/core/src/test/config/spring-start-nodes.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/spring-start-nodes.xml b/modules/core/src/test/config/spring-start-nodes.xml
index 3151098..ed9377c 100644
--- a/modules/core/src/test/config/spring-start-nodes.xml
+++ b/modules/core/src/test/config/spring-start-nodes.xml
@@ -25,7 +25,7 @@
         <property name="restEnabled" value="false"/>
 
         <property name="marshaller">
-            <bean class="org.gridgain.grid.marshaller.optimized.GridOptimizedMarshaller">
+            <bean class="org.apache.ignite.marshaller.optimized.GridOptimizedMarshaller">
                 <property name="requireSerializable" value="false"/>
             </bean>
         </property>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a50fccdd/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 2a52ec4..cc94418 100644
--- a/modules/core/src/test/java/org/gridgain/grid/GridExternalizableAbstractTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/GridExternalizableAbstractTest.java
@@ -11,7 +11,7 @@ package org.gridgain.grid;
 
 import org.apache.ignite.marshaller.*;
 import org.apache.ignite.marshaller.jdk.*;
-import org.gridgain.grid.marshaller.optimized.*;
+import org.apache.ignite.marshaller.optimized.*;
 import org.gridgain.testframework.junits.common.*;
 import java.util.*;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a50fccdd/modules/core/src/test/java/org/gridgain/grid/ggfs/GridGgfsPathSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/ggfs/GridGgfsPathSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/ggfs/GridGgfsPathSelfTest.java
index 2383d61..3c3ac4e 100644
--- a/modules/core/src/test/java/org/gridgain/grid/ggfs/GridGgfsPathSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/ggfs/GridGgfsPathSelfTest.java
@@ -10,8 +10,8 @@
 package org.gridgain.grid.ggfs;
 
 import org.apache.ignite.marshaller.*;
+import org.apache.ignite.marshaller.optimized.*;
 import org.gridgain.grid.*;
-import org.gridgain.grid.marshaller.optimized.*;
 import org.gridgain.testframework.*;
 import org.gridgain.testframework.junits.common.*;
 import org.jetbrains.annotations.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a50fccdd/modules/core/src/test/java/org/gridgain/grid/kernal/GridFailoverTaskWithPredicateSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridFailoverTaskWithPredicateSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridFailoverTaskWithPredicateSelfTest.java
index b831457..b45bb03 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridFailoverTaskWithPredicateSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridFailoverTaskWithPredicateSelfTest.java
@@ -5,9 +5,9 @@ import org.apache.ignite.cluster.*;
 import org.apache.ignite.compute.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.lang.*;
+import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.resources.*;
 import org.gridgain.grid.*;
-import org.gridgain.grid.marshaller.optimized.*;
 import org.gridgain.grid.spi.failover.*;
 import org.gridgain.grid.spi.failover.always.*;
 import org.gridgain.testframework.junits.common.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a50fccdd/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobMasterLeaveAwareSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobMasterLeaveAwareSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobMasterLeaveAwareSelfTest.java
index 4d14c0e..412dc6e 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobMasterLeaveAwareSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobMasterLeaveAwareSelfTest.java
@@ -15,12 +15,12 @@ import org.apache.ignite.compute.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.marshaller.*;
+import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.resources.*;
 import org.gridgain.grid.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.cache.affinity.*;
 import org.gridgain.grid.kernal.managers.communication.*;
-import org.gridgain.grid.marshaller.optimized.*;
 import org.gridgain.grid.spi.*;
 import org.gridgain.grid.spi.communication.tcp.*;
 import org.gridgain.grid.spi.discovery.tcp.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a50fccdd/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobStealingSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobStealingSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobStealingSelfTest.java
index b30a1ab..46b8f5f 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobStealingSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridJobStealingSelfTest.java
@@ -14,9 +14,9 @@ import org.apache.ignite.cluster.*;
 import org.apache.ignite.compute.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.lang.*;
+import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.resources.*;
 import org.gridgain.grid.*;
-import org.gridgain.grid.marshaller.optimized.*;
 import org.gridgain.grid.spi.collision.jobstealing.*;
 import org.gridgain.grid.spi.failover.jobstealing.*;
 import org.gridgain.grid.util.typedef.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a50fccdd/modules/core/src/test/java/org/gridgain/grid/kernal/GridLifecycleAwareSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridLifecycleAwareSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridLifecycleAwareSelfTest.java
index 2452120..8e0c7e4 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridLifecycleAwareSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridLifecycleAwareSelfTest.java
@@ -12,9 +12,9 @@ package org.gridgain.grid.kernal;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.lifecycle.*;
 import org.apache.ignite.logger.java.*;
+import org.apache.ignite.marshaller.optimized.*;
 import org.gridgain.client.ssl.*;
 import org.gridgain.grid.*;
-import org.gridgain.grid.marshaller.optimized.*;
 import org.gridgain.grid.segmentation.*;
 import org.gridgain.testframework.junits.common.*;
 import org.jetbrains.annotations.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a50fccdd/modules/core/src/test/java/org/gridgain/grid/kernal/GridProjectionLocalJobMultipleArgumentsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridProjectionLocalJobMultipleArgumentsSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridProjectionLocalJobMultipleArgumentsSelfTest.java
index ea3fa3b..0018cfc 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridProjectionLocalJobMultipleArgumentsSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridProjectionLocalJobMultipleArgumentsSelfTest.java
@@ -11,8 +11,8 @@ package org.gridgain.grid.kernal;
 
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.lang.*;
+import org.apache.ignite.marshaller.optimized.*;
 import org.gridgain.grid.cache.*;
-import org.gridgain.grid.marshaller.optimized.*;
 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/a50fccdd/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskExecutionContextSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskExecutionContextSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskExecutionContextSelfTest.java
index 144bd9b..9912065 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskExecutionContextSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/GridTaskExecutionContextSelfTest.java
@@ -13,9 +13,9 @@ import org.apache.ignite.*;
 import org.apache.ignite.compute.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.lang.*;
+import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.resources.*;
 import org.gridgain.grid.*;
-import org.gridgain.grid.marshaller.optimized.*;
 import org.gridgain.grid.util.lang.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.testframework.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a50fccdd/modules/core/src/test/java/org/gridgain/grid/kernal/managers/GridManagerStopSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/managers/GridManagerStopSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/managers/GridManagerStopSelfTest.java
index 391e6cf..96ced99 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/managers/GridManagerStopSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/managers/GridManagerStopSelfTest.java
@@ -9,6 +9,7 @@
 
 package org.gridgain.grid.kernal.managers;
 
+import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.resources.*;
 import org.gridgain.grid.*;
 import org.gridgain.grid.kernal.managers.checkpoint.*;
@@ -21,7 +22,6 @@ import org.gridgain.grid.kernal.managers.failover.*;
 import org.gridgain.grid.kernal.managers.loadbalancer.*;
 import org.gridgain.grid.kernal.managers.swapspace.*;
 import org.gridgain.grid.kernal.processors.resource.*;
-import org.gridgain.grid.marshaller.optimized.*;
 import org.gridgain.grid.spi.*;
 import org.gridgain.grid.spi.checkpoint.sharedfs.*;
 import org.gridgain.grid.spi.collision.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a50fccdd/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractSelfTest.java
index 1d07cc5..bb835c9 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractSelfTest.java
@@ -11,11 +11,11 @@ package org.gridgain.grid.kernal.processors.cache;
 
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.lang.*;
+import org.apache.ignite.marshaller.optimized.*;
 import org.gridgain.grid.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.cache.store.*;
 import org.gridgain.grid.kernal.*;
-import org.gridgain.grid.marshaller.optimized.*;
 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/a50fccdd/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAffinityRoutingSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAffinityRoutingSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAffinityRoutingSelfTest.java
index c6a8a80..bcd5f55 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAffinityRoutingSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAffinityRoutingSelfTest.java
@@ -14,11 +14,11 @@ import org.apache.ignite.cluster.*;
 import org.apache.ignite.compute.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.lang.*;
+import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.resources.*;
 import org.gridgain.grid.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.cache.affinity.*;
-import org.gridgain.grid.marshaller.optimized.*;
 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/a50fccdd/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheDeploymentSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheDeploymentSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheDeploymentSelfTest.java
index e9c3a5a..ac236d9 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheDeploymentSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheDeploymentSelfTest.java
@@ -12,10 +12,10 @@ package org.gridgain.grid.kernal.processors.cache;
 import org.apache.ignite.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.configuration.*;
+import org.apache.ignite.marshaller.optimized.*;
 import org.gridgain.grid.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.cache.affinity.*;
-import org.gridgain.grid.marshaller.optimized.*;
 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/a50fccdd/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheEntryMemorySizeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheEntryMemorySizeSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheEntryMemorySizeSelfTest.java
index 490fbe6..6b52ee4 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheEntryMemorySizeSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheEntryMemorySizeSelfTest.java
@@ -11,11 +11,11 @@ package org.gridgain.grid.kernal.processors.cache;
 
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.marshaller.*;
+import org.apache.ignite.marshaller.optimized.*;
 import org.gridgain.grid.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.kernal.processors.cache.distributed.dht.*;
 import org.gridgain.grid.kernal.processors.cache.distributed.near.*;
-import org.gridgain.grid.marshaller.optimized.*;
 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/a50fccdd/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheMemoryModeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheMemoryModeSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheMemoryModeSelfTest.java
index 2fdc5dc..c812c64 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheMemoryModeSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheMemoryModeSelfTest.java
@@ -11,10 +11,10 @@ package org.gridgain.grid.kernal.processors.cache;
 
 import org.apache.ignite.*;
 import org.apache.ignite.configuration.*;
+import org.apache.ignite.marshaller.optimized.*;
 import org.gridgain.grid.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.cache.eviction.lru.*;
-import org.gridgain.grid.marshaller.optimized.*;
 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/a50fccdd/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheOffHeapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheOffHeapSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheOffHeapSelfTest.java
index 937798e..7ec0aed 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheOffHeapSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheOffHeapSelfTest.java
@@ -13,9 +13,9 @@ import org.apache.ignite.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.events.*;
 import org.apache.ignite.lang.*;
+import org.apache.ignite.marshaller.optimized.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.cache.query.*;
-import org.gridgain.grid.marshaller.optimized.*;
 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/a50fccdd/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheReferenceCleanupSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheReferenceCleanupSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheReferenceCleanupSelfTest.java
index 20631d6..50bb236 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheReferenceCleanupSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheReferenceCleanupSelfTest.java
@@ -12,8 +12,8 @@ package org.gridgain.grid.kernal.processors.cache;
 import org.apache.ignite.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.lang.*;
+import org.apache.ignite.marshaller.optimized.*;
 import org.gridgain.grid.cache.*;
-import org.gridgain.grid.marshaller.optimized.*;
 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/a50fccdd/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java
index 67a81f9..2b3b073 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java
@@ -12,10 +12,10 @@ package org.gridgain.grid.kernal.processors.cache.distributed;
 import org.apache.ignite.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.lang.*;
+import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.resources.*;
 import org.gridgain.grid.*;
 import org.gridgain.grid.cache.*;
-import org.gridgain.grid.marshaller.optimized.*;
 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/a50fccdd/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCachePreloadLifecycleAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCachePreloadLifecycleAbstractTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCachePreloadLifecycleAbstractTest.java
index e9c53a5..57567c3 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCachePreloadLifecycleAbstractTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCachePreloadLifecycleAbstractTest.java
@@ -11,9 +11,9 @@ package org.gridgain.grid.kernal.processors.cache.distributed;
 
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.lifecycle.*;
+import org.apache.ignite.marshaller.optimized.*;
 import org.gridgain.grid.*;
 import org.gridgain.grid.cache.*;
-import org.gridgain.grid.marshaller.optimized.*;
 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/a50fccdd/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCacheNearEvictionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCacheNearEvictionSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCacheNearEvictionSelfTest.java
index 43281fb..6201ca8 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCacheNearEvictionSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCacheNearEvictionSelfTest.java
@@ -11,9 +11,9 @@ package org.gridgain.grid.kernal.processors.cache.distributed.near;
 
 import org.apache.ignite.*;
 import org.apache.ignite.configuration.*;
+import org.apache.ignite.marshaller.optimized.*;
 import org.apache.ignite.resources.*;
 import org.gridgain.grid.cache.*;
-import org.gridgain.grid.marshaller.optimized.*;
 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/a50fccdd/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheSwapScanQueryAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheSwapScanQueryAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheSwapScanQueryAbstractSelfTest.java
index c0575cd..b83d848 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheSwapScanQueryAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheSwapScanQueryAbstractSelfTest.java
@@ -11,9 +11,9 @@ package org.gridgain.grid.kernal.processors.cache.query;
 
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.lang.*;
+import org.apache.ignite.marshaller.optimized.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.cache.query.*;
-import org.gridgain.grid.marshaller.optimized.*;
 import org.gridgain.grid.portables.*;
 import org.gridgain.grid.spi.discovery.tcp.*;
 import org.gridgain.grid.spi.discovery.tcp.ipfinder.*;


Mime
View raw message