Class BinaryTypeImpl
- java.lang.Object
-
- org.apache.ignite.internal.binary.BinaryTypeImpl
-
- All Implemented Interfaces:
BinaryType
public class BinaryTypeImpl extends Object implements BinaryType
Binary type implementation.
-
-
Constructor Summary
Constructors Constructor Description BinaryTypeImpl(BinaryContext ctx, BinaryMetadata meta)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringaffinityKeyFieldName()Binary objects can optionally specify custom key-affinity mapping in the configuration.BinaryContextcontext()Collection<BinaryObject>enumValues()BinaryFieldImplfield(String fieldName)GetBinaryFieldfor the given field name.Collection<String>fieldNames()Gets collection of all field names for this binary type.StringfieldTypeName(String fieldName)Gets name of the field type for a given field.booleanisEnum()Check whether type represents enum or not.BinaryMetadatametadata()StringtoString()inttypeId()Gets binary type ID.StringtypeName()Gets binary type name.
-
-
-
Constructor Detail
-
BinaryTypeImpl
public BinaryTypeImpl(BinaryContext ctx, BinaryMetadata meta)
Constructor.- Parameters:
ctx- Binary context.meta- Type metadata.
-
-
Method Detail
-
typeName
public String typeName()
Gets binary type name.- Specified by:
typeNamein interfaceBinaryType- Returns:
- Binary type name.
-
typeId
public int typeId()
Gets binary type ID.- Specified by:
typeIdin interfaceBinaryType- Returns:
- Binary type ID.
-
fieldNames
public Collection<String> fieldNames()
Gets collection of all field names for this binary type.- Specified by:
fieldNamesin interfaceBinaryType- Returns:
- Collection of all field names for this binary type.
-
fieldTypeName
public String fieldTypeName(String fieldName)
Gets name of the field type for a given field.- Specified by:
fieldTypeNamein interfaceBinaryType- Parameters:
fieldName- Field name.- Returns:
- Field type name.
-
field
public BinaryFieldImpl field(String fieldName)
GetBinaryFieldfor the given field name. Later this field can be used for fast field's value retrieval from concreteBinaryObject.- Specified by:
fieldin interfaceBinaryType- Parameters:
fieldName- Field name.- Returns:
- Binary field.
-
affinityKeyFieldName
public String affinityKeyFieldName()
Binary objects can optionally specify custom key-affinity mapping in the configuration. This method returns the name of the field which should be used for the key-affinity mapping.- Specified by:
affinityKeyFieldNamein interfaceBinaryType- Returns:
- Affinity key field name.
-
isEnum
public boolean isEnum()
Check whether type represents enum or not.- Specified by:
isEnumin interfaceBinaryType- Returns:
Trueif type is enum.
-
enumValues
public Collection<BinaryObject> enumValues()
- Specified by:
enumValuesin interfaceBinaryType- Returns:
- Collection of enum values.
-
context
public BinaryContext context()
- Returns:
- Context.
-
metadata
public BinaryMetadata metadata()
- Returns:
- Metadata.
-
-