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 SummaryConstructorsConstructorDescriptionClassDefinitionBuilder(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 SummaryModifier 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.voidaddField(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.intDeprecated, for removal: This API element is subject to removal in a future version.intDeprecated, 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.intDeprecated, for removal: This API element is subject to removal in a future version.
- 
Constructor Details- 
ClassDefinitionBuilderpublic 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
- 
ClassDefinitionBuilderpublic 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
- 
ClassDefinitionBuilderDeprecated, 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- 
addIntFieldDeprecated, 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 after- build()
 
- 
addLongFieldDeprecated, 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 after- build()
 
- 
addUTFFieldDeprecated.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 after- build()
 
- 
addStringFieldDeprecated, 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 after- build()
 
- 
addBooleanFieldDeprecated, 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 after- build()
 
- 
addByteFieldDeprecated, 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 after- build()
 
- 
addBooleanArrayFieldDeprecated, 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 after- build()
 
- 
addCharFieldDeprecated, 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 after- build()
 
- 
addDoubleFieldDeprecated, 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 after- build()
 
- 
addFloatFieldDeprecated, 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 after- build()
 
- 
addShortFieldDeprecated, 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 after- build()
 
- 
addDecimalFieldDeprecated, 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 after- build()
 
- 
addTimeFieldDeprecated, 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 after- build()
 
- 
addDateFieldDeprecated, 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 after- build()
 
- 
addTimestampFieldDeprecated, 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 after- build()
 
- 
addTimestampWithTimezoneFieldDeprecated, 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 after- build()
 
- 
addByteArrayFieldDeprecated, 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 after- build()
 
- 
addCharArrayFieldDeprecated, 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 after- build()
 
- 
addIntArrayFieldDeprecated, 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 after- build()
 
- 
addLongArrayFieldDeprecated, 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 after- build()
 
- 
addDoubleArrayFieldDeprecated, 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 after- build()
 
- 
addFloatArrayFieldDeprecated, 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 after- build()
 
- 
addShortArrayFieldDeprecated, 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 after- build()
 
- 
addUTFArrayFieldDeprecated.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 after- build()
 
- 
addStringArrayFieldDeprecated, 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 after- build()
 
- 
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 after- build()
 
- 
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 definition
- classDefinition- 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 after- build()
 
- 
addDecimalArrayFieldDeprecated, 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 after- build()
- See Also:
 
- 
addTimeArrayFieldDeprecated, 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 after- build()
- See Also:
 
- 
addDateArrayFieldDeprecated, 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 after- build()
- See Also:
 
- 
addTimestampArrayFieldDeprecated, 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 after- build()
- 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 after- build()
- 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.
- 
buildDeprecated, for removal: This API element is subject to removal in a future version.- Returns:
- creates and returns a new ClassDefinition
 
- 
getFactoryIdpublic int getFactoryId()Deprecated, for removal: This API element is subject to removal in a future version.
- 
getClassIdpublic int getClassId()Deprecated, for removal: This API element is subject to removal in a future version.
- 
getVersionpublic int getVersion()Deprecated, for removal: This API element is subject to removal in a future version.
- 
getPortableIdDeprecated, for removal: This API element is subject to removal in a future version.- Since:
- 5.4
 
 
-