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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleaninstantiate(Class objectClass, FSTObjectInput in, FSTClazzInfo serializationInfo, FSTClazzInfo.FSTFieldInfo referencee, int streamPosition) return null to delegate object instantiation to FST.voidreadObject(FSTObjectInput in, Object toRead, FSTClazzInfo clzInfo, FSTClazzInfo.FSTFieldInfo referencedBy) read the content to an already instantiated objectbooleanwillHandleClass(Class cl) useful if you register for a class and its subclasses, but want to exclude a specific subclassbooleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.nustaq.serialization.FSTObjectSerializer
writeObject
-
Constructor Details
-
FSTBasicObjectSerializer
protected FSTBasicObjectSerializer()
-
-
Method Details
-
willHandleClass
Description copied from interface:FSTObjectSerializeruseful if you register for a class and its subclasses, but want to exclude a specific subclass- Specified by:
willHandleClassin interfaceFSTObjectSerializer
-
readObject
public void readObject(FSTObjectInput in, Object toRead, FSTClazzInfo clzInfo, FSTClazzInfo.FSTFieldInfo referencedBy) throws Exception Description copied from interface:FSTObjectSerializerread the content to an already instantiated object- Specified by:
readObjectin interfaceFSTObjectSerializer- Throws:
Exception
-
alwaysCopy
public boolean alwaysCopy()- Specified by:
alwaysCopyin 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:FSTObjectSerializerreturn 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:
instantiatein interfaceFSTObjectSerializer- Throws:
Exception
-
writeTupleEnd
public boolean writeTupleEnd()- Specified by:
writeTupleEndin interfaceFSTCrossPlatformSerialzer
-