@NotStorableClass public abstract class AbstractObjectOutput extends Object implements IObjectOutput
| Modifier and Type | Field and Description |
|---|---|
protected ClassInfoFactory |
classInfoFactory |
protected HelperBinaryConversion |
helperBinaryConversion |
protected static HelperReflect |
helperReflect |
protected JoafipLogger |
logger |
protected static ObjectClassInfoAndDeclared[] |
NO_SOONS |
protected IObjectIOManagerForObjectIO |
objectIOManager |
protected IProxyManagerForObjectIO |
proxyManager2 |
| Constructor and Description |
|---|
AbstractObjectOutput(IObjectIOManagerForObjectIO objectIOManager,
ClassInfoFactory classInfoFactory,
IProxyManagerForObjectIO proxyManager2,
HelperBinaryConversion helperBinaryConversion) |
| Modifier and Type | Method and Description |
|---|---|
int |
byteSize(ObjectAndPersistInfo objectAndItsClassInfo,
int headerDataSize)
compute bytes needs to store an object state for a class
it is number of byte to store object state + bytes to store object class identifier |
protected int |
byteSizeForFieldOrElement(ClassInfo typeInfo) |
protected void |
computeReferenceChangeList(ObjectAndPersistInfo objectAndPersistInfo) |
protected ObjectClassInfoAndDeclared[] |
currentValuesToReferencedSoon(ObjectAndPersistInfo objectAndPersistInfo) |
IObjectIOManagerForObjectIO |
getObjectIOManager() |
boolean |
isGenericValueChanged(ObjectAndPersistInfo objectAndPersistInfo)
test if value changed
also compute reference change list |
abstract int |
numberOfByteForData(ObjectAndPersistInfo objectAndItsClassInfo)
obtains the number of bytes need to store object state
|
void |
setGarbageManagement(boolean garbageManagement) |
protected void |
setReferenceChangeListForGeneric(ObjectAndPersistInfo objectAndItsClassInfo)
compute reference change list for new object
|
ObjectClassInfoAndDeclared[] |
willNotBeWrote(ObjectAndPersistInfo objectAndPersistInfo) |
protected abstract ObjectClassInfoAndDeclared[] |
willNotBeWroteImpl(ObjectAndPersistInfo objectAndPersistInfo) |
ObjectClassInfoAndDeclared[] |
writeBody(byte[] binary,
int bodyBeginOffset,
ObjectAndPersistInfo objectAndPersistInfo,
boolean updateOriginalValue)
write body: body is data after number of link that represent object state
|
protected abstract ObjectClassInfoAndDeclared[] |
writeBodyAndItsHeader(byte[] binary,
int bodyBeginOffset,
ObjectAndPersistInfo objectAndItsClassInfo,
boolean updateOriginalValue) |
ObjectClassInfoAndDeclared[] |
writeCurrentValue(byte[] binary,
int fieldBeginOffset,
ObjectAndPersistInfo objectAndPersistInfo,
boolean updateOriginalValue) |
protected int |
writeSignature(byte[] binary,
int signatureBeginOffset,
ClassInfo classInfo)
check signature according off object class
|
protected int |
writeStaticFieldSignature(byte[] binary,
int signatureBeginOffset,
ClassInfo classInfo) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisValueChanged, prepareWrite, setReferenceChangeListForNewObjectprotected final JoafipLogger logger
protected static final ObjectClassInfoAndDeclared[] NO_SOONS
protected final ClassInfoFactory classInfoFactory
protected final HelperBinaryConversion helperBinaryConversion
protected static final HelperReflect helperReflect
protected final IObjectIOManagerForObjectIO objectIOManager
protected final IProxyManagerForObjectIO proxyManager2
public AbstractObjectOutput(IObjectIOManagerForObjectIO objectIOManager, ClassInfoFactory classInfoFactory, IProxyManagerForObjectIO proxyManager2, HelperBinaryConversion helperBinaryConversion)
public void setGarbageManagement(boolean garbageManagement)
setGarbageManagement in interface IObjectOutputpublic IObjectIOManagerForObjectIO getObjectIOManager()
public int byteSize(ObjectAndPersistInfo objectAndItsClassInfo, int headerDataSize) throws ObjectIOException, ObjectIOInvalidClassException, ObjectIONotSerializableException, ObjectIODataRecordNotFoundException, ObjectIOClassNotFoundException, ObjectIODataCorruptedException
IObjectOutputbyteSize in interface IObjectOutputobjectAndItsClassInfo - the objectObjectIOException - data to store size errorObjectIOInvalidClassExceptionObjectIONotSerializableExceptionObjectIODataRecordNotFoundExceptionObjectIOClassNotFoundExceptionObjectIODataCorruptedExceptionpublic abstract int numberOfByteForData(ObjectAndPersistInfo objectAndItsClassInfo) throws ObjectIOException, ObjectIOInvalidClassException, ObjectIONotSerializableException, ObjectIODataRecordNotFoundException, ObjectIOClassNotFoundException, ObjectIODataCorruptedException
objectAndItsClassInfo - the objectObjectIOExceptionObjectIONotSerializableExceptionObjectIOInvalidClassExceptionObjectIODataCorruptedExceptionObjectIOClassNotFoundExceptionObjectIODataRecordNotFoundExceptionpublic ObjectClassInfoAndDeclared[] writeBody(byte[] binary, int bodyBeginOffset, ObjectAndPersistInfo objectAndPersistInfo, boolean updateOriginalValue) throws ObjectIOException, ObjectIOInvalidClassException, ObjectIONotSerializableException, ObjectIODataCorruptedException
IObjectOutputwriteBody in interface IObjectOutputbinary - binary data of data record associated to objectbodyBeginOffset - offset in binary data of begin of body, it is the header data
sizeobjectAndPersistInfo - the object which for state is to writeupdateOriginalValue - true if set original value to current value ( true only when
serialization is done to update heap file )ObjectIOExceptionObjectIOInvalidClassExceptionObjectIONotSerializableExceptionObjectIODataCorruptedExceptionpublic ObjectClassInfoAndDeclared[] willNotBeWrote(ObjectAndPersistInfo objectAndPersistInfo) throws ObjectIOException
willNotBeWrote in interface IObjectOutputobjectAndPersistInfo - the object which for state will not be wroteObjectIOExceptionprotected abstract ObjectClassInfoAndDeclared[] willNotBeWroteImpl(ObjectAndPersistInfo objectAndPersistInfo) throws ObjectIOException
ObjectIOExceptionprotected abstract ObjectClassInfoAndDeclared[] writeBodyAndItsHeader(byte[] binary, int bodyBeginOffset, ObjectAndPersistInfo objectAndItsClassInfo, boolean updateOriginalValue) throws ObjectIOException, ObjectIODataCorruptedException, ObjectIOInvalidClassException, ObjectIONotSerializableException
binary - binary data of data record associated to objectbodyBeginOffset - offset in binary data of begin of bodyobjectAndItsClassInfo - the object which for state is to writeupdateOriginalValue - true if set original value to current value ( true only when
serialization is done to update heap file )ObjectIOExceptionObjectIODataCorruptedExceptionObjectIOInvalidClassExceptionObjectIONotSerializableExceptionprotected int byteSizeForFieldOrElement(ClassInfo typeInfo)
typeInfo - the field type or component typeprotected int writeSignature(byte[] binary,
int signatureBeginOffset,
ClassInfo classInfo)
throws ObjectIOException
binary - binary data to write tosignatureBeginOffset - signature offset in binary dataclassInfo - class information of object used for signatureObjectIOExceptionprotected int writeStaticFieldSignature(byte[] binary,
int signatureBeginOffset,
ClassInfo classInfo)
throws ObjectIOException
ObjectIOExceptionpublic ObjectClassInfoAndDeclared[] writeCurrentValue(byte[] binary, int fieldBeginOffset, ObjectAndPersistInfo objectAndPersistInfo, boolean updateOriginalValue) throws ObjectIOException, ObjectIODataCorruptedException
binary - binary data of data record associated to objectfieldBeginOffset - offset in binary data of begin of bodyobjectAndPersistInfo - the object which for state is to writeupdateOriginalValue - true if set original value to current value ( true only when
serialization is done to update heap file )ObjectIOExceptionObjectIODataCorruptedExceptionpublic boolean isGenericValueChanged(ObjectAndPersistInfo objectAndPersistInfo) throws ObjectIOException
objectAndPersistInfo - ObjectIOExceptionprotected void computeReferenceChangeList(ObjectAndPersistInfo objectAndPersistInfo) throws ObjectIOException
ObjectIOExceptionprotected void setReferenceChangeListForGeneric(ObjectAndPersistInfo objectAndItsClassInfo) throws ObjectIOException
objectAndItsClassInfo - ObjectIOExceptionprotected ObjectClassInfoAndDeclared[] currentValuesToReferencedSoon(ObjectAndPersistInfo objectAndPersistInfo) throws ObjectIOException
ObjectIOExceptionCopyright © 2007-2012 Luc Peuvrier. All Rights Reserved.