public final class ClassDefinitionBuilder extends Object
Constructor and Description |
---|
ClassDefinitionBuilder(int factoryId,
int classId)
IMPORTANT: It uses a default portableVersion (0) for non-versioned classes.
|
ClassDefinitionBuilder(int factoryId,
int classId,
int version)
IMPORTANT: Make sure that the version matches the portableVersion in the SerializationService
|
Modifier and Type | Method and Description |
---|---|
ClassDefinitionBuilder |
addBooleanArrayField(String fieldName) |
ClassDefinitionBuilder |
addBooleanField(String fieldName) |
ClassDefinitionBuilder |
addByteArrayField(String fieldName) |
ClassDefinitionBuilder |
addByteField(String fieldName) |
ClassDefinitionBuilder |
addCharArrayField(String fieldName) |
ClassDefinitionBuilder |
addCharField(String fieldName) |
ClassDefinitionBuilder |
addDateArrayField(String fieldName)
Adds an array of Date's to the class definition
|
ClassDefinitionBuilder |
addDateField(String fieldName)
Adds a date field consisting of year, month of the year and day of the month to the class definition
|
ClassDefinitionBuilder |
addDecimalArrayField(String fieldName)
Adds an array of Decimal's to the class definition
|
ClassDefinitionBuilder |
addDecimalField(String fieldName)
Adds a decimal which is arbitrary precision and scale floating-point number to the class definition
|
ClassDefinitionBuilder |
addDoubleArrayField(String fieldName) |
ClassDefinitionBuilder |
addDoubleField(String fieldName) |
void |
addField(com.hazelcast.internal.serialization.impl.portable.FieldDefinitionImpl fieldDefinition) |
ClassDefinitionBuilder |
addFloatArrayField(String fieldName) |
ClassDefinitionBuilder |
addFloatField(String fieldName) |
ClassDefinitionBuilder |
addIntArrayField(String fieldName) |
ClassDefinitionBuilder |
addIntField(String fieldName) |
ClassDefinitionBuilder |
addLongArrayField(String fieldName) |
ClassDefinitionBuilder |
addLongField(String fieldName) |
ClassDefinitionBuilder |
addPortableArrayField(String fieldName,
ClassDefinition classDefinition) |
ClassDefinitionBuilder |
addPortableField(String fieldName,
ClassDefinition def) |
ClassDefinitionBuilder |
addShortArrayField(String fieldName) |
ClassDefinitionBuilder |
addShortField(String fieldName) |
ClassDefinitionBuilder |
addStringArrayField(String fieldName) |
ClassDefinitionBuilder |
addStringField(String fieldName) |
ClassDefinitionBuilder |
addTimeArrayField(String fieldName)
Adds an array of Time's to the class definition
|
ClassDefinitionBuilder |
addTimeField(String fieldName)
Adds a time field consisting of hour, minute, seconds and nanos parts to the class definition
|
ClassDefinitionBuilder |
addTimestampArrayField(String fieldName)
Adds an array of Timestamp's to the class definition
|
ClassDefinitionBuilder |
addTimestampField(String fieldName)
Adds a timestamp field consisting of
year, month of the year, day of the month, hour, minute, seconds, nanos parts to the class definition
|
ClassDefinitionBuilder |
addTimestampWithTimezoneArrayField(String fieldName)
Adds an array of TimestampWithTimezone's to the class definition
|
ClassDefinitionBuilder |
addTimestampWithTimezoneField(String fieldName)
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
|
ClassDefinitionBuilder |
addUTFArrayField(String fieldName)
Deprecated.
for the sake of better naming. Use
addStringArrayField(String) instead. |
ClassDefinitionBuilder |
addUTFField(String fieldName)
Deprecated.
for the sake of better naming. Use
addStringField(String) instead. |
ClassDefinition |
build() |
int |
getClassId() |
int |
getFactoryId() |
int |
getVersion() |
public ClassDefinitionBuilder(int factoryId, int classId)
factoryId
- factoryId to useclassId
- classId to usepublic ClassDefinitionBuilder(int factoryId, int classId, int version)
factoryId
- factoryId to useclassId
- classId to useversion
- portableVersion to use@Nonnull public ClassDefinitionBuilder addIntField(@Nonnull String fieldName)
fieldName
- name of the field that will be added to this class definitionHazelcastSerializationException
- if a field with same name already exists or
if this method is called after build()
@Nonnull public ClassDefinitionBuilder addLongField(@Nonnull String fieldName)
fieldName
- name of the field that will be added to this class definitionHazelcastSerializationException
- if a field with same name already exists or
if this method is called after build()
@Nonnull @Deprecated public ClassDefinitionBuilder addUTFField(@Nonnull String fieldName)
addStringField(String)
instead.fieldName
- name of the field that will be added to this class definitionHazelcastSerializationException
- if a field with same name already exists or
if this method is called after build()
@Nonnull public ClassDefinitionBuilder addStringField(@Nonnull String fieldName)
fieldName
- name of the field that will be added to this class definitionHazelcastSerializationException
- if a field with same name already exists or
if this method is called after build()
@Nonnull public ClassDefinitionBuilder addBooleanField(@Nonnull String fieldName)
fieldName
- name of the field that will be added to this class definitionHazelcastSerializationException
- if a field with same name already exists or
if this method is called after build()
@Nonnull public ClassDefinitionBuilder addByteField(@Nonnull String fieldName)
fieldName
- name of the field that will be added to this class definitionHazelcastSerializationException
- if a field with same name already exists or
if this method is called after build()
@Nonnull public ClassDefinitionBuilder addBooleanArrayField(@Nonnull String fieldName)
fieldName
- name of the field that will be added to this class definitionHazelcastSerializationException
- if a field with same name already exists or
if this method is called after build()
@Nonnull public ClassDefinitionBuilder addCharField(@Nonnull String fieldName)
fieldName
- name of the field that will be added to this class definitionHazelcastSerializationException
- if a field with same name already exists or
if this method is called after build()
@Nonnull public ClassDefinitionBuilder addDoubleField(@Nonnull String fieldName)
fieldName
- name of the field that will be added to this class definitionHazelcastSerializationException
- if a field with same name already exists or
if this method is called after build()
@Nonnull public ClassDefinitionBuilder addFloatField(@Nonnull String fieldName)
fieldName
- name of the field that will be added to this class definitionHazelcastSerializationException
- if a field with same name already exists or
if this method is called after build()
@Nonnull public ClassDefinitionBuilder addShortField(@Nonnull String fieldName)
fieldName
- name of the field that will be added to this class definitionHazelcastSerializationException
- if a field with same name already exists or
if this method is called after build()
@Nonnull public ClassDefinitionBuilder addDecimalField(@Nonnull String fieldName)
fieldName
- name of the field that will be added to this class definitionHazelcastSerializationException
- if a field with same name already exists or
if this method is called after build()
@Nonnull public ClassDefinitionBuilder addTimeField(@Nonnull String fieldName)
fieldName
- name of the field that will be added to this class definitionHazelcastSerializationException
- if a field with same name already exists or
if this method is called after build()
@Nonnull public ClassDefinitionBuilder addDateField(@Nonnull String fieldName)
fieldName
- name of the field that will be added to this class definitionHazelcastSerializationException
- if a field with same name already exists or
if this method is called after build()
@Nonnull public ClassDefinitionBuilder addTimestampField(@Nonnull String fieldName)
fieldName
- name of the field that will be added to this class definitionHazelcastSerializationException
- if a field with same name already exists or
if this method is called after build()
@Nonnull public ClassDefinitionBuilder addTimestampWithTimezoneField(@Nonnull String fieldName)
fieldName
- name of the field that will be added to this class definitionHazelcastSerializationException
- if a field with same name already exists or
if this method is called after build()
@Nonnull public ClassDefinitionBuilder addByteArrayField(@Nonnull String fieldName)
fieldName
- name of the field that will be added to this class definitionHazelcastSerializationException
- if a field with same name already exists or
if this method is called after build()
@Nonnull public ClassDefinitionBuilder addCharArrayField(@Nonnull String fieldName)
fieldName
- name of the field that will be added to this class definitionHazelcastSerializationException
- if a field with same name already exists or
if this method is called after build()
@Nonnull public ClassDefinitionBuilder addIntArrayField(@Nonnull String fieldName)
fieldName
- name of the field that will be added to this class definitionHazelcastSerializationException
- if a field with same name already exists or
if this method is called after build()
@Nonnull public ClassDefinitionBuilder addLongArrayField(@Nonnull String fieldName)
fieldName
- name of the field that will be added to this class definitionHazelcastSerializationException
- if a field with same name already exists or
if this method is called after build()
@Nonnull public ClassDefinitionBuilder addDoubleArrayField(@Nonnull String fieldName)
fieldName
- name of the field that will be added to this class definitionHazelcastSerializationException
- if a field with same name already exists or
if this method is called after build()
@Nonnull public ClassDefinitionBuilder addFloatArrayField(@Nonnull String fieldName)
fieldName
- name of the field that will be added to this class definitionHazelcastSerializationException
- if a field with same name already exists or
if this method is called after build()
@Nonnull public ClassDefinitionBuilder addShortArrayField(@Nonnull String fieldName)
fieldName
- name of the field that will be added to this class definitionHazelcastSerializationException
- if a field with same name already exists or
if this method is called after build()
@Nonnull @Deprecated public ClassDefinitionBuilder addUTFArrayField(@Nonnull String fieldName)
addStringArrayField(String)
instead.fieldName
- name of the field that will be added to this class definitionHazelcastSerializationException
- if a field with same name already exists or
if this method is called after build()
@Nonnull public ClassDefinitionBuilder addStringArrayField(@Nonnull String fieldName)
fieldName
- name of the field that will be added to this class definitionHazelcastSerializationException
- if a field with same name already exists or
if this method is called after build()
@Nonnull public ClassDefinitionBuilder addPortableField(@Nonnull String fieldName, ClassDefinition def)
fieldName
- name of the field that will be added to this class definitionHazelcastSerializationException
- if a field with same name already exists or
if this method is called after build()
@Nonnull public ClassDefinitionBuilder addPortableArrayField(@Nonnull String fieldName, ClassDefinition classDefinition)
fieldName
- name of the field that will be add to this class definitionclassDefinition
- class definition of the nested portable that will be add to this class definitionHazelcastSerializationException
- if a field with same name already exists or
if this method is called after build()
@Nonnull public ClassDefinitionBuilder addDecimalArrayField(@Nonnull String fieldName)
fieldName
- name of the field that will be added to this class definitionHazelcastSerializationException
- if a field with same name already exists or
if this method is called after build()
addDecimalField(String)
@Nonnull public ClassDefinitionBuilder addTimeArrayField(@Nonnull String fieldName)
fieldName
- name of the field that will be added to this class definitionHazelcastSerializationException
- if a field with same name already exists or
if this method is called after build()
addTimeField(String)
@Nonnull public ClassDefinitionBuilder addDateArrayField(@Nonnull String fieldName)
fieldName
- name of the field that will be added to this class definitionHazelcastSerializationException
- if a field with same name already exists or
if this method is called after build()
addDateField(String)
@Nonnull public ClassDefinitionBuilder addTimestampArrayField(@Nonnull String fieldName)
fieldName
- name of the field that will be added to this class definitionHazelcastSerializationException
- if a field with same name already exists or
if this method is called after build()
addTimestampField(String)
@Nonnull public ClassDefinitionBuilder addTimestampWithTimezoneArrayField(@Nonnull String fieldName)
fieldName
- name of the field that will be added to this class definitionHazelcastSerializationException
- if a field with same name already exists or
if this method is called after build()
addTimestampWithTimezoneField(String)
@PrivateApi public void addField(com.hazelcast.internal.serialization.impl.portable.FieldDefinitionImpl fieldDefinition)
@Nonnull public ClassDefinition build()
public int getFactoryId()
public int getClassId()
public int getVersion()
Copyright © 2023 Hazelcast, Inc.. All rights reserved.