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
public abstract class FSTBasicObjectSerializer extends java.lang.Object implements FSTCrossPlatformSerialzer
Created with IntelliJ IDEA.
User: ruedi
Date: 11.11.12
Time: 12:09
To change this template use File | Settings | File Templates.
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description protectedFSTBasicObjectSerializer() -
Method Summary
Modifier and Type Method Description booleanalwaysCopy()java.lang.Objectinstantiate(java.lang.Class objectClass, FSTObjectInput in, FSTClazzInfo serializationInfo, FSTClazzInfo.FSTFieldInfo referencee, int streamPosition)return null to delegate object instantiation to FST.voidreadObject(FSTObjectInput in, java.lang.Object toRead, FSTClazzInfo clzInfo, FSTClazzInfo.FSTFieldInfo referencedBy)read the content to an already instantiated objectbooleanwillHandleClass(java.lang.Class cl)useful if you register for a class and its subclasses, but want to exclude a specific subclassbooleanwriteTupleEnd()
-
Constructor Details
-
FSTBasicObjectSerializer
protected FSTBasicObjectSerializer()
-
-
Method Details
-
willHandleClass
public boolean willHandleClass(java.lang.Class cl)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, java.lang.Object toRead, FSTClazzInfo clzInfo, FSTClazzInfo.FSTFieldInfo referencedBy) throws java.lang.ExceptionDescription copied from interface:FSTObjectSerializerread the content to an already instantiated object- Specified by:
readObjectin interfaceFSTObjectSerializer- Throws:
java.lang.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 java.lang.Object instantiate(java.lang.Class objectClass, FSTObjectInput in, FSTClazzInfo serializationInfo, FSTClazzInfo.FSTFieldInfo referencee, int streamPosition) throws java.lang.ExceptionDescription 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:
java.lang.Exception
-
writeTupleEnd
public boolean writeTupleEnd()- Specified by:
writeTupleEndin interfaceFSTCrossPlatformSerialzer
-