public class PortableContext extends Object implements Externalizable
| Constructor and Description |
|---|
PortableContext()
For
Externalizable. |
PortableContext(BinaryMetadataHandler metaHnd,
IgniteConfiguration igniteCfg) |
| Modifier and Type | Method and Description |
|---|---|
String |
affinityKeyFieldName(int typeId) |
byte |
collectionType(Class<? extends Collection> cls) |
void |
configure(BinaryMarshaller marsh,
IgniteConfiguration cfg) |
BinaryFieldImpl |
createField(int typeId,
String fieldName)
Create binary field.
|
PortableClassDescriptor |
descriptorForClass(Class<?> cls,
boolean deserialize) |
PortableClassDescriptor |
descriptorForTypeId(boolean userType,
int typeId,
ClassLoader ldr,
boolean deserialize) |
int |
fieldId(int typeId,
String fieldName) |
boolean |
isCompactFooter() |
byte |
mapType(Class<? extends Map> cls) |
BinaryMarshaller |
marshaller() |
BinaryType |
metadata(int typeId) |
void |
onUndeploy(ClassLoader ldr)
Undeployment callback invoked when class loader is being undeployed.
|
void |
readExternal(ObjectInput in) |
protected Object |
readResolve() |
PortableClassDescriptor |
registerPredefinedType(Class<?> cls,
int id) |
void |
registerUserType(String clsName,
BinaryIdMapper idMapper,
BinarySerializer serializer,
String affKeyFieldName,
boolean isEnum) |
PortableSchemaRegistry |
schemaRegistry(int typeId)
Get schema registry for type ID.
|
int |
typeId(String typeName) |
static String |
typeName(String clsName) |
void |
updateMetadata(int typeId,
BinaryMetadata meta) |
BinaryIdMapper |
userTypeIdMapper(int typeId) |
void |
writeExternal(ObjectOutput out) |
public PortableContext()
Externalizable.public PortableContext(BinaryMetadataHandler metaHnd, IgniteConfiguration igniteCfg)
metaHnd - Meta data handler.igniteCfg - Ignite configuration.public BinaryMarshaller marshaller()
public void configure(BinaryMarshaller marsh, IgniteConfiguration cfg) throws BinaryObjectException
marsh - Portable marshaller.BinaryObjectException - In case of error.public PortableClassDescriptor descriptorForClass(Class<?> cls, boolean deserialize) throws BinaryObjectException
cls - Class.BinaryObjectException - In case of error.public PortableClassDescriptor 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 BinaryIdMapper userTypeIdMapper(int typeId)
typeId - Type ID.public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionprotected Object readResolve() throws ObjectStreamException
ObjectStreamException - In case of error.public PortableClassDescriptor registerPredefinedType(Class<?> cls, int id)
cls - Class.id - Type ID.public void registerUserType(String clsName, BinaryIdMapper idMapper, @Nullable BinarySerializer serializer, @Nullable String affKeyFieldName, boolean isEnum) throws BinaryObjectException
clsName - Class name.idMapper - ID mapper.serializer - Serializer.affKeyFieldName - Affinity key field name.isEnum - If enum.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.public String affinityKeyFieldName(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 PortableSchemaRegistry schemaRegistry(int typeId)
typeId - Type ID.public static String typeName(String clsName)
clsName - Class name.public void onUndeploy(ClassLoader ldr)
ldr - Class loader being undeployed.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.5.0-b1 Release Date : December 1 2015