Package com.hazelcast.nio.serialization
Class ClassDefinitionBuilder
java.lang.Object
com.hazelcast.nio.serialization.ClassDefinitionBuilder
Deprecated, for removal: This API element is subject to removal in a future version.
Portable Serialization has been deprecated. We recommend you use Compact Serialization as Portable Serialization
will be removed as of version 7.0.
ClassDefinitionBuilder is used to build and register ClassDefinitions manually.
-
Constructor Summary
ConstructorDescriptionClassDefinitionBuilder
(int factoryId, int classId) Deprecated, for removal: This API element is subject to removal in a future version.IMPORTANT: It uses a default portableVersion (0) for non-versioned classes.ClassDefinitionBuilder
(int factoryId, int classId, int version) Deprecated, for removal: This API element is subject to removal in a future version.IMPORTANT: Make sure that the version matches the portableVersion in the SerializationServiceClassDefinitionBuilder
(PortableId portableId) Deprecated, for removal: This API element is subject to removal in a future version.IMPORTANT: Make sure that the version matches the portableVersion in the SerializationService -
Method Summary
Modifier and TypeMethodDescriptionaddBooleanArrayField
(String fieldName) Deprecated, for removal: This API element is subject to removal in a future version.addBooleanField
(String fieldName) Deprecated, for removal: This API element is subject to removal in a future version.addByteArrayField
(String fieldName) Deprecated, for removal: This API element is subject to removal in a future version.addByteField
(String fieldName) Deprecated, for removal: This API element is subject to removal in a future version.addCharArrayField
(String fieldName) Deprecated, for removal: This API element is subject to removal in a future version.addCharField
(String fieldName) Deprecated, for removal: This API element is subject to removal in a future version.addDateArrayField
(String fieldName) Deprecated, for removal: This API element is subject to removal in a future version.Adds an array of Date's to the class definitionaddDateField
(String fieldName) Deprecated, for removal: This API element is subject to removal in a future version.Adds a date field consisting of year, month of the year and day of the month to the class definitionaddDecimalArrayField
(String fieldName) Deprecated, for removal: This API element is subject to removal in a future version.Adds an array of Decimal's to the class definitionaddDecimalField
(String fieldName) Deprecated, for removal: This API element is subject to removal in a future version.Adds a decimal which is arbitrary precision and scale floating-point number to the class definitionaddDoubleArrayField
(String fieldName) Deprecated, for removal: This API element is subject to removal in a future version.addDoubleField
(String fieldName) Deprecated, for removal: This API element is subject to removal in a future version.void
addField
(com.hazelcast.internal.serialization.impl.portable.FieldDefinitionImpl fieldDefinition) Deprecated, for removal: This API element is subject to removal in a future version.addFloatArrayField
(String fieldName) Deprecated, for removal: This API element is subject to removal in a future version.addFloatField
(String fieldName) Deprecated, for removal: This API element is subject to removal in a future version.addIntArrayField
(String fieldName) Deprecated, for removal: This API element is subject to removal in a future version.addIntField
(String fieldName) Deprecated, for removal: This API element is subject to removal in a future version.addLongArrayField
(String fieldName) Deprecated, for removal: This API element is subject to removal in a future version.addLongField
(String fieldName) Deprecated, for removal: This API element is subject to removal in a future version.addPortableArrayField
(String fieldName, ClassDefinition classDefinition) Deprecated, for removal: This API element is subject to removal in a future version.addPortableField
(String fieldName, ClassDefinition classDefinition) Deprecated, for removal: This API element is subject to removal in a future version.addShortArrayField
(String fieldName) Deprecated, for removal: This API element is subject to removal in a future version.addShortField
(String fieldName) Deprecated, for removal: This API element is subject to removal in a future version.addStringArrayField
(String fieldName) Deprecated, for removal: This API element is subject to removal in a future version.addStringField
(String fieldName) Deprecated, for removal: This API element is subject to removal in a future version.addTimeArrayField
(String fieldName) Deprecated, for removal: This API element is subject to removal in a future version.Adds an array of Time's to the class definitionaddTimeField
(String fieldName) Deprecated, for removal: This API element is subject to removal in a future version.Adds a time field consisting of hour, minute, seconds and nanos parts to the class definitionaddTimestampArrayField
(String fieldName) Deprecated, for removal: This API element is subject to removal in a future version.Adds an array of Timestamp's to the class definitionaddTimestampField
(String fieldName) Deprecated, for removal: This API element is subject to removal in a future version.Adds a timestamp field consisting of year, month of the year, day of the month, hour, minute, seconds, nanos parts to the class definitionaddTimestampWithTimezoneArrayField
(String fieldName) Deprecated, for removal: This API element is subject to removal in a future version.Adds an array of TimestampWithTimezone's to the class definitionaddTimestampWithTimezoneField
(String fieldName) Deprecated, for removal: This API element is subject to removal in a future version.Adds a timestamp with timezone field consisting of year, month of the year, day of the month, offset seconds, hour, minute, seconds, nanos parts to the class definitionaddUTFArrayField
(String fieldName) Deprecated.for the sake of better naming.addUTFField
(String fieldName) Deprecated.for the sake of better naming.build()
Deprecated, for removal: This API element is subject to removal in a future version.int
Deprecated, for removal: This API element is subject to removal in a future version.int
Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.int
Deprecated, for removal: This API element is subject to removal in a future version.
-
Constructor Details
-
ClassDefinitionBuilder
public ClassDefinitionBuilder(int factoryId, int classId) Deprecated, for removal: This API element is subject to removal in a future version.IMPORTANT: It uses a default portableVersion (0) for non-versioned classes. Make sure to specify the portableVersion in the constructor if you override the default portableVersion in the SerializationService -
ClassDefinitionBuilder
public ClassDefinitionBuilder(int factoryId, int classId, int version) Deprecated, for removal: This API element is subject to removal in a future version.IMPORTANT: Make sure that the version matches the portableVersion in the SerializationService -
ClassDefinitionBuilder
Deprecated, for removal: This API element is subject to removal in a future version.IMPORTANT: Make sure that the version matches the portableVersion in the SerializationService- Since:
- 5.4
-
-
Method Details
-
addIntField
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
fieldName
- name of the field that will be added to this class definition- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if a field with same name already exists or if this method is called afterbuild()
-
addLongField
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
fieldName
- name of the field that will be added to this class definition- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if a field with same name already exists or if this method is called afterbuild()
-
addUTFField
Deprecated.for the sake of better naming. UseaddStringField(String)
instead.- Parameters:
fieldName
- name of the field that will be added to this class definition- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if a field with same name already exists or if this method is called afterbuild()
-
addStringField
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
fieldName
- name of the field that will be added to this class definition- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if a field with same name already exists or if this method is called afterbuild()
-
addBooleanField
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
fieldName
- name of the field that will be added to this class definition- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if a field with same name already exists or if this method is called afterbuild()
-
addByteField
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
fieldName
- name of the field that will be added to this class definition- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if a field with same name already exists or if this method is called afterbuild()
-
addBooleanArrayField
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
fieldName
- name of the field that will be added to this class definition- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if a field with same name already exists or if this method is called afterbuild()
-
addCharField
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
fieldName
- name of the field that will be added to this class definition- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if a field with same name already exists or if this method is called afterbuild()
-
addDoubleField
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
fieldName
- name of the field that will be added to this class definition- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if a field with same name already exists or if this method is called afterbuild()
-
addFloatField
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
fieldName
- name of the field that will be added to this class definition- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if a field with same name already exists or if this method is called afterbuild()
-
addShortField
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
fieldName
- name of the field that will be added to this class definition- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if a field with same name already exists or if this method is called afterbuild()
-
addDecimalField
Deprecated, for removal: This API element is subject to removal in a future version.Adds a decimal which is arbitrary precision and scale floating-point number to the class definition- Parameters:
fieldName
- name of the field that will be added to this class definition- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if a field with same name already exists or if this method is called afterbuild()
-
addTimeField
Deprecated, for removal: This API element is subject to removal in a future version.Adds a time field consisting of hour, minute, seconds and nanos parts to the class definition- Parameters:
fieldName
- name of the field that will be added to this class definition- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if a field with same name already exists or if this method is called afterbuild()
-
addDateField
Deprecated, for removal: This API element is subject to removal in a future version.Adds a date field consisting of year, month of the year and day of the month to the class definition- Parameters:
fieldName
- name of the field that will be added to this class definition- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if a field with same name already exists or if this method is called afterbuild()
-
addTimestampField
Deprecated, for removal: This API element is subject to removal in a future version.Adds a timestamp field consisting of year, month of the year, day of the month, hour, minute, seconds, nanos parts to the class definition- Parameters:
fieldName
- name of the field that will be added to this class definition- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if a field with same name already exists or if this method is called afterbuild()
-
addTimestampWithTimezoneField
Deprecated, for removal: This API element is subject to removal in a future version.Adds a timestamp with timezone field consisting of year, month of the year, day of the month, offset seconds, hour, minute, seconds, nanos parts to the class definition- Parameters:
fieldName
- name of the field that will be added to this class definition- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if a field with same name already exists or if this method is called afterbuild()
-
addByteArrayField
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
fieldName
- name of the field that will be added to this class definition- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if a field with same name already exists or if this method is called afterbuild()
-
addCharArrayField
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
fieldName
- name of the field that will be added to this class definition- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if a field with same name already exists or if this method is called afterbuild()
-
addIntArrayField
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
fieldName
- name of the field that will be added to this class definition- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if a field with same name already exists or if this method is called afterbuild()
-
addLongArrayField
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
fieldName
- name of the field that will be added to this class definition- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if a field with same name already exists or if this method is called afterbuild()
-
addDoubleArrayField
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
fieldName
- name of the field that will be added to this class definition- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if a field with same name already exists or if this method is called afterbuild()
-
addFloatArrayField
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
fieldName
- name of the field that will be added to this class definition- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if a field with same name already exists or if this method is called afterbuild()
-
addShortArrayField
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
fieldName
- name of the field that will be added to this class definition- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if a field with same name already exists or if this method is called afterbuild()
-
addUTFArrayField
Deprecated.for the sake of better naming. UseaddStringArrayField(String)
instead.- Parameters:
fieldName
- name of the field that will be added to this class definition- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if a field with same name already exists or if this method is called afterbuild()
-
addStringArrayField
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
fieldName
- name of the field that will be added to this class definition- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if a field with same name already exists or if this method is called afterbuild()
-
addPortableField
@Nonnull public ClassDefinitionBuilder addPortableField(@Nonnull String fieldName, ClassDefinition classDefinition) Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
fieldName
- name of the field that will be added to this class definition- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if a field with same name already exists or if this method is called afterbuild()
-
addPortableArrayField
@Nonnull public ClassDefinitionBuilder addPortableArrayField(@Nonnull String fieldName, ClassDefinition classDefinition) Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
fieldName
- name of the field that will be added to this class definitionclassDefinition
- class definition of the nested portable that will be added to this class definition- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if a field with same name already exists or if this method is called afterbuild()
-
addDecimalArrayField
Deprecated, for removal: This API element is subject to removal in a future version.Adds an array of Decimal's to the class definition- Parameters:
fieldName
- name of the field that will be added to this class definition- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if a field with same name already exists or if this method is called afterbuild()
- See Also:
-
addTimeArrayField
Deprecated, for removal: This API element is subject to removal in a future version.Adds an array of Time's to the class definition- Parameters:
fieldName
- name of the field that will be added to this class definition- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if a field with same name already exists or if this method is called afterbuild()
- See Also:
-
addDateArrayField
Deprecated, for removal: This API element is subject to removal in a future version.Adds an array of Date's to the class definition- Parameters:
fieldName
- name of the field that will be added to this class definition- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if a field with same name already exists or if this method is called afterbuild()
- See Also:
-
addTimestampArrayField
Deprecated, for removal: This API element is subject to removal in a future version.Adds an array of Timestamp's to the class definition- Parameters:
fieldName
- name of the field that will be added to this class definition- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if a field with same name already exists or if this method is called afterbuild()
- See Also:
-
addTimestampWithTimezoneArrayField
@Nonnull public ClassDefinitionBuilder addTimestampWithTimezoneArrayField(@Nonnull String fieldName) Deprecated, for removal: This API element is subject to removal in a future version.Adds an array of TimestampWithTimezone's to the class definition- Parameters:
fieldName
- name of the field that will be added to this class definition- Returns:
- itself for chaining
- Throws:
HazelcastSerializationException
- if a field with same name already exists or if this method is called afterbuild()
- See Also:
-
addField
@PrivateApi public void addField(com.hazelcast.internal.serialization.impl.portable.FieldDefinitionImpl fieldDefinition) Deprecated, for removal: This API element is subject to removal in a future version. -
build
Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- creates and returns a new ClassDefinition
-
getFactoryId
public int getFactoryId()Deprecated, for removal: This API element is subject to removal in a future version. -
getClassId
public int getClassId()Deprecated, for removal: This API element is subject to removal in a future version. -
getVersion
public int getVersion()Deprecated, for removal: This API element is subject to removal in a future version. -
getPortableId
Deprecated, for removal: This API element is subject to removal in a future version.- Since:
- 5.4
-