ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [04/38] incubator-ignite git commit: # Renaming
Date Fri, 05 Dec 2014 08:44:31 GMT
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/apache/ignite/portables/GridPortableWriter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/portables/GridPortableWriter.java b/modules/core/src/main/java/org/apache/ignite/portables/GridPortableWriter.java
index 0e91d55..769faa0 100644
--- a/modules/core/src/main/java/org/apache/ignite/portables/GridPortableWriter.java
+++ b/modules/core/src/main/java/org/apache/ignite/portables/GridPortableWriter.java
@@ -16,7 +16,7 @@ import java.util.*;
 import java.util.Date;
 
 /**
- * Writer for portable object used in {@link GridPortableMarshalAware} implementations.
+ * Writer for portable object used in {@link PortableMarshalAware} implementations.
  * Useful for the cases when user wants a fine-grained control over serialization.
  * <p>
  * Note that GridGain never writes full strings for field or type names. Instead,
@@ -24,212 +24,212 @@ import java.util.Date;
  * It has been tested that hash code conflicts for the type names or the field names
  * within the same type are virtually non-existent and, to gain performance, it is safe
  * to work with hash codes. For the cases when hash codes for different types or fields
- * actually do collide, GridGain provides {@link GridPortableIdMapper} which
+ * actually do collide, GridGain provides {@link PortableIdMapper} which
  * allows to override the automatically generated hash code IDs for the type and field names.
  */
 public interface GridPortableWriter {
     /**
      * @param fieldName Field name.
      * @param val Value to write.
-     * @throws GridPortableException In case of error.
+     * @throws PortableException In case of error.
      */
-    public void writeByte(String fieldName, byte val) throws GridPortableException;
+    public void writeByte(String fieldName, byte val) throws PortableException;
 
     /**
      * @param fieldName Field name.
      * @param val Value to write.
-     * @throws GridPortableException In case of error.
+     * @throws PortableException In case of error.
      */
-    public void writeShort(String fieldName, short val) throws GridPortableException;
+    public void writeShort(String fieldName, short val) throws PortableException;
 
     /**
      * @param fieldName Field name.
      * @param val Value to write.
-     * @throws GridPortableException In case of error.
+     * @throws PortableException In case of error.
      */
-    public void writeInt(String fieldName, int val) throws GridPortableException;
+    public void writeInt(String fieldName, int val) throws PortableException;
 
     /**
      * @param fieldName Field name.
      * @param val Value to write.
-     * @throws GridPortableException In case of error.
+     * @throws PortableException In case of error.
      */
-    public void writeLong(String fieldName, long val) throws GridPortableException;
+    public void writeLong(String fieldName, long val) throws PortableException;
 
     /**
      * @param fieldName Field name.
      * @param val Value to write.
-     * @throws GridPortableException In case of error.
+     * @throws PortableException In case of error.
      */
-    public void writeFloat(String fieldName, float val) throws GridPortableException;
+    public void writeFloat(String fieldName, float val) throws PortableException;
 
     /**
      * @param fieldName Field name.
      * @param val Value to write.
-     * @throws GridPortableException In case of error.
+     * @throws PortableException In case of error.
      */
-    public void writeDouble(String fieldName, double val) throws GridPortableException;
+    public void writeDouble(String fieldName, double val) throws PortableException;
 
     /**
      * @param fieldName Field name.
      * @param val Value to write.
-     * @throws GridPortableException In case of error.
+     * @throws PortableException In case of error.
      */
-    public void writeChar(String fieldName, char val) throws GridPortableException;
+    public void writeChar(String fieldName, char val) throws PortableException;
 
     /**
      * @param fieldName Field name.
      * @param val Value to write.
-     * @throws GridPortableException In case of error.
+     * @throws PortableException In case of error.
      */
-    public void writeBoolean(String fieldName, boolean val) throws GridPortableException;
+    public void writeBoolean(String fieldName, boolean val) throws PortableException;
 
     /**
      * @param fieldName Field name.
      * @param val Value to write.
-     * @throws GridPortableException In case of error.
+     * @throws PortableException In case of error.
      */
-    public void writeString(String fieldName, @Nullable String val) throws GridPortableException;
+    public void writeString(String fieldName, @Nullable String val) throws PortableException;
 
     /**
      * @param fieldName Field name.
      * @param val UUID to write.
-     * @throws GridPortableException In case of error.
+     * @throws PortableException In case of error.
      */
-    public void writeUuid(String fieldName, @Nullable UUID val) throws GridPortableException;
+    public void writeUuid(String fieldName, @Nullable UUID val) throws PortableException;
 
     /**
      * @param fieldName Field name.
      * @param val Date to write.
-     * @throws GridPortableException In case of error.
+     * @throws PortableException In case of error.
      */
-    public void writeDate(String fieldName, @Nullable Date val) throws GridPortableException;
+    public void writeDate(String fieldName, @Nullable Date val) throws PortableException;
 
     /**
      * @param fieldName Field name.
      * @param val Timestamp to write.
-     * @throws GridPortableException In case of error.
+     * @throws PortableException In case of error.
      */
-    public void writeTimestamp(String fieldName, @Nullable Timestamp val) throws GridPortableException;
+    public void writeTimestamp(String fieldName, @Nullable Timestamp val) throws PortableException;
 
     /**
      * @param fieldName Field name.
      * @param obj Value to write.
-     * @throws GridPortableException In case of error.
+     * @throws PortableException In case of error.
      */
-    public void writeObject(String fieldName, @Nullable Object obj) throws GridPortableException;
+    public void writeObject(String fieldName, @Nullable Object obj) throws PortableException;
 
     /**
      * @param fieldName Field name.
      * @param val Value to write.
-     * @throws GridPortableException In case of error.
+     * @throws PortableException In case of error.
      */
-    public void writeByteArray(String fieldName, @Nullable byte[] val) throws GridPortableException;
+    public void writeByteArray(String fieldName, @Nullable byte[] val) throws PortableException;
 
     /**
      * @param fieldName Field name.
      * @param val Value to write.
-     * @throws GridPortableException In case of error.
+     * @throws PortableException In case of error.
      */
-    public void writeShortArray(String fieldName, @Nullable short[] val) throws GridPortableException;
+    public void writeShortArray(String fieldName, @Nullable short[] val) throws PortableException;
 
     /**
      * @param fieldName Field name.
      * @param val Value to write.
-     * @throws GridPortableException In case of error.
+     * @throws PortableException In case of error.
      */
-    public void writeIntArray(String fieldName, @Nullable int[] val) throws GridPortableException;
+    public void writeIntArray(String fieldName, @Nullable int[] val) throws PortableException;
 
     /**
      * @param fieldName Field name.
      * @param val Value to write.
-     * @throws GridPortableException In case of error.
+     * @throws PortableException In case of error.
      */
-    public void writeLongArray(String fieldName, @Nullable long[] val) throws GridPortableException;
+    public void writeLongArray(String fieldName, @Nullable long[] val) throws PortableException;
 
     /**
      * @param fieldName Field name.
      * @param val Value to write.
-     * @throws GridPortableException In case of error.
+     * @throws PortableException In case of error.
      */
-    public void writeFloatArray(String fieldName, @Nullable float[] val) throws GridPortableException;
+    public void writeFloatArray(String fieldName, @Nullable float[] val) throws PortableException;
 
     /**
      * @param fieldName Field name.
      * @param val Value to write.
-     * @throws GridPortableException In case of error.
+     * @throws PortableException In case of error.
      */
-    public void writeDoubleArray(String fieldName, @Nullable double[] val) throws GridPortableException;
+    public void writeDoubleArray(String fieldName, @Nullable double[] val) throws PortableException;
 
     /**
      * @param fieldName Field name.
      * @param val Value to write.
-     * @throws GridPortableException In case of error.
+     * @throws PortableException In case of error.
      */
-    public void writeCharArray(String fieldName, @Nullable char[] val) throws GridPortableException;
+    public void writeCharArray(String fieldName, @Nullable char[] val) throws PortableException;
 
     /**
      * @param fieldName Field name.
      * @param val Value to write.
-     * @throws GridPortableException In case of error.
+     * @throws PortableException In case of error.
      */
-    public void writeBooleanArray(String fieldName, @Nullable boolean[] val) throws GridPortableException;
+    public void writeBooleanArray(String fieldName, @Nullable boolean[] val) throws PortableException;
 
     /**
      * @param fieldName Field name.
      * @param val Value to write.
-     * @throws GridPortableException In case of error.
+     * @throws PortableException In case of error.
      */
-    public void writeStringArray(String fieldName, @Nullable String[] val) throws GridPortableException;
+    public void writeStringArray(String fieldName, @Nullable String[] val) throws PortableException;
 
     /**
      * @param fieldName Field name.
      * @param val Value to write.
-     * @throws GridPortableException In case of error.
+     * @throws PortableException In case of error.
      */
-    public void writeUuidArray(String fieldName, @Nullable UUID[] val) throws GridPortableException;
+    public void writeUuidArray(String fieldName, @Nullable UUID[] val) throws PortableException;
 
     /**
      * @param fieldName Field name.
      * @param val Value to write.
-     * @throws GridPortableException In case of error.
+     * @throws PortableException In case of error.
      */
-    public void writeDateArray(String fieldName, @Nullable Date[] val) throws GridPortableException;
+    public void writeDateArray(String fieldName, @Nullable Date[] val) throws PortableException;
 
     /**
      * @param fieldName Field name.
      * @param val Value to write.
-     * @throws GridPortableException In case of error.
+     * @throws PortableException In case of error.
      */
-    public void writeObjectArray(String fieldName, @Nullable Object[] val) throws GridPortableException;
+    public void writeObjectArray(String fieldName, @Nullable Object[] val) throws PortableException;
 
     /**
      * @param fieldName Field name.
      * @param col Collection to write.
-     * @throws GridPortableException In case of error.
+     * @throws PortableException In case of error.
      */
-    public <T> void writeCollection(String fieldName, @Nullable Collection<T> col) throws GridPortableException;
+    public <T> void writeCollection(String fieldName, @Nullable Collection<T> col) throws PortableException;
 
     /**
      * @param fieldName Field name.
      * @param map Map to write.
-     * @throws GridPortableException In case of error.
+     * @throws PortableException In case of error.
      */
-    public <K, V> void writeMap(String fieldName, @Nullable Map<K, V> map) throws GridPortableException;
+    public <K, V> void writeMap(String fieldName, @Nullable Map<K, V> map) throws PortableException;
 
     /**
      * @param fieldName Field name.
      * @param val Value to write.
-     * @throws GridPortableException In case of error.
+     * @throws PortableException In case of error.
      */
-    public <T extends Enum<?>> void writeEnum(String fieldName, T val) throws GridPortableException;
+    public <T extends Enum<?>> void writeEnum(String fieldName, T val) throws PortableException;
 
     /**
      * @param fieldName Field name.
      * @param val Value to write.
-     * @throws GridPortableException In case of error.
+     * @throws PortableException In case of error.
      */
-    public <T extends Enum<?>> void writeEnumArray(String fieldName, T[] val) throws GridPortableException;
+    public <T extends Enum<?>> void writeEnumArray(String fieldName, T[] val) throws PortableException;
 
     /**
      * Gets raw writer. Raw writer does not write field name hash codes, therefore,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/apache/ignite/portables/PortableBuilder.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/portables/PortableBuilder.java b/modules/core/src/main/java/org/apache/ignite/portables/PortableBuilder.java
new file mode 100644
index 0000000..e353d7b
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/portables/PortableBuilder.java
@@ -0,0 +1,129 @@
+/* @java.file.header */
+
+/*  _________        _____ __________________        _____
+ *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
+ *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
+ *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
+ *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
+ */
+
+package org.apache.ignite.portables;
+
+import org.jetbrains.annotations.*;
+
+/**
+ * Portable object builder. Provides ability to build portable objects dynamically
+ * without having class definitions.
+ * <p>
+ * Here is an example of how a portable object can be built dynamically:
+ * <pre name=code class=java>
+ * GridPortableBuilder builder = GridGain.grid().portables().builder("org.project.MyObject");
+ *
+ * builder.setField("fieldA", "A");
+ * builder.setField("fieldB", "B");
+ *
+ * GridPortableObject portableObj = builder.build();
+ * </pre>
+ *
+ * <p>
+ * Also builder can be initialized by existing portable object. This allows changing some fields without affecting
+ * other fields.
+ * <pre name=code class=java>
+ * GridPortableBuilder builder = GridGain.grid().portables().builder(person);
+ *
+ * builder.setField("name", "John");
+ *
+ * person = builder.build();
+ * </pre>
+ * </p>
+ *
+ * If you need to modify nested portable object you can get builder for nested object using
+ * {@link #getField(String)}, changes made on nested builder will affect parent object,
+ * for example:
+ *
+ * <pre name=code class=java>
+ * GridPortableBuilder personBuilder = grid.portables().createBuilder(personPortableObj);
+ * GridPortableBuilder addressBuilder = personBuilder.setField("address");
+ *
+ * addressBuilder.setField("city", "New York");
+ *
+ * personPortableObj = personBuilder.build();
+ *
+ * // Should be "New York".
+ * String city = personPortableObj.getField("address").getField("city");
+ * </pre>
+ *
+ * @see org.apache.ignite.IgnitePortables#builder(int)
+ * @see org.apache.ignite.IgnitePortables#builder(String)
+ * @see org.apache.ignite.IgnitePortables#builder(GridPortableObject)
+ */
+public interface PortableBuilder {
+    /**
+     * Returns value assigned to the specified field.
+     * If the value is a portable object instance of {@code GridPortableBuilder} will be returned,
+     * which can be modified.
+     * <p>
+     * Collections and maps returned from this method are modifiable.
+     *
+     * @param name Field name.
+     * @return Filed value.
+     */
+    public <T> T getField(String name);
+
+    /**
+     * Sets field value.
+     *
+     * @param name Field name.
+     * @param val Field value (cannot be {@code null}).
+     * @see GridPortableObject#metaData()
+     */
+    public PortableBuilder setField(String name, Object val);
+
+    /**
+     * Sets field value with value type specification.
+     * <p>
+     * Field type is needed for proper metadata update.
+     *
+     * @param name Field name.
+     * @param val Field value.
+     * @param type Field type.
+     * @see GridPortableObject#metaData()
+     */
+    public <T> PortableBuilder setField(String name, @Nullable T val, Class<? super T> type);
+
+    /**
+     * Sets field value.
+     * <p>
+     * This method should be used if field is portable object.
+     *
+     * @param name Field name.
+     * @param builder Builder for object field.
+     */
+    public PortableBuilder setField(String name, @Nullable PortableBuilder builder);
+
+    /**
+     * Removes field from this builder.
+     *
+     * @param fieldName Field name.
+     * @return {@code this} instance for chaining.
+     */
+    public PortableBuilder removeField(String fieldName);
+
+    /**
+     * Sets hash code for resulting portable object returned by {@link #build()} method.
+     * <p>
+     * If not set {@code 0} is used.
+     *
+     * @param hashCode Hash code.
+     * @return {@code this} instance for chaining.
+     */
+    public PortableBuilder hashCode(int hashCode);
+
+    /**
+     * Builds portable object.
+     *
+     * @return Portable object.
+     * @throws PortableException In case of error.
+     */
+    public GridPortableObject build() throws PortableException;
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/apache/ignite/portables/PortableConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/portables/PortableConfiguration.java b/modules/core/src/main/java/org/apache/ignite/portables/PortableConfiguration.java
new file mode 100644
index 0000000..573836e
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/portables/PortableConfiguration.java
@@ -0,0 +1,181 @@
+/* @java.file.header */
+
+/*  _________        _____ __________________        _____
+ *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
+ *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
+ *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
+ *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
+ */
+
+package org.apache.ignite.portables;
+
+import org.gridgain.grid.util.typedef.internal.*;
+
+import java.sql.Timestamp;
+import java.util.*;
+
+/**
+ * Defines configuration for GridGain portable functionality. All configuration
+ * properties defined here can be overridden on per-type level in
+ * {@link GridPortableTypeConfiguration}. Type configurations are provided via
+ * {@link #getTypeConfigurations()} method.
+ */
+public class PortableConfiguration {
+    /** Class names. */
+    private Collection<String> clsNames;
+
+    /** ID mapper. */
+    private PortableIdMapper idMapper;
+
+    /** Serializer. */
+    private GridPortableSerializer serializer;
+
+    /** Types. */
+    private Collection<GridPortableTypeConfiguration> typeCfgs;
+
+    /** Use timestamp flag. */
+    private boolean useTs = true;
+
+    /** Meta data enabled flag. */
+    private boolean metaDataEnabled = true;
+
+    /** Keep deserialized flag. */
+    private boolean keepDeserialized = true;
+
+    /**
+     * Gets class names.
+     *
+     * @return Class names.
+     */
+    public Collection<String> getClassNames() {
+        return clsNames;
+    }
+
+    /**
+     * Sets class names.
+     *
+     * @param clsNames Class names.
+     */
+    public void setClassNames(Collection<String> clsNames) {
+        this.clsNames = clsNames;
+    }
+
+    /**
+     * Gets ID mapper.
+     *
+     * @return ID mapper.
+     */
+    public PortableIdMapper getIdMapper() {
+        return idMapper;
+    }
+
+    /**
+     * Sets ID mapper.
+     *
+     * @param idMapper ID mapper.
+     */
+    public void setIdMapper(PortableIdMapper idMapper) {
+        this.idMapper = idMapper;
+    }
+
+    /**
+     * Gets serializer.
+     *
+     * @return Serializer.
+     */
+    public GridPortableSerializer getSerializer() {
+        return serializer;
+    }
+
+    /**
+     * Sets serializer.
+     *
+     * @param serializer Serializer.
+     */
+    public void setSerializer(GridPortableSerializer serializer) {
+        this.serializer = serializer;
+    }
+
+    /**
+     * Gets types configuration.
+     *
+     * @return Types configuration.
+     */
+    public Collection<GridPortableTypeConfiguration> getTypeConfigurations() {
+        return typeCfgs;
+    }
+
+    /**
+     * Sets type configurations.
+     *
+     * @param typeCfgs Type configurations.
+     */
+    public void setTypeConfigurations(Collection<GridPortableTypeConfiguration> typeCfgs) {
+        this.typeCfgs = typeCfgs;
+    }
+
+    /**
+     * If {@code true} then date values converted to {@link Timestamp} on deserialization.
+     * <p>
+     * Default value is {@code true}.
+     *
+     * @return Flag indicating whether date values converted to {@link Timestamp} during unmarshalling.
+     */
+    public boolean isUseTimestamp() {
+        return useTs;
+    }
+
+    /**
+     * @param useTs Flag indicating whether date values converted to {@link Timestamp} during unmarshalling.
+     */
+    public void setUseTimestamp(boolean useTs) {
+        this.useTs = useTs;
+    }
+
+    /**
+     * If {@code true}, meta data will be collected or all types. If you need to override this behaviour for
+     * some specific type, use {@link GridPortableTypeConfiguration#setMetaDataEnabled(Boolean)} method.
+     * <p>
+     * Default value if {@code true}.
+     *
+     * @return Whether meta data is collected.
+     */
+    public boolean isMetaDataEnabled() {
+        return metaDataEnabled;
+    }
+
+    /**
+     * @param metaDataEnabled Whether meta data is collected.
+     */
+    public void setMetaDataEnabled(boolean metaDataEnabled) {
+        this.metaDataEnabled = metaDataEnabled;
+    }
+
+    /**
+     * If {@code true}, {@link GridPortableObject} will cache deserialized instance after
+     * {@link GridPortableObject#deserialize()} is called. All consequent calls of this
+     * method on the same instance of {@link GridPortableObject} will return that cached
+     * value without actually deserializing portable object. If you need to override this
+     * behaviour for some specific type, use {@link GridPortableTypeConfiguration#setKeepDeserialized(Boolean)}
+     * method.
+     * <p>
+     * Default value if {@code true}.
+     *
+     * @return Whether deserialized value is kept.
+     */
+    public boolean isKeepDeserialized() {
+        return keepDeserialized;
+    }
+
+    /**
+     * @param keepDeserialized Whether deserialized value is kept.
+     */
+    public void setKeepDeserialized(boolean keepDeserialized) {
+        this.keepDeserialized = keepDeserialized;
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(PortableConfiguration.class, this);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/apache/ignite/portables/PortableException.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/portables/PortableException.java b/modules/core/src/main/java/org/apache/ignite/portables/PortableException.java
new file mode 100644
index 0000000..a6815c0
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/portables/PortableException.java
@@ -0,0 +1,49 @@
+/* @java.file.header */
+
+/*  _________        _____ __________________        _____
+ *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
+ *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
+ *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
+ *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
+ */
+
+package org.apache.ignite.portables;
+
+import org.gridgain.grid.*;
+import org.jetbrains.annotations.*;
+
+/**
+ * Exception indicating portable object serialization error.
+ */
+public class PortableException extends GridRuntimeException {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /**
+     * Creates portable exception with error message.
+     *
+     * @param msg Error message.
+     */
+    public PortableException(String msg) {
+        super(msg);
+    }
+
+    /**
+     * Creates portable exception with {@link Throwable} as a cause.
+     *
+     * @param cause Cause.
+     */
+    public PortableException(Throwable cause) {
+        super(cause);
+    }
+
+    /**
+     * Creates portable exception with error message and {@link Throwable} as a cause.
+     *
+     * @param msg Error message.
+     * @param cause Cause.
+     */
+    public PortableException(String msg, @Nullable Throwable cause) {
+        super(msg, cause);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/apache/ignite/portables/PortableIdMapper.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/portables/PortableIdMapper.java b/modules/core/src/main/java/org/apache/ignite/portables/PortableIdMapper.java
new file mode 100644
index 0000000..dafaca9
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/portables/PortableIdMapper.java
@@ -0,0 +1,47 @@
+/* @java.file.header */
+
+/*  _________        _____ __________________        _____
+ *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
+ *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
+ *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
+ *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
+ */
+
+package org.apache.ignite.portables;
+
+/**
+ * Type and field ID mapper for portable objects. GridGain never writes full
+ * strings for field or type names. Instead, for performance reasons, GridGain
+ * writes integer hash codes for type and field names. It has been tested that
+ * hash code conflicts for the type names or the field names
+ * within the same type are virtually non-existent and, to gain performance, it is safe
+ * to work with hash codes. For the cases when hash codes for different types or fields
+ * actually do collide {@code GridPortableIdMapper} allows to override the automatically
+ * generated hash code IDs for the type and field names.
+ * <p>
+ * Portable ID mapper can be configured for all portable objects via
+ * {@link PortableConfiguration#getIdMapper()} method, or for a specific
+ * portable type via {@link GridPortableTypeConfiguration#getIdMapper()} method.
+ */
+public interface PortableIdMapper {
+    /**
+     * Gets type ID for provided class name.
+     * <p>
+     * If {@code 0} is returned, hash code of class simple name will be used.
+     *
+     * @param clsName Class name.
+     * @return Type ID.
+     */
+    public int typeId(String clsName);
+
+    /**
+     * Gets ID for provided field.
+     * <p>
+     * If {@code 0} is returned, hash code of field name will be used.
+     *
+     * @param typeId Type ID.
+     * @param fieldName Field name.
+     * @return Field ID.
+     */
+    public int fieldId(int typeId, String fieldName);
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/apache/ignite/portables/PortableInvalidClassException.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/portables/PortableInvalidClassException.java b/modules/core/src/main/java/org/apache/ignite/portables/PortableInvalidClassException.java
new file mode 100644
index 0000000..5322fa9
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/portables/PortableInvalidClassException.java
@@ -0,0 +1,50 @@
+/* @java.file.header */
+
+/*  _________        _____ __________________        _____
+ *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
+ *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
+ *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
+ *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
+ */
+
+package org.apache.ignite.portables;
+
+import org.jetbrains.annotations.*;
+
+/**
+ * Exception indicating that class needed for deserialization of portable object does not exist.
+ * <p>
+ * Thrown from {@link GridPortableObject#deserialize()} method.
+ */
+public class PortableInvalidClassException extends PortableException {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /**
+     * Creates invalid class exception with error message.
+     *
+     * @param msg Error message.
+     */
+    public PortableInvalidClassException(String msg) {
+        super(msg);
+    }
+
+    /**
+     * Creates invalid class exception with {@link Throwable} as a cause.
+     *
+     * @param cause Cause.
+     */
+    public PortableInvalidClassException(Throwable cause) {
+        super(cause);
+    }
+
+    /**
+     * Creates invalid class exception with error message and {@link Throwable} as a cause.
+     *
+     * @param msg Error message.
+     * @param cause Cause.
+     */
+    public PortableInvalidClassException(String msg, @Nullable Throwable cause) {
+        super(msg, cause);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/apache/ignite/portables/PortableMarshalAware.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/portables/PortableMarshalAware.java b/modules/core/src/main/java/org/apache/ignite/portables/PortableMarshalAware.java
new file mode 100644
index 0000000..d0b5bcb
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/portables/PortableMarshalAware.java
@@ -0,0 +1,40 @@
+/* @java.file.header */
+
+/*  _________        _____ __________________        _____
+ *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
+ *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
+ *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
+ *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
+ */
+
+package org.apache.ignite.portables;
+
+/**
+ * Interface that allows to implement custom serialization
+ * logic for portable objects. Portable objects are not required
+ * to implement this interface, in which case GridGain will automatically
+ * serialize portable objects using reflection.
+ * <p>
+ * This interface, in a way, is analogous to {@link java.io.Externalizable}
+ * interface, which allows users to override default serialization logic,
+ * usually for performance reasons. The only difference here is that portable
+ * serialization is already very fast and implementing custom serialization
+ * logic for portables does not provide significant performance gains.
+ */
+public interface PortableMarshalAware {
+    /**
+     * Writes fields to provided writer.
+     *
+     * @param writer Portable object writer.
+     * @throws PortableException In case of error.
+     */
+    public void writePortable(GridPortableWriter writer) throws PortableException;
+
+    /**
+     * Reads fields from provided reader.
+     *
+     * @param reader Portable object reader.
+     * @throws PortableException In case of error.
+     */
+    public void readPortable(GridPortableReader reader) throws PortableException;
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/gridgain/client/GridClientConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/client/GridClientConfiguration.java b/modules/core/src/main/java/org/gridgain/client/GridClientConfiguration.java
index 9f30724..12ae587 100644
--- a/modules/core/src/main/java/org/gridgain/client/GridClientConfiguration.java
+++ b/modules/core/src/main/java/org/gridgain/client/GridClientConfiguration.java
@@ -110,7 +110,7 @@ public class GridClientConfiguration {
     private boolean daemon;
 
     /** Portable configuration. */
-    private GridPortableConfiguration portableCfg;
+    private PortableConfiguration portableCfg;
 
     /**
      * Creates default configuration.
@@ -628,7 +628,7 @@ public class GridClientConfiguration {
      *
      * @return Portable configuration.
      */
-    public GridPortableConfiguration getPortableConfiguration() {
+    public PortableConfiguration getPortableConfiguration() {
         return portableCfg;
     }
 
@@ -637,7 +637,7 @@ public class GridClientConfiguration {
      *
      * @param portableCfg Portable configuration.
      */
-    public void setPortableConfiguration(@Nullable GridPortableConfiguration portableCfg) {
+    public void setPortableConfiguration(@Nullable PortableConfiguration portableCfg) {
         this.portableCfg = portableCfg;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/gridgain/grid/dotnet/GridDotNetConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/dotnet/GridDotNetConfiguration.java b/modules/core/src/main/java/org/gridgain/grid/dotnet/GridDotNetConfiguration.java
index 0cccd46..fcc83ac 100644
--- a/modules/core/src/main/java/org/gridgain/grid/dotnet/GridDotNetConfiguration.java
+++ b/modules/core/src/main/java/org/gridgain/grid/dotnet/GridDotNetConfiguration.java
@@ -17,7 +17,7 @@ import java.util.*;
 /**
  * Mirror of .Net class GridDotNetConfiguration.cs
  */
-public class GridDotNetConfiguration implements GridPortableMarshalAware {
+public class GridDotNetConfiguration implements PortableMarshalAware {
     /** */
     private GridDotNetPortableConfiguration portableCfg;
 
@@ -73,7 +73,7 @@ public class GridDotNetConfiguration implements GridPortableMarshalAware {
     }
 
     /** {@inheritDoc} */
-    @Override public void writePortable(GridPortableWriter writer) throws GridPortableException {
+    @Override public void writePortable(GridPortableWriter writer) throws PortableException {
         GridPortableRawWriter rawWriter = writer.rawWriter();
 
         rawWriter.writeObject(portableCfg);
@@ -81,7 +81,7 @@ public class GridDotNetConfiguration implements GridPortableMarshalAware {
     }
 
     /** {@inheritDoc} */
-    @Override public void readPortable(GridPortableReader reader) throws GridPortableException {
+    @Override public void readPortable(GridPortableReader reader) throws PortableException {
         GridPortableRawReader rawReader = reader.rawReader();
 
         portableCfg = (GridDotNetPortableConfiguration)rawReader.readObject();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/gridgain/grid/dotnet/GridDotNetPortableConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/dotnet/GridDotNetPortableConfiguration.java b/modules/core/src/main/java/org/gridgain/grid/dotnet/GridDotNetPortableConfiguration.java
index f20ac76..cbe2348 100644
--- a/modules/core/src/main/java/org/gridgain/grid/dotnet/GridDotNetPortableConfiguration.java
+++ b/modules/core/src/main/java/org/gridgain/grid/dotnet/GridDotNetPortableConfiguration.java
@@ -17,7 +17,7 @@ import java.util.*;
 /**
  * Mirror of .Net class GridDotNetPortableConfiguration.cs
  */
-public class GridDotNetPortableConfiguration implements GridPortableMarshalAware {
+public class GridDotNetPortableConfiguration implements PortableMarshalAware {
     /** */
     private Collection<GridDotNetPortableTypeConfiguration> typesCfg;
 
@@ -167,7 +167,7 @@ public class GridDotNetPortableConfiguration implements GridPortableMarshalAware
     }
 
     /** {@inheritDoc} */
-    @Override public void writePortable(GridPortableWriter writer) throws GridPortableException {
+    @Override public void writePortable(GridPortableWriter writer) throws PortableException {
         GridPortableRawWriter rawWriter = writer.rawWriter();
 
         rawWriter.writeCollection(typesCfg);
@@ -186,7 +186,7 @@ public class GridDotNetPortableConfiguration implements GridPortableMarshalAware
     }
 
     /** {@inheritDoc} */
-    @Override public void readPortable(GridPortableReader reader) throws GridPortableException {
+    @Override public void readPortable(GridPortableReader reader) throws PortableException {
         GridPortableRawReader rawReader = reader.rawReader();
 
         typesCfg = rawReader.readCollection();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/gridgain/grid/dotnet/GridDotNetPortableTypeConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/dotnet/GridDotNetPortableTypeConfiguration.java b/modules/core/src/main/java/org/gridgain/grid/dotnet/GridDotNetPortableTypeConfiguration.java
index 5fbca5c..a984966 100644
--- a/modules/core/src/main/java/org/gridgain/grid/dotnet/GridDotNetPortableTypeConfiguration.java
+++ b/modules/core/src/main/java/org/gridgain/grid/dotnet/GridDotNetPortableTypeConfiguration.java
@@ -16,7 +16,7 @@ import org.jetbrains.annotations.*;
 /**
  * Mirror of .Net class GridDotNetPortableTypeConfiguration.cs
  */
-public class GridDotNetPortableTypeConfiguration implements GridPortableMarshalAware {
+public class GridDotNetPortableTypeConfiguration implements PortableMarshalAware {
     /** */
     private String assemblyName;
 
@@ -175,7 +175,7 @@ public class GridDotNetPortableTypeConfiguration implements GridPortableMarshalA
     }
 
     /** {@inheritDoc} */
-    @Override public void writePortable(GridPortableWriter writer) throws GridPortableException {
+    @Override public void writePortable(GridPortableWriter writer) throws PortableException {
         GridPortableRawWriter rawWriter = writer.rawWriter();
 
         rawWriter.writeString(assemblyName);
@@ -196,7 +196,7 @@ public class GridDotNetPortableTypeConfiguration implements GridPortableMarshalA
     }
 
     /** {@inheritDoc} */
-    @Override public void readPortable(GridPortableReader reader) throws GridPortableException {
+    @Override public void readPortable(GridPortableReader reader) throws PortableException {
         GridPortableRawReader rawReader = reader.rawReader();
 
         assemblyName = rawReader.readString();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/gridgain/grid/kernal/GridPortablesImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/GridPortablesImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/GridPortablesImpl.java
index bf1c86b..5bdf615 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/GridPortablesImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/GridPortablesImpl.java
@@ -48,7 +48,7 @@ public class GridPortablesImpl implements IgnitePortables {
     }
 
     /** {@inheritDoc} */
-    @Override public <T> T toPortable(@Nullable Object obj) throws GridPortableException {
+    @Override public <T> T toPortable(@Nullable Object obj) throws PortableException {
         guard();
 
         try {
@@ -60,7 +60,7 @@ public class GridPortablesImpl implements IgnitePortables {
     }
 
     /** {@inheritDoc} */
-    @Override public GridPortableBuilder builder(int typeId) {
+    @Override public PortableBuilder builder(int typeId) {
         guard();
 
         try {
@@ -72,7 +72,7 @@ public class GridPortablesImpl implements IgnitePortables {
     }
 
     /** {@inheritDoc} */
-    @Override public GridPortableBuilder builder(String typeName) {
+    @Override public PortableBuilder builder(String typeName) {
         guard();
 
         try {
@@ -84,7 +84,7 @@ public class GridPortablesImpl implements IgnitePortables {
     }
 
     /** {@inheritDoc} */
-    @Override public GridPortableBuilder builder(GridPortableObject portableObj) {
+    @Override public PortableBuilder builder(GridPortableObject portableObj) {
         guard();
 
         try {
@@ -96,7 +96,7 @@ public class GridPortablesImpl implements IgnitePortables {
     }
 
     /** {@inheritDoc} */
-    @Nullable @Override public GridPortableMetadata metadata(Class<?> cls) throws GridPortableException {
+    @Nullable @Override public GridPortableMetadata metadata(Class<?> cls) throws PortableException {
         guard();
 
         try {
@@ -108,7 +108,7 @@ public class GridPortablesImpl implements IgnitePortables {
     }
 
     /** {@inheritDoc} */
-    @Nullable @Override public GridPortableMetadata metadata(String typeName) throws GridPortableException {
+    @Nullable @Override public GridPortableMetadata metadata(String typeName) throws PortableException {
         guard();
 
         try {
@@ -120,7 +120,7 @@ public class GridPortablesImpl implements IgnitePortables {
     }
 
     /** {@inheritDoc} */
-    @Nullable @Override public GridPortableMetadata metadata(int typeId) throws GridPortableException {
+    @Nullable @Override public GridPortableMetadata metadata(int typeId) throws PortableException {
         guard();
 
         try {
@@ -132,7 +132,7 @@ public class GridPortablesImpl implements IgnitePortables {
     }
 
     /** {@inheritDoc} */
-    @Override public Collection<GridPortableMetadata> metadata() throws GridPortableException {
+    @Override public Collection<GridPortableMetadata> metadata() throws PortableException {
         guard();
 
         try {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/gridgain/grid/kernal/managers/indexing/GridIndexingManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/managers/indexing/GridIndexingManager.java b/modules/core/src/main/java/org/gridgain/grid/kernal/managers/indexing/GridIndexingManager.java
index c20a966..02104ee 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/managers/indexing/GridIndexingManager.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/managers/indexing/GridIndexingManager.java
@@ -1348,7 +1348,7 @@ public class GridIndexingManager extends GridManagerAdapter<GridIndexingSpi> {
             try {
                 return ((GridPortableObject)obj).field(propName);
             }
-            catch (GridPortableException e) {
+            catch (PortableException e) {
                 throw new GridSpiException(e);
             }
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/gridgain/grid/kernal/processors/affinity/GridAffinityAssignmentCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/affinity/GridAffinityAssignmentCache.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/affinity/GridAffinityAssignmentCache.java
index 214e4e3..49206d5 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/affinity/GridAffinityAssignmentCache.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/affinity/GridAffinityAssignmentCache.java
@@ -252,7 +252,7 @@ public class GridAffinityAssignmentCache {
             try {
                 key = ctx.marshalToPortable(key);
             }
-            catch (GridPortableException e) {
+            catch (PortableException e) {
                 U.error(log, "Failed to marshal key to portable: " + key, e);
             }
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheAdapter.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheAdapter.java
index 8b521dc..d10beaa 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheAdapter.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheAdapter.java
@@ -1287,7 +1287,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
             try {
                 key = (K)ctx.marshalToPortable(key);
             }
-            catch (GridPortableException e) {
+            catch (PortableException e) {
                 throw new GridRuntimeException(e);
             }
         }
@@ -3001,7 +3001,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
                     try {
                         key0 = (K)ctx.marshalToPortable(key);
                     }
-                    catch (GridPortableException e) {
+                    catch (PortableException e) {
                         return new GridFinishedFuture<>(ctx.kernalContext(), e);
                     }
                 }
@@ -3352,7 +3352,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
 
             ctx.store().loadCache(new CIX3<K, V, GridCacheVersion>() {
                 @Override public void applyx(K key, V val, @Nullable GridCacheVersion ver)
-                    throws GridPortableException {
+                    throws PortableException {
                     assert ver == null;
 
                     if (p != null && !p.apply(key, val))
@@ -4132,7 +4132,7 @@ public abstract class GridCacheAdapter<K, V> extends GridMetadataAwareAdapter im
             try {
                 key = (K)ctx.marshalToPortable(key);
             }
-            catch (GridPortableException e) {
+            catch (PortableException e) {
                 throw new GridRuntimeException(e);
             }
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheContext.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheContext.java
index c3be292..d893403 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheContext.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheContext.java
@@ -1570,9 +1570,9 @@ public class GridCacheContext<K, V> implements Externalizable {
     /**
      * @param obj Object.
      * @return Portable object.
-     * @throws org.apache.ignite.portables.GridPortableException In case of error.
+     * @throws org.apache.ignite.portables.PortableException In case of error.
      */
-    @Nullable public Object marshalToPortable(@Nullable Object obj) throws GridPortableException {
+    @Nullable public Object marshalToPortable(@Nullable Object obj) throws PortableException {
         assert portableEnabled();
 
         if (obj == null)

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheDefaultAffinityKeyMapper.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheDefaultAffinityKeyMapper.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheDefaultAffinityKeyMapper.java
index 5ec12a9..86dc530 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheDefaultAffinityKeyMapper.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheDefaultAffinityKeyMapper.java
@@ -91,7 +91,7 @@ public class GridCacheDefaultAffinityKeyMapper implements GridCacheAffinityKeyMa
                         return po.field(affKeyFieldName);
                 }
             }
-            catch (GridPortableException e) {
+            catch (PortableException e) {
                 U.error(log, "Failed to get affinity field from portable object: " + key, e);
             }
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxLocalAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxLocalAdapter.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxLocalAdapter.java
index d8b74b4..9e4ff88 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxLocalAdapter.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/GridCacheTxLocalAdapter.java
@@ -2171,7 +2171,7 @@ public abstract class GridCacheTxLocalAdapter<K, V> extends GridCacheTxAdapter<K
                         map0.put(key, val);
                     }
                 }
-                catch (GridPortableException e) {
+                catch (PortableException e) {
                     return new GridFinishedFuture<>(cctx.kernalContext(), e);
                 }
             }
@@ -2188,7 +2188,7 @@ public abstract class GridCacheTxLocalAdapter<K, V> extends GridCacheTxAdapter<K
                         transformMap0.put(key, e.getValue());
                     }
                 }
-                catch (GridPortableException e) {
+                catch (PortableException e) {
                     return new GridFinishedFuture<>(cctx.kernalContext(), e);
                 }
             }
@@ -2375,7 +2375,7 @@ public abstract class GridCacheTxLocalAdapter<K, V> extends GridCacheTxAdapter<K
                 else
                     keys0 = null;
             }
-            catch (GridPortableException e) {
+            catch (PortableException e) {
                 return new GridFinishedFuture<>(cctx.kernalContext(), e);
             }
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/affinity/GridCacheAffinityImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/affinity/GridCacheAffinityImpl.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/affinity/GridCacheAffinityImpl.java
index 2f6988a..db4a771 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/affinity/GridCacheAffinityImpl.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/affinity/GridCacheAffinityImpl.java
@@ -144,7 +144,7 @@ public class GridCacheAffinityImpl<K, V> implements GridCacheAffinity<K> {
             try {
                 key = (K)cctx.marshalToPortable(key);
             }
-            catch (GridPortableException e) {
+            catch (PortableException e) {
                 U.error(log, "Failed to marshal key to portable: " + key, e);
             }
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/gridgain/grid/kernal/processors/portable/GridPortableProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/portable/GridPortableProcessor.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/portable/GridPortableProcessor.java
index af9045f..51cfe01 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/portable/GridPortableProcessor.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/portable/GridPortableProcessor.java
@@ -31,41 +31,41 @@ public interface GridPortableProcessor extends GridProcessor {
      * @param obj Object to marshal.
      * @param trim If {@code true} trims result byte buffer.
      * @return Object bytes.
-     * @throws GridPortableException In case of error.
+     * @throws org.apache.ignite.portables.PortableException In case of error.
      */
-    public ByteBuffer marshal(@Nullable Object obj, boolean trim) throws GridPortableException;
+    public ByteBuffer marshal(@Nullable Object obj, boolean trim) throws PortableException;
 
     /**
      * @param arr Byte array.
      * @param off Offset.
      * @return Unmarshalled object.
-     * @throws GridPortableException In case of error.
+     * @throws org.apache.ignite.portables.PortableException In case of error.
      */
-    public Object unmarshal(byte[] arr, int off) throws GridPortableException;
+    public Object unmarshal(byte[] arr, int off) throws PortableException;
 
     /**
      * @param ptr Offheap pointer.
      * @param forceHeap If {@code true} creates heap-based object.
      * @return Unmarshalled object.
-     * @throws GridPortableException In case of error.
+     * @throws org.apache.ignite.portables.PortableException In case of error.
      */
-    public Object unmarshal(long ptr, boolean forceHeap) throws GridPortableException;
+    public Object unmarshal(long ptr, boolean forceHeap) throws PortableException;
 
     /**
      * Converts temporary offheap object to heap-based.
      *
      * @param obj Object.
      * @return Heap-based object.
-     * @throws GridPortableException In case of error.
+     * @throws org.apache.ignite.portables.PortableException In case of error.
      */
-    @Nullable public Object unwrapTemporary(@Nullable Object obj) throws GridPortableException;
+    @Nullable public Object unwrapTemporary(@Nullable Object obj) throws PortableException;
 
     /**
      * @param obj Object to marshal.
      * @return Portable object.
-     * @throws GridPortableException In case of error.
+     * @throws org.apache.ignite.portables.PortableException In case of error.
      */
-    public Object marshalToPortable(@Nullable Object obj) throws GridPortableException;
+    public Object marshalToPortable(@Nullable Object obj) throws PortableException;
 
     /**
      * @param obj Object (portable or not).
@@ -88,12 +88,12 @@ public interface GridPortableProcessor extends GridProcessor {
     /**
      * @return Builder.
      */
-    public GridPortableBuilder builder(int typeId);
+    public PortableBuilder builder(int typeId);
 
     /**
      * @return Builder.
      */
-    public GridPortableBuilder builder(String clsName);
+    public PortableBuilder builder(String clsName);
 
     /**
      * Creates builder initialized by existing portable object.
@@ -101,42 +101,42 @@ public interface GridPortableProcessor extends GridProcessor {
      * @param portableObj Portable object to edit.
      * @return Portable builder.
      */
-    public GridPortableBuilder builder(GridPortableObject portableObj);
+    public PortableBuilder builder(GridPortableObject portableObj);
 
     /**
      * @param typeId Type ID.
      * @param newMeta New meta data.
-     * @throws GridPortableException In case of error.
+     * @throws org.apache.ignite.portables.PortableException In case of error.
      */
-    public void addMeta(int typeId, final GridPortableMetadata newMeta) throws GridPortableException;
+    public void addMeta(int typeId, final GridPortableMetadata newMeta) throws PortableException;
 
     /**
      * @param typeId Type ID.
      * @param typeName Type name.
      * @param affKeyFieldName Affinity key field name.
      * @param fieldTypeIds Fields map.
-     * @throws GridPortableException In case of error.
+     * @throws org.apache.ignite.portables.PortableException In case of error.
      */
     public void updateMetaData(int typeId, String typeName, @Nullable String affKeyFieldName,
-        Map<String, Integer> fieldTypeIds) throws GridPortableException;
+        Map<String, Integer> fieldTypeIds) throws PortableException;
 
     /**
      * @param typeId Type ID.
      * @return Meta data.
-     * @throws GridPortableException In case of error.
+     * @throws org.apache.ignite.portables.PortableException In case of error.
      */
-    @Nullable public GridPortableMetadata metadata(int typeId) throws GridPortableException;
+    @Nullable public GridPortableMetadata metadata(int typeId) throws PortableException;
 
     /**
      * @param typeIds Type ID.
      * @return Meta data.
-     * @throws GridPortableException In case of error.
+     * @throws org.apache.ignite.portables.PortableException In case of error.
      */
-    public Map<Integer, GridPortableMetadata> metadata(Collection<Integer> typeIds) throws GridPortableException;
+    public Map<Integer, GridPortableMetadata> metadata(Collection<Integer> typeIds) throws PortableException;
 
     /**
      * @return Metadata for all types.
-     * @throws GridPortableException In case of error.
+     * @throws org.apache.ignite.portables.PortableException In case of error.
      */
-    public Collection<GridPortableMetadata> metadata() throws GridPortableException;
+    public Collection<GridPortableMetadata> metadata() throws PortableException;
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/gridgain/grid/kernal/processors/portable/os/GridOsPortableProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/portable/os/GridOsPortableProcessor.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/portable/os/GridOsPortableProcessor.java
index 3587b73..0f2f951 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/portable/os/GridOsPortableProcessor.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/portable/os/GridOsPortableProcessor.java
@@ -36,27 +36,27 @@ public class GridOsPortableProcessor extends GridProcessorAdapter implements Gri
     }
 
     /** {@inheritDoc} */
-    @Override public ByteBuffer marshal(@Nullable Object obj, boolean trim) throws GridPortableException {
+    @Override public ByteBuffer marshal(@Nullable Object obj, boolean trim) throws PortableException {
         return null;
     }
 
     /** {@inheritDoc} */
-    @Nullable @Override public Object unmarshal(byte[] arr, int off) throws GridPortableException {
+    @Nullable @Override public Object unmarshal(byte[] arr, int off) throws PortableException {
         return null;
     }
 
     /** {@inheritDoc} */
-    @Override public Object unmarshal(long ptr, boolean forceHeap) throws GridPortableException {
+    @Override public Object unmarshal(long ptr, boolean forceHeap) throws PortableException {
         return null;
     }
 
     /** {@inheritDoc} */
-    @Override public Object unwrapTemporary(Object obj) throws GridPortableException {
+    @Override public Object unwrapTemporary(Object obj) throws PortableException {
         return null;
     }
 
     /** {@inheritDoc} */
-    @Nullable @Override public Object marshalToPortable(@Nullable Object obj) throws GridPortableException {
+    @Nullable @Override public Object marshalToPortable(@Nullable Object obj) throws PortableException {
         return obj;
     }
 
@@ -76,28 +76,28 @@ public class GridOsPortableProcessor extends GridProcessorAdapter implements Gri
     }
 
     /** {@inheritDoc} */
-    @Override public GridPortableBuilder builder(int typeId) {
+    @Override public PortableBuilder builder(int typeId) {
         return null;
     }
 
     /** {@inheritDoc} */
-    @Override public GridPortableBuilder builder(String clsName) {
+    @Override public PortableBuilder builder(String clsName) {
         return null;
     }
 
     /** {@inheritDoc} */
-    @Override public GridPortableBuilder builder(GridPortableObject portableObj) {
+    @Override public PortableBuilder builder(GridPortableObject portableObj) {
         return null;
     }
 
     /** {@inheritDoc} */
-    @Override public void addMeta(int typeId, GridPortableMetadata newMeta) throws GridPortableException {
+    @Override public void addMeta(int typeId, GridPortableMetadata newMeta) throws PortableException {
         // No-op.
     }
 
     /** {@inheritDoc} */
     @Override public void updateMetaData(int typeId, String typeName, String affKeyFieldName,
-        Map<String, Integer> fieldTypeIds) throws GridPortableException {
+        Map<String, Integer> fieldTypeIds) throws PortableException {
         // No-op.
     }
 
@@ -112,7 +112,7 @@ public class GridOsPortableProcessor extends GridProcessorAdapter implements Gri
     }
 
     /** {@inheritDoc} */
-    @Override public Collection<GridPortableMetadata> metadata() throws GridPortableException {
+    @Override public Collection<GridPortableMetadata> metadata() throws PortableException {
         return Collections.emptyList();
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientAbstractMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientAbstractMessage.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientAbstractMessage.java
index f47832a..35316dc 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientAbstractMessage.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientAbstractMessage.java
@@ -17,7 +17,7 @@ import java.util.*;
 /**
  * This class provides implementation for commit message fields and cannot be used directly.
  */
-public abstract class GridClientAbstractMessage implements GridClientMessage, Externalizable, GridPortableMarshalAware {
+public abstract class GridClientAbstractMessage implements GridClientMessage, Externalizable, PortableMarshalAware {
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -88,14 +88,14 @@ public abstract class GridClientAbstractMessage implements GridClientMessage, Ex
     }
 
     /** {@inheritDoc} */
-    @Override public void writePortable(GridPortableWriter writer) throws GridPortableException {
+    @Override public void writePortable(GridPortableWriter writer) throws PortableException {
         GridPortableRawWriter raw = writer.rawWriter();
 
         raw.writeByteArray(sesTok);
     }
 
     /** {@inheritDoc} */
-    @Override public void readPortable(GridPortableReader reader) throws GridPortableException {
+    @Override public void readPortable(GridPortableReader reader) throws PortableException {
         GridPortableRawReader raw = reader.rawReader();
 
         sesTok = raw.readByteArray();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientAuthenticationRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientAuthenticationRequest.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientAuthenticationRequest.java
index 44fc512..d388b53 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientAuthenticationRequest.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientAuthenticationRequest.java
@@ -53,7 +53,7 @@ public class GridClientAuthenticationRequest extends GridClientAbstractMessage {
     }
 
     /** {@inheritDoc} */
-    @Override public void writePortable(GridPortableWriter writer) throws GridPortableException {
+    @Override public void writePortable(GridPortableWriter writer) throws PortableException {
         super.writePortable(writer);
 
         GridPortableRawWriter raw = writer.rawWriter();
@@ -62,7 +62,7 @@ public class GridClientAuthenticationRequest extends GridClientAbstractMessage {
     }
 
     /** {@inheritDoc} */
-    @Override public void readPortable(GridPortableReader reader) throws GridPortableException {
+    @Override public void readPortable(GridPortableReader reader) throws PortableException {
         super.readPortable(reader);
 
         GridPortableRawReader raw = reader.rawReader();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientCacheQueryRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientCacheQueryRequest.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientCacheQueryRequest.java
index 9a7034a..e05a92c 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientCacheQueryRequest.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientCacheQueryRequest.java
@@ -316,7 +316,7 @@ public class GridClientCacheQueryRequest extends GridClientAbstractMessage {
     }
 
     /** {@inheritDoc} */
-    @Override public void readPortable(GridPortableReader reader) throws GridPortableException {
+    @Override public void readPortable(GridPortableReader reader) throws PortableException {
         super.readPortable(reader);
 
         GridPortableRawReader rawReader = reader.rawReader();
@@ -338,7 +338,7 @@ public class GridClientCacheQueryRequest extends GridClientAbstractMessage {
     }
 
     /** {@inheritDoc} */
-    @Override public void writePortable(GridPortableWriter writer) throws GridPortableException {
+    @Override public void writePortable(GridPortableWriter writer) throws PortableException {
         super.writePortable(writer);
 
         GridPortableRawWriter rawWriter = writer.rawWriter();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientCacheRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientCacheRequest.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientCacheRequest.java
index e564e8b..c2c2e83 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientCacheRequest.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientCacheRequest.java
@@ -221,7 +221,7 @@ public class GridClientCacheRequest extends GridClientAbstractMessage {
     }
 
     /** {@inheritDoc} */
-    @Override public void writePortable(GridPortableWriter writer) throws GridPortableException {
+    @Override public void writePortable(GridPortableWriter writer) throws PortableException {
         super.writePortable(writer);
 
         GridPortableRawWriterEx raw = (GridPortableRawWriterEx)writer.rawWriter();
@@ -244,7 +244,7 @@ public class GridClientCacheRequest extends GridClientAbstractMessage {
     }
 
     /** {@inheritDoc} */
-    @Override public void readPortable(GridPortableReader reader) throws GridPortableException {
+    @Override public void readPortable(GridPortableReader reader) throws PortableException {
         super.readPortable(reader);
 
         GridPortableRawReaderEx raw = (GridPortableRawReaderEx)reader.rawReader();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientGetMetaDataRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientGetMetaDataRequest.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientGetMetaDataRequest.java
index 802d46e..6fd6da0 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientGetMetaDataRequest.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientGetMetaDataRequest.java
@@ -32,7 +32,7 @@ public class GridClientGetMetaDataRequest extends GridClientAbstractMessage {
     }
 
     /** {@inheritDoc} */
-    @Override public void writePortable(GridPortableWriter writer) throws GridPortableException {
+    @Override public void writePortable(GridPortableWriter writer) throws PortableException {
         super.writePortable(writer);
 
         GridPortableRawWriter raw = writer.rawWriter();
@@ -41,7 +41,7 @@ public class GridClientGetMetaDataRequest extends GridClientAbstractMessage {
     }
 
     /** {@inheritDoc} */
-    @Override public void readPortable(GridPortableReader reader) throws GridPortableException {
+    @Override public void readPortable(GridPortableReader reader) throws PortableException {
         super.readPortable(reader);
 
         GridPortableRawReader raw = reader.rawReader();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientLogRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientLogRequest.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientLogRequest.java
index 3a5bef7..01de166 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientLogRequest.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientLogRequest.java
@@ -73,7 +73,7 @@ public class GridClientLogRequest extends GridClientAbstractMessage {
     }
 
     /** {@inheritDoc} */
-    @Override public void writePortable(GridPortableWriter writer) throws GridPortableException {
+    @Override public void writePortable(GridPortableWriter writer) throws PortableException {
         super.writePortable(writer);
 
         GridPortableRawWriter raw = writer.rawWriter();
@@ -84,7 +84,7 @@ public class GridClientLogRequest extends GridClientAbstractMessage {
     }
 
     /** {@inheritDoc} */
-    @Override public void readPortable(GridPortableReader reader) throws GridPortableException {
+    @Override public void readPortable(GridPortableReader reader) throws PortableException {
         super.readPortable(reader);
 
         GridPortableRawReader raw = reader.rawReader();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientMetaDataResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientMetaDataResponse.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientMetaDataResponse.java
index 25f6c8a..2cb89ce 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientMetaDataResponse.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientMetaDataResponse.java
@@ -17,7 +17,7 @@ import java.util.*;
 /**
  * Metadata response.
  */
-public class GridClientMetaDataResponse implements GridPortableMarshalAware {
+public class GridClientMetaDataResponse implements PortableMarshalAware {
     /** */
     private Map<Integer, GridPortableMetadata> meta;
 
@@ -29,14 +29,14 @@ public class GridClientMetaDataResponse implements GridPortableMarshalAware {
     }
 
     /** {@inheritDoc} */
-    @Override public void writePortable(GridPortableWriter writer) throws GridPortableException {
+    @Override public void writePortable(GridPortableWriter writer) throws PortableException {
         GridPortableRawWriter raw = writer.rawWriter();
 
         raw.writeMap(meta);
     }
 
     /** {@inheritDoc} */
-    @Override public void readPortable(GridPortableReader reader) throws GridPortableException {
+    @Override public void readPortable(GridPortableReader reader) throws PortableException {
         GridPortableRawReader raw = reader.rawReader();
 
         meta = raw.readMap();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientNodeBean.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientNodeBean.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientNodeBean.java
index 7c99074..74fcb6e 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientNodeBean.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientNodeBean.java
@@ -18,7 +18,7 @@ import java.util.*;
 /**
  * Node bean.
  */
-public class GridClientNodeBean implements Externalizable, GridPortableMarshalAware {
+public class GridClientNodeBean implements Externalizable, PortableMarshalAware {
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -247,7 +247,7 @@ public class GridClientNodeBean implements Externalizable, GridPortableMarshalAw
     }
 
     /** {@inheritDoc} */
-    @Override public void writePortable(GridPortableWriter writer) throws GridPortableException {
+    @Override public void writePortable(GridPortableWriter writer) throws PortableException {
         GridPortableRawWriter raw = writer.rawWriter();
 
         raw.writeInt(tcpPort);
@@ -263,7 +263,7 @@ public class GridClientNodeBean implements Externalizable, GridPortableMarshalAw
     }
 
     /** {@inheritDoc} */
-    @Override public void readPortable(GridPortableReader reader) throws GridPortableException {
+    @Override public void readPortable(GridPortableReader reader) throws PortableException {
         GridPortableRawReader raw = reader.rawReader();
 
         tcpPort = raw.readInt();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientNodeMetricsBean.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientNodeMetricsBean.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientNodeMetricsBean.java
index 0c9fdcf..1be72ef 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientNodeMetricsBean.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientNodeMetricsBean.java
@@ -16,7 +16,7 @@ import java.io.*;
 /**
  * Node metrics bean.
  */
-public class GridClientNodeMetricsBean implements Externalizable, GridPortableMarshalAware {
+public class GridClientNodeMetricsBean implements Externalizable, PortableMarshalAware {
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -1341,7 +1341,7 @@ public class GridClientNodeMetricsBean implements Externalizable, GridPortableMa
     }
 
     /** {@inheritDoc} */
-    @Override public void writePortable(GridPortableWriter writer) throws GridPortableException {
+    @Override public void writePortable(GridPortableWriter writer) throws PortableException {
         GridPortableRawWriter raw = writer.rawWriter();
 
         raw.writeLong(lastUpdateTime);
@@ -1399,7 +1399,7 @@ public class GridClientNodeMetricsBean implements Externalizable, GridPortableMa
     }
 
     /** {@inheritDoc} */
-    @Override public void readPortable(GridPortableReader reader) throws GridPortableException {
+    @Override public void readPortable(GridPortableReader reader) throws PortableException {
         GridPortableRawReader raw = reader.rawReader();
 
         lastUpdateTime = raw.readLong();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientPortableMetaData.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientPortableMetaData.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientPortableMetaData.java
index 4b2c34b..a256051 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientPortableMetaData.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientPortableMetaData.java
@@ -17,7 +17,7 @@ import java.util.*;
 /**
  * Portable meta data sent from client.
  */
-public class GridClientPortableMetaData implements GridPortableMarshalAware {
+public class GridClientPortableMetaData implements PortableMarshalAware {
     /** */
     private int typeId;
 
@@ -59,7 +59,7 @@ public class GridClientPortableMetaData implements GridPortableMarshalAware {
     }
 
     /** {@inheritDoc} */
-    @Override public void writePortable(GridPortableWriter writer) throws GridPortableException {
+    @Override public void writePortable(GridPortableWriter writer) throws PortableException {
         GridPortableRawWriter raw = writer.rawWriter();
 
         raw.writeInt(typeId);
@@ -69,7 +69,7 @@ public class GridClientPortableMetaData implements GridPortableMarshalAware {
     }
 
     /** {@inheritDoc} */
-    @Override public void readPortable(GridPortableReader reader) throws GridPortableException {
+    @Override public void readPortable(GridPortableReader reader) throws PortableException {
         GridPortableRawReader raw = reader.rawReader();
 
         typeId = raw.readInt();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientPutMetaDataRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientPutMetaDataRequest.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientPutMetaDataRequest.java
index 47557cc..3699913 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientPutMetaDataRequest.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientPutMetaDataRequest.java
@@ -32,7 +32,7 @@ public class GridClientPutMetaDataRequest extends GridClientAbstractMessage {
     }
 
     /** {@inheritDoc} */
-    @Override public void writePortable(GridPortableWriter writer) throws GridPortableException {
+    @Override public void writePortable(GridPortableWriter writer) throws PortableException {
         super.writePortable(writer);
 
         GridPortableRawWriter raw = writer.rawWriter();
@@ -41,7 +41,7 @@ public class GridClientPutMetaDataRequest extends GridClientAbstractMessage {
     }
 
     /** {@inheritDoc} */
-    @Override public void readPortable(GridPortableReader reader) throws GridPortableException {
+    @Override public void readPortable(GridPortableReader reader) throws PortableException {
         super.readPortable(reader);
 
         GridPortableRawReader raw = reader.rawReader();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientResponse.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientResponse.java
index f9d9999..6bc1db9 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientResponse.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientResponse.java
@@ -85,7 +85,7 @@ public class GridClientResponse extends GridClientAbstractMessage {
     }
 
     /** {@inheritDoc} */
-    @Override public void writePortable(GridPortableWriter writer) throws GridPortableException {
+    @Override public void writePortable(GridPortableWriter writer) throws PortableException {
         super.writePortable(writer);
 
         GridPortableRawWriter raw = writer.rawWriter();
@@ -96,7 +96,7 @@ public class GridClientResponse extends GridClientAbstractMessage {
     }
 
     /** {@inheritDoc} */
-    @Override public void readPortable(GridPortableReader reader) throws GridPortableException {
+    @Override public void readPortable(GridPortableReader reader) throws PortableException {
         super.readPortable(reader);
 
         GridPortableRawReader raw = reader.rawReader();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientTaskRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientTaskRequest.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientTaskRequest.java
index acc6b92..e8d452e 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientTaskRequest.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientTaskRequest.java
@@ -94,7 +94,7 @@ public class GridClientTaskRequest extends GridClientAbstractMessage {
     }
 
     /** {@inheritDoc} */
-    @Override public void writePortable(GridPortableWriter writer) throws GridPortableException {
+    @Override public void writePortable(GridPortableWriter writer) throws PortableException {
         super.writePortable(writer);
 
         GridPortableRawWriterEx raw = (GridPortableRawWriterEx)writer.rawWriter();
@@ -109,7 +109,7 @@ public class GridClientTaskRequest extends GridClientAbstractMessage {
     }
 
     /** {@inheritDoc} */
-    @Override public void readPortable(GridPortableReader reader) throws GridPortableException {
+    @Override public void readPortable(GridPortableReader reader) throws PortableException {
         super.readPortable(reader);
 
         GridPortableRawReaderEx raw = (GridPortableRawReaderEx)reader.rawReader();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientTaskResultBean.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientTaskResultBean.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientTaskResultBean.java
index 0079ad1..666a0dc 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientTaskResultBean.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientTaskResultBean.java
@@ -18,7 +18,7 @@ import java.io.*;
 /**
  * Task result.
  */
-public class GridClientTaskResultBean implements Externalizable, GridPortableMarshalAware {
+public class GridClientTaskResultBean implements Externalizable, PortableMarshalAware {
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -92,7 +92,7 @@ public class GridClientTaskResultBean implements Externalizable, GridPortableMar
     }
 
     /** {@inheritDoc} */
-    @Override public void writePortable(GridPortableWriter writer) throws GridPortableException {
+    @Override public void writePortable(GridPortableWriter writer) throws PortableException {
         GridPortableRawWriterEx raw = (GridPortableRawWriterEx)writer.rawWriter();
 
         raw.writeString(id);
@@ -104,7 +104,7 @@ public class GridClientTaskResultBean implements Externalizable, GridPortableMar
     }
 
     /** {@inheritDoc} */
-    @Override public void readPortable(GridPortableReader reader) throws GridPortableException {
+    @Override public void readPortable(GridPortableReader reader) throws PortableException {
         GridPortableRawReaderEx raw = (GridPortableRawReaderEx)reader.rawReader();
 
         id = raw.readString();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientTopologyRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientTopologyRequest.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientTopologyRequest.java
index 8ebb677..761bcbd 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientTopologyRequest.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientTopologyRequest.java
@@ -111,7 +111,7 @@ public class GridClientTopologyRequest extends GridClientAbstractMessage {
     }
 
     /** {@inheritDoc} */
-    @Override public void writePortable(GridPortableWriter writer) throws GridPortableException {
+    @Override public void writePortable(GridPortableWriter writer) throws PortableException {
         super.writePortable(writer);
 
         GridPortableRawWriter raw = writer.rawWriter();
@@ -123,7 +123,7 @@ public class GridClientTopologyRequest extends GridClientAbstractMessage {
     }
 
     /** {@inheritDoc} */
-    @Override public void readPortable(GridPortableReader reader) throws GridPortableException {
+    @Override public void readPortable(GridPortableReader reader) throws PortableException {
         super.readPortable(reader);
 
         GridPortableRawReader raw = reader.rawReader();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a228c7d6/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/cache/GridCacheClientQueryResult.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/cache/GridCacheClientQueryResult.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/cache/GridCacheClientQueryResult.java
index dddb1a5..1200d97 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/cache/GridCacheClientQueryResult.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/cache/GridCacheClientQueryResult.java
@@ -17,7 +17,7 @@ import java.util.*;
 /**
  * Client query result.
  */
-public class GridCacheClientQueryResult implements GridPortableMarshalAware, Serializable {
+public class GridCacheClientQueryResult implements PortableMarshalAware, Serializable {
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -90,7 +90,7 @@ public class GridCacheClientQueryResult implements GridPortableMarshalAware, Ser
     }
 
     /** {@inheritDoc} */
-    @Override public void writePortable(GridPortableWriter writer) throws GridPortableException {
+    @Override public void writePortable(GridPortableWriter writer) throws PortableException {
         GridPortableRawWriter rawWriter = writer.rawWriter();
 
         rawWriter.writeBoolean(last);
@@ -100,7 +100,7 @@ public class GridCacheClientQueryResult implements GridPortableMarshalAware, Ser
     }
 
     /** {@inheritDoc} */
-    @Override public void readPortable(GridPortableReader reader) throws GridPortableException {
+    @Override public void readPortable(GridPortableReader reader) throws PortableException {
         GridPortableRawReader rawReader = reader.rawReader();
 
         last = rawReader.readBoolean();


Mime
View raw message