public class BinaryMetadata extends Object implements Externalizable
| Constructor and Description |
|---|
BinaryMetadata()
For
Externalizable. |
BinaryMetadata(int typeId,
String typeName,
@Nullable Map<String,BinaryFieldMetadata> fields,
@Nullable String affKeyFieldName,
@Nullable Collection<BinarySchema> schemas,
boolean isEnum,
@Nullable Map<String,Integer> enumMap)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
@Nullable String |
affinityKeyFieldName() |
Map<String,Integer> |
enumMap() |
Collection<String> |
fields() |
Map<String,BinaryFieldMetadata> |
fieldsMap() |
@Nullable String |
fieldTypeName(String fieldName) |
String |
getEnumNameByOrdinal(int ord)
Gets enum constant name given its ordinal value.
|
Integer |
getEnumOrdinalByName(String name)
Gets enum constant ordinal value given its name.
|
boolean |
hasSchema(int schemaId) |
boolean |
isEnum() |
void |
readExternal(ObjectInput in) |
void |
readFrom(DataInput in)
The object implements the readFrom method to restore its
contents by calling the methods of DataInput for primitive
types and strings or calling readExternal for other objects.
|
Collection<BinarySchema> |
schemas() |
String |
toString() |
int |
typeId() |
String |
typeName() |
BinaryTypeImpl |
wrap(BinaryContext ctx)
Wrap metadata into binary type.
|
void |
writeExternal(ObjectOutput out) |
void |
writeTo(DataOutput out)
The object implements the writeTo method to save its contents
by calling the methods of DataOutput for its primitive values and strings or
calling the writeTo method for other objects.
|
public BinaryMetadata()
Externalizable.public BinaryMetadata(int typeId,
String typeName,
@Nullable
@Nullable Map<String,BinaryFieldMetadata> fields,
@Nullable
@Nullable String affKeyFieldName,
@Nullable
@Nullable Collection<BinarySchema> schemas,
boolean isEnum,
@Nullable
@Nullable Map<String,Integer> enumMap)
typeId - Type ID.typeName - Type name.fields - Fields map.affKeyFieldName - Affinity key field name.schemas - Schemas.isEnum - Enum flag.enumMap - Enum name to ordinal mapping.public int typeId()
public String typeName()
public Collection<String> fields()
public Map<String,BinaryFieldMetadata> fieldsMap()
@Nullable public @Nullable String fieldTypeName(String fieldName)
fieldName - Field name.@Nullable public @Nullable String affinityKeyFieldName()
public Collection<BinarySchema> schemas()
public boolean hasSchema(int schemaId)
schemaId - Schema ID.true if BinaryMetadata instance has schema with ID specified, false otherwise.public boolean isEnum()
True if this is enum type.public BinaryTypeImpl wrap(BinaryContext ctx)
ctx - Binary context.public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void writeTo(DataOutput out) throws IOException
out - the stream to write the object to.IOException - Includes any I/O exceptions that may occur.public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic void readFrom(DataInput in) throws IOException
in - the stream to read data from in order to restore the object.IOException - if I/O errors occur.public String getEnumNameByOrdinal(int ord)
ord - Enum constant ordinal value.public Integer getEnumOrdinalByName(String name)
name - Enum constant name.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.15.0 Release Date : April 25 2023