public class MarshallerContextImpl extends Object implements MarshallerContext
| Constructor and Description |
|---|
MarshallerContextImpl(Collection<PluginProvider> plugins)
Initializes context.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkHasClassName(String clsName,
ClassLoader ldr,
String fileName) |
Iterator<Map.Entry<Byte,Map<Integer,String>>> |
currentMappings()
Method collects current mappings for all platforms.
|
ArrayList<Map<Integer,MappedName>> |
getCachedMappings() |
Class |
getClass(int typeId,
ClassLoader ldr)
Gets class for provided type ID.
|
String |
getClassName(byte platformId,
int typeId)
Gets class name for provided (platformId, typeId) pair.
|
boolean |
isSystemType(String typeName)
Checks whether the given type is a system one - JDK class or Ignite class.
|
void |
onMappingAccepted(MarshallerMappingItem item) |
void |
onMappingDataReceived(byte platformId,
Map<Integer,MappedName> marshallerMappings) |
String |
onMappingProposed(MarshallerMappingItem item) |
void |
onMarshallerProcessorStarted(GridKernalContext ctx,
MarshallerMappingTransport transport) |
void |
onMarshallerProcessorStop() |
void |
onMissedMappingResolved(MarshallerMappingItem item,
String resolvedClsName) |
boolean |
registerClassName(byte platformId,
int typeId,
String clsName)
Registers class with provided type ID.
|
String |
resolveMissedMapping(byte platformId,
int typeId) |
public MarshallerContextImpl(@Nullable
Collection<PluginProvider> plugins)
plugins - Plugins.public ArrayList<Map<Integer,MappedName>> getCachedMappings()
public void onMappingDataReceived(byte platformId,
Map<Integer,MappedName> marshallerMappings)
platformId - Platform id.marshallerMappings - All marshaller mappings for given platformId.public void checkHasClassName(String clsName, ClassLoader ldr, String fileName)
clsName - Class name.ldr - Class loader used to get properties file.fileName - File name.public boolean registerClassName(byte platformId,
int typeId,
String clsName)
throws IgniteCheckedException
registerClassName in interface MarshallerContextplatformId - id of a platform to register class.typeId - Type ID.clsName - class name.IgniteCheckedException - In case of error.public String onMappingProposed(MarshallerMappingItem item)
item - type mapping to proposepublic void onMappingAccepted(MarshallerMappingItem item)
item - Item.public Class getClass(int typeId, ClassLoader ldr) throws ClassNotFoundException, IgniteCheckedException
getClass in interface MarshallerContexttypeId - Type ID.ldr - Class loader.ClassNotFoundException - If class was not found.IgniteCheckedException - In case of any other error.public String getClassName(byte platformId, int typeId) throws ClassNotFoundException, IgniteCheckedException
getClassName in interface MarshallerContextplatformId - id of a platform the class was registered for.typeId - Type ID.ClassNotFoundException - If class was not found.IgniteCheckedException - In case of any other error.public String resolveMissedMapping(byte platformId, int typeId)
platformId - Platform id.typeId - Type id.public void onMissedMappingResolved(MarshallerMappingItem item, String resolvedClsName)
item - Item.resolvedClsName - Resolved class name.public boolean isSystemType(String typeName)
isSystemType in interface MarshallerContexttypeName - Type name.true if the type is a system one, false otherwise.public void onMarshallerProcessorStarted(GridKernalContext ctx, MarshallerMappingTransport transport) throws IgniteCheckedException
ctx - Context.transport - Transport.IgniteCheckedExceptionpublic void onMarshallerProcessorStop()
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017