Package org.nustaq.serialization
Class FSTBasicObjectSerializer
java.lang.Object
org.nustaq.serialization.FSTBasicObjectSerializer
- All Implemented Interfaces:
FSTCrossPlatformSerialzer
,FSTObjectSerializer
- Direct Known Subclasses:
FSTArrayListSerializer
,FSTBigIntegerSerializer
,FSTBigNumberSerializers.FSTByteSerializer
,FSTBigNumberSerializers.FSTCharSerializer
,FSTBigNumberSerializers.FSTDoubleSerializer
,FSTBigNumberSerializers.FSTFloatSerializer
,FSTBigNumberSerializers.FSTShortSerializer
,FSTBitSetSerializer
,FSTClassSerializer
,FSTCollectionSerializer
,FSTCPEnumSetSerializer
,FSTCPThrowableSerializer
,FSTDateSerializer
,FSTEnumSetSerializer
,FSTJSonSerializers.BigDecSerializer
,FSTMapSerializer
,FSTProxySerializer
,FSTStringBufferSerializer
,FSTStringSerializer
,FSTThrowableSerializer
,FSTTimestampSerializer
Created with IntelliJ IDEA.
User: ruedi
Date: 11.11.12
Time: 12:09
To change this template use File | Settings | File Templates.
-
Field Summary
Fields inherited from interface org.nustaq.serialization.FSTObjectSerializer
REALLY_NULL
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
instantiate
(Class objectClass, FSTObjectInput in, FSTClazzInfo serializationInfo, FSTClazzInfo.FSTFieldInfo referencee, int streamPosition) return null to delegate object instantiation to FST.void
readObject
(FSTObjectInput in, Object toRead, FSTClazzInfo clzInfo, FSTClazzInfo.FSTFieldInfo referencedBy) read the content to an already instantiated objectboolean
willHandleClass
(Class cl) useful if you register for a class and its subclasses, but want to exclude a specific subclassboolean
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.nustaq.serialization.FSTObjectSerializer
writeObject
-
Constructor Details
-
FSTBasicObjectSerializer
protected FSTBasicObjectSerializer()
-
-
Method Details
-
willHandleClass
Description copied from interface:FSTObjectSerializer
useful if you register for a class and its subclasses, but want to exclude a specific subclass- Specified by:
willHandleClass
in interfaceFSTObjectSerializer
-
readObject
public void readObject(FSTObjectInput in, Object toRead, FSTClazzInfo clzInfo, FSTClazzInfo.FSTFieldInfo referencedBy) throws Exception Description copied from interface:FSTObjectSerializer
read the content to an already instantiated object- Specified by:
readObject
in interfaceFSTObjectSerializer
- Throws:
Exception
-
alwaysCopy
public boolean alwaysCopy()- Specified by:
alwaysCopy
in interfaceFSTObjectSerializer
- Returns:
- true if FST can skip a search for same instances in the serialized ObjectGraph. This speeds up reading and writing and makes sense for short immutable such as Integer, Short, Character, Date, .. . For those classes it is more expensive (CPU, size) to do a lookup than to just write the Object twice in case.
-
instantiate
public Object instantiate(Class objectClass, FSTObjectInput in, FSTClazzInfo serializationInfo, FSTClazzInfo.FSTFieldInfo referencee, int streamPosition) throws Exception Description copied from interface:FSTObjectSerializer
return null to delegate object instantiation to FST. If you want to implement object instantiation yourself, usually you leave the readObject method empty and handle instantiation and reading the object here. You must call registerObjectForWrite immediately after creating it on the FSTObjectInput- Specified by:
instantiate
in interfaceFSTObjectSerializer
- Throws:
Exception
-
writeTupleEnd
public boolean writeTupleEnd()- Specified by:
writeTupleEnd
in interfaceFSTCrossPlatformSerialzer
-