Package org.nustaq.serialization
Class FSTClazzNameRegistry
java.lang.Object
org.nustaq.serialization.FSTClazzNameRegistry
Created with IntelliJ IDEA.
User: ruedi
Date: 10.11.12
Time: 00:34
maps classnames => id and vice versa.
FSTConfiguration holds a parent containing default mappings (e.g. created by
registerClass ). A stream instance then creates a temporary instance to record/id encode
classes dynamically during serialization. This way a class name is only written once per
object graph.
This class is thread safe,
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addClassMapping
(Class c, int id, FSTClazzInfo clInfo, FSTConfiguration conf) classForName
(String clName, FSTConfiguration conf) void
clear()
decodeClass
(FSTDecoder in, FSTConfiguration conf) void
encodeClass
(FSTEncoder out, Class c) void
encodeClass
(FSTEncoder out, FSTClazzInfo ci) getClazzFromId
(int c) int
void
registerClass
(Class c, int code, FSTConfiguration conf) void
registerClass
(Class c, FSTConfiguration conf) void
-
Field Details
-
LOWEST_CLZ_ID
public static final int LOWEST_CLZ_ID- See Also:
-
FIRST_USER_CLZ_ID
public static final int FIRST_USER_CLZ_ID- See Also:
-
-
Constructor Details
-
FSTClazzNameRegistry
-
-
Method Details
-
clear
public void clear() -
registerClass
-
registerClass
-
addClassMapping
-
getIdFromClazz
-
encodeClass
- Throws:
IOException
-
encodeClass
- Throws:
IOException
-
decodeClass
public FSTClazzInfo decodeClass(FSTDecoder in, FSTConfiguration conf) throws IOException, ClassNotFoundException - Throws:
IOException
ClassNotFoundException
-
classForName
- Throws:
ClassNotFoundException
-
registerClazzFromOtherLoader
-
getClazzFromId
-