ClassDefinition defines a class schema for Portable classes.
More...
#include <ClassDefinition.h>
ClassDefinition defines a class schema for Portable classes.
It allows to query field names, types, class id etc. It can be created manually using ClassDefinitionBuilder or on demand during serialization phase.
- See also
- Portable
-
ClassDefinitionBuilder
hazelcast::client::serialization::ClassDefinition::ClassDefinition |
( |
int |
factoryId, |
|
|
int |
classId, |
|
|
int |
version |
|
) |
| |
Constructor.
- Parameters
-
factoryId | factory id of class |
classId | id of class |
version | version of portable class |
void hazelcast::client::serialization::ClassDefinition::addFieldDef |
( |
FieldDefinition & |
fieldDefinition | ) |
|
Internal API.
- Parameters
-
fieldDefinition | to be added |
int hazelcast::client::serialization::ClassDefinition::getClassId |
( |
| ) |
const |
int hazelcast::client::serialization::ClassDefinition::getFactoryId |
( |
| ) |
const |
const FieldDefinition & hazelcast::client::serialization::ClassDefinition::getField |
( |
const char * |
fieldName | ) |
const |
- Parameters
-
fieldName | name of the field |
- Returns
- field definition by given name
- Exceptions
-
IllegalArgumentException | when field not found |
int hazelcast::client::serialization::ClassDefinition::getFieldCount |
( |
| ) |
const |
FieldType hazelcast::client::serialization::ClassDefinition::getFieldType |
( |
const char * |
fieldName | ) |
const |
- Parameters
-
fieldName | name of the field |
- Returns
- type of given field
- Exceptions
-
int hazelcast::client::serialization::ClassDefinition::getVersion |
( |
| ) |
const |
bool hazelcast::client::serialization::ClassDefinition::hasField |
( |
char const * |
fieldName | ) |
const |
- Parameters
-
- Returns
- true if this class definition contains a field named by given name
void hazelcast::client::serialization::ClassDefinition::readData |
( |
pimpl::DataInput & |
dataInput | ) |
|
void hazelcast::client::serialization::ClassDefinition::setVersionIfNotSet |
( |
int |
version | ) |
|
void hazelcast::client::serialization::ClassDefinition::writeData |
( |
pimpl::DataOutput & |
dataOutput | ) |
|
The documentation for this class was generated from the following files:
- hazelcast/include/hazelcast/client/serialization/ClassDefinition.h
- hazelcast/src/hazelcast/client/serialization/ClassDefinition.cpp