public class BinaryContext extends Object
| Constructor and Description |
|---|
BinaryContext(BinaryMetadataHandler metaHnd,
IgniteConfiguration igniteCfg,
IgniteLogger log) |
| Modifier and Type | Method and Description |
|---|---|
static String |
affinityFieldName(Class cls) |
String |
affinityKeyFieldName(int typeId)
Get affinity key field name for type.
|
byte |
collectionType(Class<? extends Collection> cls) |
IgniteConfiguration |
configuration() |
void |
configure(BinaryMarshaller marsh,
IgniteConfiguration cfg) |
BinaryFieldImpl |
createField(int typeId,
String fieldName)
Create binary field.
|
static BinaryIdMapper |
defaultIdMapper() |
static BinaryInternalMapper |
defaultMapper() |
static BinaryNameMapper |
defaultNameMapper() |
BinaryClassDescriptor |
descriptorForClass(Class<?> cls,
boolean deserialize) |
BinaryClassDescriptor |
descriptorForTypeId(boolean userType,
int typeId,
ClassLoader ldr,
boolean deserialize) |
int |
fieldId(int typeId,
String fieldName) |
BinaryIdentityResolver |
identity(int typeId) |
boolean |
isCompactFooter() |
IgniteLogger |
log() |
byte |
mapType(Class<? extends Map> cls) |
BinaryMarshaller |
marshaller() |
BinaryType |
metadata(int typeId) |
BinaryType |
metadata(int typeId,
int schemaId) |
BinaryMetadata |
metadata0(int typeId) |
boolean |
mustDeserialize(Class cls)
Check whether class must be deserialized anyway.
|
void |
onUndeploy(ClassLoader ldr)
Undeployment callback invoked when class loader is being undeployed.
|
BinaryClassDescriptor |
registerPredefinedType(Class<?> cls,
int id) |
BinaryClassDescriptor |
registerPredefinedType(Class<?> cls,
int id,
String affFieldName,
boolean registered) |
void |
registerUserType(String clsName,
BinaryInternalMapper mapper,
BinarySerializer serializer,
BinaryIdentityResolver identity,
String affKeyFieldName,
boolean isEnum,
Map<String,Integer> enumMap) |
BinarySchemaRegistry |
schemaRegistry(int typeId)
Get schema registry for type ID.
|
int |
typeId(String typeName) |
void |
unregisterBinarySchemas()
Unregister all binary schemas.
|
void |
updateMetadata(int typeId,
BinaryMetadata meta) |
String |
userTypeName(String clsName) |
public BinaryContext(BinaryMetadataHandler metaHnd, IgniteConfiguration igniteCfg, IgniteLogger log)
metaHnd - Meta data handler.igniteCfg - Ignite configuration.log - Logger.public IgniteLogger log()
public BinaryMarshaller marshaller()
public boolean mustDeserialize(Class cls)
cls - Class.True if must be deserialized.public IgniteConfiguration configuration()
public void configure(BinaryMarshaller marsh, IgniteConfiguration cfg) throws BinaryObjectException
marsh - Binary marshaller.cfg - Configuration.BinaryObjectException - In case of error.public static BinaryInternalMapper defaultMapper()
public static BinaryIdMapper defaultIdMapper()
public static BinaryNameMapper defaultNameMapper()
public BinaryClassDescriptor descriptorForClass(Class<?> cls, boolean deserialize) throws BinaryObjectException
cls - Class.BinaryObjectException - In case of error.public BinaryClassDescriptor descriptorForTypeId(boolean userType, int typeId, ClassLoader ldr, boolean deserialize)
userType - User type or not.typeId - Type ID.ldr - Class loader.public byte collectionType(Class<? extends Collection> cls)
cls - Collection class.public byte mapType(Class<? extends Map> cls)
cls - Map class.public int typeId(String typeName)
typeName - Type name.public int fieldId(int typeId,
String fieldName)
typeId - Type ID.fieldName - Field name.public String userTypeName(String clsName)
clsName - Class name.public static String affinityFieldName(Class cls)
cls - Class to get affinity field for.null if field name was not found.public BinaryClassDescriptor registerPredefinedType(Class<?> cls, int id)
cls - Class.id - Type ID.public BinaryClassDescriptor registerPredefinedType(Class<?> cls, int id, String affFieldName, boolean registered)
cls - Class.id - Type ID.affFieldName - Affinity field name.public void registerUserType(String clsName, BinaryInternalMapper mapper, @Nullable BinarySerializer serializer, @Nullable BinaryIdentityResolver identity, @Nullable String affKeyFieldName, boolean isEnum, @Nullable Map<String,Integer> enumMap) throws BinaryObjectException
clsName - Class name.mapper - ID mapper.serializer - Serializer.identity - Type identity.affKeyFieldName - Affinity key field name.isEnum - If enum.enumMap - Enum name to ordinal mapping.BinaryObjectException - In case of error.public BinaryFieldImpl createField(int typeId, String fieldName)
typeId - Type ID.fieldName - Field name.@Nullable public BinaryType metadata(int typeId) throws BinaryObjectException
typeId - Type ID.BinaryObjectException - In case of error.@Nullable public BinaryMetadata metadata0(int typeId) throws BinaryObjectException
typeId - Type IDBinaryObjectException - In case of error.public BinaryType metadata(int typeId, int schemaId) throws BinaryObjectException
typeId - Type ID.schemaId - Schema ID.BinaryObjectException - In case of error.public String affinityKeyFieldName(int typeId)
typeId - Type ID.public BinaryIdentityResolver identity(int typeId)
typeId - Type ID.public void updateMetadata(int typeId,
BinaryMetadata meta)
throws BinaryObjectException
typeId - Type ID.meta - Meta data.BinaryObjectException - In case of error.public boolean isCompactFooter()
public BinarySchemaRegistry schemaRegistry(int typeId)
typeId - Type ID.public void unregisterBinarySchemas()
public void onUndeploy(ClassLoader ldr)
ldr - Class loader being undeployed.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.1.0 Release Date : July 20 2017