http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e04165bb/modules/core/src/main/java/org/gridgain/grid/portables/GridPortableRawReader.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/portables/GridPortableRawReader.java b/modules/core/src/main/java/org/gridgain/grid/portables/GridPortableRawReader.java deleted file mode 100644 index 407efa9..0000000 --- a/modules/core/src/main/java/org/gridgain/grid/portables/GridPortableRawReader.java +++ /dev/null @@ -1,214 +0,0 @@ -/* @java.file.header */ - -/* _________ _____ __________________ _____ - * __ ____/___________(_)______ /__ ____/______ ____(_)_______ - * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \ - * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / / - * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/ - */ - -package org.gridgain.grid.portables; - -import org.jetbrains.annotations.*; - -import java.sql.*; -import java.util.*; -import java.util.Date; - -/** - * Raw reader for portable objects. Raw reader does not use field name hash codes, therefore, - * making the format even more compact. However, if the raw reader is used, - * dynamic structure changes to the portable objects are not supported. - */ -public interface GridPortableRawReader { - /** - * @return Byte value. - * @throws GridPortableException In case of error. - */ - public byte readByte() throws GridPortableException; - - /** - * @return Short value. - * @throws GridPortableException In case of error. - */ - public short readShort() throws GridPortableException; - - /** - * @return Integer value. - * @throws GridPortableException In case of error. - */ - public int readInt() throws GridPortableException; - - /** - * @return Long value. - * @throws GridPortableException In case of error. - */ - public long readLong() throws GridPortableException; - - /** - * @return Float value. - * @throws GridPortableException In case of error. - */ - public float readFloat() throws GridPortableException; - - /** - * @return Double value. - * @throws GridPortableException In case of error. - */ - public double readDouble() throws GridPortableException; - - /** - * @return Char value. - * @throws GridPortableException In case of error. - */ - public char readChar() throws GridPortableException; - - /** - * @return Boolean value. - * @throws GridPortableException In case of error. - */ - public boolean readBoolean() throws GridPortableException; - - /** - * @return String value. - * @throws GridPortableException In case of error. - */ - @Nullable public String readString() throws GridPortableException; - - /** - * @return UUID. - * @throws GridPortableException In case of error. - */ - @Nullable public UUID readUuid() throws GridPortableException; - - /** - * @return Date. - * @throws GridPortableException In case of error. - */ - @Nullable public Date readDate() throws GridPortableException; - - /** - * @return Timestamp. - * @throws GridPortableException In case of error. - */ - @Nullable public Timestamp readTimestamp() throws GridPortableException; - - /** - * @return Object. - * @throws GridPortableException In case of error. - */ - @Nullable public Object readObject() throws GridPortableException; - - /** - * @return Byte array. - * @throws GridPortableException In case of error. - */ - @Nullable public byte[] readByteArray() throws GridPortableException; - - /** - * @return Short array. - * @throws GridPortableException In case of error. - */ - @Nullable public short[] readShortArray() throws GridPortableException; - - /** - * @return Integer array. - * @throws GridPortableException In case of error. - */ - @Nullable public int[] readIntArray() throws GridPortableException; - - /** - * @return Long array. - * @throws GridPortableException In case of error. - */ - @Nullable public long[] readLongArray() throws GridPortableException; - - /** - * @return Float array. - * @throws GridPortableException In case of error. - */ - @Nullable public float[] readFloatArray() throws GridPortableException; - - /** - * @return Byte array. - * @throws GridPortableException In case of error. - */ - @Nullable public double[] readDoubleArray() throws GridPortableException; - - /** - * @return Char array. - * @throws GridPortableException In case of error. - */ - @Nullable public char[] readCharArray() throws GridPortableException; - - /** - * @return Boolean array. - * @throws GridPortableException In case of error. - */ - @Nullable public boolean[] readBooleanArray() throws GridPortableException; - - /** - * @return String array. - * @throws GridPortableException In case of error. - */ - @Nullable public String[] readStringArray() throws GridPortableException; - - /** - * @return UUID array. - * @throws GridPortableException In case of error. - */ - @Nullable public UUID[] readUuidArray() throws GridPortableException; - - /** - * @return Date array. - * @throws GridPortableException In case of error. - */ - @Nullable public Date[] readDateArray() throws GridPortableException; - - /** - * @return Object array. - * @throws GridPortableException In case of error. - */ - @Nullable public Object[] readObjectArray() throws GridPortableException; - - /** - * @return Collection. - * @throws GridPortableException In case of error. - */ - @Nullable public <T> Collection<T> readCollection() throws GridPortableException; - - /** - * @param colCls Collection class. - * @return Collection. - * @throws GridPortableException In case of error. - */ - @Nullable public <T> Collection<T> readCollection(Class<? extends Collection<T>> colCls) - throws GridPortableException; - - /** - * @return Map. - * @throws GridPortableException In case of error. - */ - @Nullable public <K, V> Map<K, V> readMap() throws GridPortableException; - - /** - * @param mapCls Map class. - * @return Map. - * @throws GridPortableException In case of error. - */ - @Nullable public <K, V> Map<K, V> readMap(Class<? extends Map<K, V>> mapCls) throws GridPortableException; - - /** - * @param enumCls Enum class. - * @return Value. - * @throws GridPortableException In case of error. - */ - @Nullable public <T extends Enum<?>> T readEnum(Class<T> enumCls) throws GridPortableException; - - /** - * @param enumCls Enum class. - * @return Value. - * @throws GridPortableException In case of error. - */ - @Nullable public <T extends Enum<?>> T[] readEnumArray(Class<T> enumCls) throws GridPortableException; -}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e04165bb/modules/core/src/main/java/org/gridgain/grid/portables/GridPortableRawWriter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/portables/GridPortableRawWriter.java b/modules/core/src/main/java/org/gridgain/grid/portables/GridPortableRawWriter.java deleted file mode 100644 index c3840a9..0000000 --- a/modules/core/src/main/java/org/gridgain/grid/portables/GridPortableRawWriter.java +++ /dev/null @@ -1,197 +0,0 @@ -/* @java.file.header */ - -/* _________ _____ __________________ _____ - * __ ____/___________(_)______ /__ ____/______ ____(_)_______ - * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \ - * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / / - * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/ - */ - -package org.gridgain.grid.portables; - -import org.jetbrains.annotations.*; - -import java.sql.*; -import java.util.*; -import java.util.Date; - -/** - * Raw writer for portable object. Raw writer does not write field name hash codes, therefore, - * making the format even more compact. However, if the raw writer is used, - * dynamic structure changes to the portable objects are not supported. - */ -public interface GridPortableRawWriter { - /** - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeByte(byte val) throws GridPortableException; - - /** - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeShort(short val) throws GridPortableException; - - /** - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeInt(int val) throws GridPortableException; - - /** - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeLong(long val) throws GridPortableException; - - /** - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeFloat(float val) throws GridPortableException; - - /** - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeDouble(double val) throws GridPortableException; - - /** - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeChar(char val) throws GridPortableException; - - /** - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeBoolean(boolean val) throws GridPortableException; - - /** - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeString(@Nullable String val) throws GridPortableException; - - /** - * @param val UUID to write. - * @throws GridPortableException In case of error. - */ - public void writeUuid(@Nullable UUID val) throws GridPortableException; - - /** - * @param val Date to write. - * @throws GridPortableException In case of error. - */ - public void writeDate(@Nullable Date val) throws GridPortableException; - - /** - * @param val Timestamp to write. - * @throws GridPortableException In case of error. - */ - public void writeTimestamp(@Nullable Timestamp val) throws GridPortableException; - - /** - * @param obj Value to write. - * @throws GridPortableException In case of error. - */ - public void writeObject(@Nullable Object obj) throws GridPortableException; - - /** - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeByteArray(@Nullable byte[] val) throws GridPortableException; - - /** - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeShortArray(@Nullable short[] val) throws GridPortableException; - - /** - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeIntArray(@Nullable int[] val) throws GridPortableException; - - /** - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeLongArray(@Nullable long[] val) throws GridPortableException; - - /** - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeFloatArray(@Nullable float[] val) throws GridPortableException; - - /** - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeDoubleArray(@Nullable double[] val) throws GridPortableException; - - /** - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeCharArray(@Nullable char[] val) throws GridPortableException; - - /** - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeBooleanArray(@Nullable boolean[] val) throws GridPortableException; - - /** - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeStringArray(@Nullable String[] val) throws GridPortableException; - - /** - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeUuidArray(@Nullable UUID[] val) throws GridPortableException; - - /** - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeDateArray(@Nullable Date[] val) throws GridPortableException; - - /** - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeObjectArray(@Nullable Object[] val) throws GridPortableException; - - /** - * @param col Collection to write. - * @throws GridPortableException In case of error. - */ - public <T> void writeCollection(@Nullable Collection<T> col) throws GridPortableException; - - /** - * @param map Map to write. - * @throws GridPortableException In case of error. - */ - public <K, V> void writeMap(@Nullable Map<K, V> map) throws GridPortableException; - - /** - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public <T extends Enum<?>> void writeEnum(T val) throws GridPortableException; - - /** - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public <T extends Enum<?>> void writeEnumArray(T[] val) throws GridPortableException; -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e04165bb/modules/core/src/main/java/org/gridgain/grid/portables/GridPortableReader.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/portables/GridPortableReader.java b/modules/core/src/main/java/org/gridgain/grid/portables/GridPortableReader.java deleted file mode 100644 index c2f18be..0000000 --- a/modules/core/src/main/java/org/gridgain/grid/portables/GridPortableReader.java +++ /dev/null @@ -1,263 +0,0 @@ -/* @java.file.header */ - -/* _________ _____ __________________ _____ - * __ ____/___________(_)______ /__ ____/______ ____(_)_______ - * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \ - * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / / - * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/ - */ - -package org.gridgain.grid.portables; - -import org.jetbrains.annotations.*; - -import java.sql.*; -import java.util.*; -import java.util.Date; - -/** - * Reader for portable objects used in {@link GridPortableMarshalAware} 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, - * 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, GridGain provides {@link GridPortableIdMapper} which - * allows to override the automatically generated hash code IDs for the type and field names. - */ -public interface GridPortableReader { - /** - * @param fieldName Field name. - * @return Byte value. - * @throws GridPortableException In case of error. - */ - public byte readByte(String fieldName) throws GridPortableException; - - /** - * @param fieldName Field name. - * @return Short value. - * @throws GridPortableException In case of error. - */ - public short readShort(String fieldName) throws GridPortableException; - - /** - * @param fieldName Field name. - * @return Integer value. - * @throws GridPortableException In case of error. - */ - public int readInt(String fieldName) throws GridPortableException; - - /** - * @param fieldName Field name. - * @return Long value. - * @throws GridPortableException In case of error. - */ - public long readLong(String fieldName) throws GridPortableException; - - /** - * @param fieldName Field name. - * @throws GridPortableException In case of error. - * @return Float value. - */ - public float readFloat(String fieldName) throws GridPortableException; - - /** - * @param fieldName Field name. - * @return Double value. - * @throws GridPortableException In case of error. - */ - public double readDouble(String fieldName) throws GridPortableException; - - /** - * @param fieldName Field name. - * @return Char value. - * @throws GridPortableException In case of error. - */ - public char readChar(String fieldName) throws GridPortableException; - - /** - * @param fieldName Field name. - * @return Boolean value. - * @throws GridPortableException In case of error. - */ - public boolean readBoolean(String fieldName) throws GridPortableException; - - /** - * @param fieldName Field name. - * @return String value. - * @throws GridPortableException In case of error. - */ - @Nullable public String readString(String fieldName) throws GridPortableException; - - /** - * @param fieldName Field name. - * @return UUID. - * @throws GridPortableException In case of error. - */ - @Nullable public UUID readUuid(String fieldName) throws GridPortableException; - - /** - * @param fieldName Field name. - * @return Date. - * @throws GridPortableException In case of error. - */ - @Nullable public Date readDate(String fieldName) throws GridPortableException; - - /** - * @param fieldName Field name. - * @return Timestamp. - * @throws GridPortableException In case of error. - */ - @Nullable public Timestamp readTimestamp(String fieldName) throws GridPortableException; - - /** - * @param fieldName Field name. - * @return Object. - * @throws GridPortableException In case of error. - */ - @Nullable public <T> T readObject(String fieldName) throws GridPortableException; - - /** - * @param fieldName Field name. - * @return Byte array. - * @throws GridPortableException In case of error. - */ - @Nullable public byte[] readByteArray(String fieldName) throws GridPortableException; - - /** - * @param fieldName Field name. - * @return Short array. - * @throws GridPortableException In case of error. - */ - @Nullable public short[] readShortArray(String fieldName) throws GridPortableException; - - /** - * @param fieldName Field name. - * @return Integer array. - * @throws GridPortableException In case of error. - */ - @Nullable public int[] readIntArray(String fieldName) throws GridPortableException; - - /** - * @param fieldName Field name. - * @return Long array. - * @throws GridPortableException In case of error. - */ - @Nullable public long[] readLongArray(String fieldName) throws GridPortableException; - - /** - * @param fieldName Field name. - * @return Float array. - * @throws GridPortableException In case of error. - */ - @Nullable public float[] readFloatArray(String fieldName) throws GridPortableException; - - /** - * @param fieldName Field name. - * @return Byte array. - * @throws GridPortableException In case of error. - */ - @Nullable public double[] readDoubleArray(String fieldName) throws GridPortableException; - - /** - * @param fieldName Field name. - * @return Char array. - * @throws GridPortableException In case of error. - */ - @Nullable public char[] readCharArray(String fieldName) throws GridPortableException; - - /** - * @param fieldName Field name. - * @return Boolean array. - * @throws GridPortableException In case of error. - */ - @Nullable public boolean[] readBooleanArray(String fieldName) throws GridPortableException; - - /** - * @param fieldName Field name. - * @return String array. - * @throws GridPortableException In case of error. - */ - @Nullable public String[] readStringArray(String fieldName) throws GridPortableException; - - /** - * @param fieldName Field name. - * @return UUID array. - * @throws GridPortableException In case of error. - */ - @Nullable public UUID[] readUuidArray(String fieldName) throws GridPortableException; - - /** - * @param fieldName Field name. - * @return Date array. - * @throws GridPortableException In case of error. - */ - @Nullable public Date[] readDateArray(String fieldName) throws GridPortableException; - - /** - * @param fieldName Field name. - * @return Object array. - * @throws GridPortableException In case of error. - */ - @Nullable public Object[] readObjectArray(String fieldName) throws GridPortableException; - - /** - * @param fieldName Field name. - * @return Collection. - * @throws GridPortableException In case of error. - */ - @Nullable public <T> Collection<T> readCollection(String fieldName) throws GridPortableException; - - /** - * @param fieldName Field name. - * @param colCls Collection class. - * @return Collection. - * @throws GridPortableException In case of error. - */ - @Nullable public <T> Collection<T> readCollection(String fieldName, Class<? extends Collection<T>> colCls) - throws GridPortableException; - - /** - * @param fieldName Field name. - * @return Map. - * @throws GridPortableException In case of error. - */ - @Nullable public <K, V> Map<K, V> readMap(String fieldName) throws GridPortableException; - - /** - * @param fieldName Field name. - * @param mapCls Map class. - * @return Map. - * @throws GridPortableException In case of error. - */ - @Nullable public <K, V> Map<K, V> readMap(String fieldName, Class<? extends Map<K, V>> mapCls) - throws GridPortableException; - - /** - * @param fieldName Field name. - * @param enumCls Enum class. - * @return Value. - * @throws GridPortableException In case of error. - */ - @Nullable public <T extends Enum<?>> T readEnum(String fieldName, Class<T> enumCls) throws GridPortableException; - - /** - * @param fieldName Field name. - * @param enumCls Enum class. - * @return Value. - * @throws GridPortableException In case of error. - */ - @Nullable public <T extends Enum<?>> T[] readEnumArray(String fieldName, Class<T> enumCls) - throws GridPortableException; - - /** - * Gets raw reader. Raw reader does not use field name hash codes, therefore, - * making the format even more compact. However, if the raw reader is used, - * dynamic structure changes to the portable objects are not supported. - * - * @return Raw reader. - */ - public GridPortableRawReader rawReader(); -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e04165bb/modules/core/src/main/java/org/gridgain/grid/portables/GridPortableSerializer.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/portables/GridPortableSerializer.java b/modules/core/src/main/java/org/gridgain/grid/portables/GridPortableSerializer.java deleted file mode 100644 index 77274c4..0000000 --- a/modules/core/src/main/java/org/gridgain/grid/portables/GridPortableSerializer.java +++ /dev/null @@ -1,39 +0,0 @@ -/* @java.file.header */ - -/* _________ _____ __________________ _____ - * __ ____/___________(_)______ /__ ____/______ ____(_)_______ - * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \ - * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / / - * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/ - */ - -package org.gridgain.grid.portables; - -/** - * Interface that allows to implement custom serialization logic for portable objects. - * Can be used instead of {@link GridPortableMarshalAware} in case if the class - * cannot be changed directly. - * <p> - * Portable serializer can be configured for all portable objects via - * {@link GridPortableConfiguration#getSerializer()} method, or for a specific - * portable type via {@link GridPortableTypeConfiguration#getSerializer()} method. - */ -public interface GridPortableSerializer { - /** - * Writes fields to provided writer. - * - * @param obj Empty object. - * @param writer Portable object writer. - * @throws GridPortableException In case of error. - */ - public void writePortable(Object obj, GridPortableWriter writer) throws GridPortableException; - - /** - * Reads fields from provided reader. - * - * @param obj Empty object - * @param reader Portable object reader. - * @throws GridPortableException In case of error. - */ - public void readPortable(Object obj, GridPortableReader reader) throws GridPortableException; -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e04165bb/modules/core/src/main/java/org/gridgain/grid/portables/GridPortableTypeConfiguration.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/portables/GridPortableTypeConfiguration.java b/modules/core/src/main/java/org/gridgain/grid/portables/GridPortableTypeConfiguration.java deleted file mode 100644 index 87a3106..0000000 --- a/modules/core/src/main/java/org/gridgain/grid/portables/GridPortableTypeConfiguration.java +++ /dev/null @@ -1,187 +0,0 @@ -/* @java.file.header */ - -/* _________ _____ __________________ _____ - * __ ____/___________(_)______ /__ ____/______ ____(_)_______ - * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \ - * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / / - * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/ - */ - -package org.gridgain.grid.portables; - -import org.gridgain.grid.util.typedef.internal.*; - -import java.sql.*; - -/** - * Defines configuration properties for a specific portable type. Providing per-type - * configuration is optional, as it is generally enough to provide global - * portable configuration in {@link GridPortableConfiguration} instance. However, - * this class allows you to change configuration properties for a specific - * portable type without affecting configuration for other portable types. - * <p> - * Per-type portable configuration can be specified in - * {@link GridPortableConfiguration#getTypeConfigurations()} method. - */ -public class GridPortableTypeConfiguration { - /** Class name. */ - private String clsName; - - /** ID mapper. */ - private GridPortableIdMapper idMapper; - - /** Serializer. */ - private GridPortableSerializer serializer; - - /** Use timestamp flag. */ - private Boolean useTs; - - /** Meta data enabled flag. */ - private Boolean metaDataEnabled; - - /** Keep deserialized flag. */ - private Boolean keepDeserialized; - - /** Affinity key field name. */ - private String affKeyFieldName; - - /** - */ - public GridPortableTypeConfiguration() { - // No-op. - } - - /** - * @param clsName Class name. - */ - public GridPortableTypeConfiguration(String clsName) { - this.clsName = clsName; - } - - /** - * Gets type name. - * - * @return Type name. - */ - public String getClassName() { - return clsName; - } - - /** - * Sets type name. - * - * @param clsName Type name. - */ - public void setClassName(String clsName) { - this.clsName = clsName; - } - - /** - * Gets ID mapper. - * - * @return ID mapper. - */ - public GridPortableIdMapper getIdMapper() { - return idMapper; - } - - /** - * Sets ID mapper. - * - * @param idMapper ID mapper. - */ - public void setIdMapper(GridPortableIdMapper 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; - } - - /** - * If {@code true} then date values converted to {@link Timestamp} during unmarshalling. - * - * @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; - } - - /** - * Defines whether meta data is collected for this type. If provided, this value will override - * {@link GridPortableConfiguration#isMetaDataEnabled()} property. - * - * @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; - } - - /** - * Defines whether {@link GridPortableObject} should cache deserialized instance. If provided, - * this value will override {@link GridPortableConfiguration#isKeepDeserialized()} property. - * - * @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; - } - - /** - * Gets affinity key field name. - * - * @return Affinity key field name. - */ - public String getAffinityKeyFieldName() { - return affKeyFieldName; - } - - /** - * Sets affinity key field name. - * - * @param affKeyFieldName Affinity key field name. - */ - public void setAffinityKeyFieldName(String affKeyFieldName) { - this.affKeyFieldName = affKeyFieldName; - } - - /** {@inheritDoc} */ - @Override public String toString() { - return S.toString(GridPortableTypeConfiguration.class, this, super.toString()); - } -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e04165bb/modules/core/src/main/java/org/gridgain/grid/portables/GridPortableWriter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/portables/GridPortableWriter.java b/modules/core/src/main/java/org/gridgain/grid/portables/GridPortableWriter.java deleted file mode 100644 index 7853b64..0000000 --- a/modules/core/src/main/java/org/gridgain/grid/portables/GridPortableWriter.java +++ /dev/null @@ -1,242 +0,0 @@ -/* @java.file.header */ - -/* _________ _____ __________________ _____ - * __ ____/___________(_)______ /__ ____/______ ____(_)_______ - * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \ - * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / / - * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/ - */ - -package org.gridgain.grid.portables; - -import org.jetbrains.annotations.*; - -import java.sql.*; -import java.util.*; -import java.util.Date; - -/** - * Writer for portable object used in {@link GridPortableMarshalAware} 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, - * 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, GridGain provides {@link GridPortableIdMapper} 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. - */ - public void writeByte(String fieldName, byte val) throws GridPortableException; - - /** - * @param fieldName Field name. - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeShort(String fieldName, short val) throws GridPortableException; - - /** - * @param fieldName Field name. - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeInt(String fieldName, int val) throws GridPortableException; - - /** - * @param fieldName Field name. - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeLong(String fieldName, long val) throws GridPortableException; - - /** - * @param fieldName Field name. - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeFloat(String fieldName, float val) throws GridPortableException; - - /** - * @param fieldName Field name. - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeDouble(String fieldName, double val) throws GridPortableException; - - /** - * @param fieldName Field name. - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeChar(String fieldName, char val) throws GridPortableException; - - /** - * @param fieldName Field name. - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeBoolean(String fieldName, boolean val) throws GridPortableException; - - /** - * @param fieldName Field name. - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeString(String fieldName, @Nullable String val) throws GridPortableException; - - /** - * @param fieldName Field name. - * @param val UUID to write. - * @throws GridPortableException In case of error. - */ - public void writeUuid(String fieldName, @Nullable UUID val) throws GridPortableException; - - /** - * @param fieldName Field name. - * @param val Date to write. - * @throws GridPortableException In case of error. - */ - public void writeDate(String fieldName, @Nullable Date val) throws GridPortableException; - - /** - * @param fieldName Field name. - * @param val Timestamp to write. - * @throws GridPortableException In case of error. - */ - public void writeTimestamp(String fieldName, @Nullable Timestamp val) throws GridPortableException; - - /** - * @param fieldName Field name. - * @param obj Value to write. - * @throws GridPortableException In case of error. - */ - public void writeObject(String fieldName, @Nullable Object obj) throws GridPortableException; - - /** - * @param fieldName Field name. - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeByteArray(String fieldName, @Nullable byte[] val) throws GridPortableException; - - /** - * @param fieldName Field name. - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeShortArray(String fieldName, @Nullable short[] val) throws GridPortableException; - - /** - * @param fieldName Field name. - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeIntArray(String fieldName, @Nullable int[] val) throws GridPortableException; - - /** - * @param fieldName Field name. - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeLongArray(String fieldName, @Nullable long[] val) throws GridPortableException; - - /** - * @param fieldName Field name. - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeFloatArray(String fieldName, @Nullable float[] val) throws GridPortableException; - - /** - * @param fieldName Field name. - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeDoubleArray(String fieldName, @Nullable double[] val) throws GridPortableException; - - /** - * @param fieldName Field name. - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeCharArray(String fieldName, @Nullable char[] val) throws GridPortableException; - - /** - * @param fieldName Field name. - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeBooleanArray(String fieldName, @Nullable boolean[] val) throws GridPortableException; - - /** - * @param fieldName Field name. - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeStringArray(String fieldName, @Nullable String[] val) throws GridPortableException; - - /** - * @param fieldName Field name. - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeUuidArray(String fieldName, @Nullable UUID[] val) throws GridPortableException; - - /** - * @param fieldName Field name. - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeDateArray(String fieldName, @Nullable Date[] val) throws GridPortableException; - - /** - * @param fieldName Field name. - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public void writeObjectArray(String fieldName, @Nullable Object[] val) throws GridPortableException; - - /** - * @param fieldName Field name. - * @param col Collection to write. - * @throws GridPortableException In case of error. - */ - public <T> void writeCollection(String fieldName, @Nullable Collection<T> col) throws GridPortableException; - - /** - * @param fieldName Field name. - * @param map Map to write. - * @throws GridPortableException In case of error. - */ - public <K, V> void writeMap(String fieldName, @Nullable Map<K, V> map) throws GridPortableException; - - /** - * @param fieldName Field name. - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public <T extends Enum<?>> void writeEnum(String fieldName, T val) throws GridPortableException; - - /** - * @param fieldName Field name. - * @param val Value to write. - * @throws GridPortableException In case of error. - */ - public <T extends Enum<?>> void writeEnumArray(String fieldName, T[] val) throws GridPortableException; - - /** - * Gets raw writer. Raw writer does not write field name hash codes, therefore, - * making the format even more compact. However, if the raw writer is used, - * dynamic structure changes to the portable objects are not supported. - * - * @return Raw writer. - */ - public GridPortableRawWriter rawWriter(); -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e04165bb/modules/core/src/main/java/org/gridgain/grid/portables/package.html ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/portables/package.html b/modules/core/src/main/java/org/gridgain/grid/portables/package.html deleted file mode 100644 index cacbc3e..0000000 --- a/modules/core/src/main/java/org/gridgain/grid/portables/package.html +++ /dev/null @@ -1,15 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!-- - @html.file.header - _________ _____ __________________ _____ - __ ____/___________(_)______ /__ ____/______ ____(_)_______ - _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \ - / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / / - \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/ ---> -<html> -<body> - <!-- Package description. --> - Contains <b>Portable Objects</b> related functionality. -</body> -</html> http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e04165bb/modules/core/src/main/java/org/gridgain/grid/security/GridSecurityCredentials.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/security/GridSecurityCredentials.java b/modules/core/src/main/java/org/gridgain/grid/security/GridSecurityCredentials.java index d23afc3..57c3b43 100644 --- a/modules/core/src/main/java/org/gridgain/grid/security/GridSecurityCredentials.java +++ b/modules/core/src/main/java/org/gridgain/grid/security/GridSecurityCredentials.java @@ -9,7 +9,7 @@ package org.gridgain.grid.security; -import org.gridgain.grid.portables.*; +import org.apache.ignite.portables.*; import org.gridgain.grid.util.tostring.*; import org.gridgain.grid.util.typedef.*; import org.gridgain.grid.util.typedef.internal.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e04165bb/modules/core/src/main/java/org/gridgain/grid/util/GridUtils.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/util/GridUtils.java b/modules/core/src/main/java/org/gridgain/grid/util/GridUtils.java index 82c59e3..47d115d 100644 --- a/modules/core/src/main/java/org/gridgain/grid/util/GridUtils.java +++ b/modules/core/src/main/java/org/gridgain/grid/util/GridUtils.java @@ -17,13 +17,13 @@ import org.apache.ignite.events.*; import org.apache.ignite.lang.*; import org.apache.ignite.lifecycle.*; import org.apache.ignite.mbean.*; +import org.apache.ignite.portables.*; import org.gridgain.grid.*; import org.gridgain.grid.cache.*; import org.gridgain.grid.kernal.*; import org.gridgain.grid.kernal.managers.deployment.*; import org.gridgain.grid.kernal.processors.cache.*; import org.gridgain.grid.kernal.processors.streamer.*; -import org.gridgain.grid.portables.*; import org.gridgain.grid.product.*; import org.gridgain.grid.spi.*; import org.gridgain.grid.spi.discovery.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e04165bb/modules/core/src/main/java/org/gridgain/grid/util/portable/GridPortableRawReaderEx.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/util/portable/GridPortableRawReaderEx.java b/modules/core/src/main/java/org/gridgain/grid/util/portable/GridPortableRawReaderEx.java index 2df4bdd..a7ea04f 100644 --- a/modules/core/src/main/java/org/gridgain/grid/util/portable/GridPortableRawReaderEx.java +++ b/modules/core/src/main/java/org/gridgain/grid/util/portable/GridPortableRawReaderEx.java @@ -9,7 +9,7 @@ package org.gridgain.grid.util.portable; -import org.gridgain.grid.portables.*; +import org.apache.ignite.portables.*; import org.jetbrains.annotations.*; /** @@ -18,7 +18,7 @@ import org.jetbrains.annotations.*; public interface GridPortableRawReaderEx extends GridPortableRawReader { /** * @return Object. - * @throws GridPortableException In case of error. + * @throws org.apache.ignite.portables.GridPortableException In case of error. */ @Nullable public Object readObjectDetached() throws GridPortableException; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e04165bb/modules/core/src/main/java/org/gridgain/grid/util/portable/GridPortableRawWriterEx.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/util/portable/GridPortableRawWriterEx.java b/modules/core/src/main/java/org/gridgain/grid/util/portable/GridPortableRawWriterEx.java index afe0026..18e761b 100644 --- a/modules/core/src/main/java/org/gridgain/grid/util/portable/GridPortableRawWriterEx.java +++ b/modules/core/src/main/java/org/gridgain/grid/util/portable/GridPortableRawWriterEx.java @@ -9,8 +9,8 @@ package org.gridgain.grid.util.portable; +import org.apache.ignite.portables.*; import org.gridgain.grid.kernal.processors.portable.*; -import org.gridgain.grid.portables.*; import org.jetbrains.annotations.*; /** @@ -19,7 +19,7 @@ import org.jetbrains.annotations.*; public interface GridPortableRawWriterEx extends GridPortableRawWriter, AutoCloseable { /** * @param obj Object to write. - * @throws GridPortableException In case of error. + * @throws org.apache.ignite.portables.GridPortableException In case of error. */ public void writeObjectDetached(@Nullable Object obj) throws GridPortableException; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e04165bb/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheOffHeapTieredAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheOffHeapTieredAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheOffHeapTieredAbstractSelfTest.java index 4c98453..0520d9a 100644 --- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheOffHeapTieredAbstractSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheOffHeapTieredAbstractSelfTest.java @@ -11,8 +11,8 @@ package org.gridgain.grid.kernal.processors.cache; import org.apache.ignite.configuration.*; import org.apache.ignite.lang.*; +import org.apache.ignite.portables.*; import org.gridgain.grid.cache.*; -import org.gridgain.grid.portables.*; import org.gridgain.grid.util.typedef.*; import org.jetbrains.annotations.*; import org.junit.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e04165bb/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheOffHeapTieredEvictionAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheOffHeapTieredEvictionAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheOffHeapTieredEvictionAbstractSelfTest.java index 0448b56..9dbfbb5 100644 --- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheOffHeapTieredEvictionAbstractSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheOffHeapTieredEvictionAbstractSelfTest.java @@ -11,8 +11,8 @@ package org.gridgain.grid.kernal.processors.cache; import org.apache.ignite.configuration.*; import org.apache.ignite.lang.*; +import org.apache.ignite.portables.*; import org.gridgain.grid.cache.*; -import org.gridgain.grid.portables.*; import org.gridgain.grid.util.typedef.*; import org.gridgain.grid.util.typedef.internal.*; import org.gridgain.testframework.*; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e04165bb/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 0bf7d44..8bccf2e 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 @@ -12,9 +12,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.apache.ignite.portables.*; import org.gridgain.grid.cache.*; import org.gridgain.grid.cache.query.*; -import org.gridgain.grid.portables.*; 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/e04165bb/modules/core/src/test/java/org/gridgain/grid/kernal/processors/dataload/GridDataLoaderImplSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/dataload/GridDataLoaderImplSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/dataload/GridDataLoaderImplSelfTest.java index f3fa2db..03ae4d0 100644 --- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/dataload/GridDataLoaderImplSelfTest.java +++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/dataload/GridDataLoaderImplSelfTest.java @@ -13,8 +13,8 @@ import org.apache.ignite.*; import org.apache.ignite.configuration.*; import org.apache.ignite.marshaller.*; import org.apache.ignite.marshaller.optimized.*; +import org.apache.ignite.portables.*; import org.gridgain.grid.cache.*; -import org.gridgain.grid.portables.*; import org.gridgain.grid.spi.discovery.tcp.*; import org.gridgain.grid.spi.discovery.tcp.ipfinder.*; import org.gridgain.grid.spi.discovery.tcp.ipfinder.vm.*;