@NotStorableClass public class SerializerObjectIOManager extends AbstractObjectIOManagerIOForObject
classNameManager, currentDataModelIdentifier, HEADER_DATA_SIZE, helperBinaryConversion, helperReflect, logger, OBJECT_MUST_HAVE_DATA_RECORD_IDENTIFIER_SET, objectInputEnum, objectOutputsclassInfoFactory| Constructor and Description |
|---|
SerializerObjectIOManager(int currentDataModelIdentifier,
IClassNameManager classNameManager,
ClassInfoFactory classInfoFactory,
HelperBinaryConversion helperBinaryConversion,
IProxyManagerForObjectIO proxyManager) |
| Modifier and Type | Method and Description |
|---|---|
protected DataRecordIdentifier |
associateNewDataRecordIdentifierToObject(ObjectAndPersistInfo objectAndPersistInfo) |
protected void |
checkForAutoSave() |
protected void |
clearObjectAndPersistInfoByDataRecordIdentifier(DataRecordIdentifier identifier) |
protected ObjectAndPersistInfo |
createObjectAndPersistInfoOfObjectImpl(Object object,
boolean proxyInstance,
ClassInfo objectClassInfo) |
ObjectAndPersistInfo |
createObjectReadingInStoreOrGetExisting(DataRecordIdentifier dataRecordIdentifier,
boolean notLazy)
override to force not lazy mode
|
protected ObjectAndPersistInfo |
createSubstitutedObjectAndPersistInfoOfObjectImpl(Object object,
ClassInfo objectClassInfo,
ObjectAndPersistInfo substituteObjectAndPersistInfo) |
void |
dataRecordIdentifierAssociatedToObjectSetted(ObjectAndPersistInfo objectAndItsClassInfo)
action after set the data record identifier of an object
|
long |
getCurrentFileAccessSessionIdentifier() |
protected byte[] |
getDataOfDataRecord(DataRecordIdentifier dataRecordIdentifier)
get data of data record for an identifier
|
ObjectAndPersistInfo |
getObjectAndPersistInfoOfObject(Object object) |
ObjectAndPersistInfo |
getObjectByIdentifier(DataRecordIdentifier identifier)
to obtains object and persist information for data record by data record
identifier
public for tests |
JoafipMutex |
getStoreMutex()
get the mutex for storage file access
|
boolean |
isAutoSaveEnabled() |
boolean |
isExclusiveAccessSession()
not exclusive data access session for joafip serialization in one data
record
|
boolean |
isMaintainInMemoryEnabled()
not maintain in memory for joafip serialization in one data record
|
boolean |
isRunAutosaveEnableAndDisable() |
boolean |
isValueChanged(ObjectAndPersistInfo objectAndItsClassInfo)
always write
|
byte[] |
marshal(Object object) |
Set<ObjectAndPersistInfo> |
mostAccessedObject() |
protected void |
notToGarbage(DataRecordIdentifier dataRecordIdentifier,
ObjectAndPersistInfo objectAndPersistInfo)
no garbage management for serialization in one data record
|
boolean |
objectHasPersistenceState(ObjectAndPersistInfo objectAndPersistInfo) |
void |
objectIsAccessed(ObjectAndPersistInfo proxyObjectAndPersistInfo)
call when object is accessed
|
void |
setRunAutosaveEnable(boolean runAutosaveEnable) |
void |
setStoreOnlyMarkedStorable(boolean storeOnlyMarkedStorable) |
Object |
unmarshal(byte[] data) |
void |
unsetProxyObjectState(ObjectAndPersistInfo objectAndItsClassInfo) |
ObjectClassInfoAndDeclared[] |
willNotBeWrote(ObjectAndPersistInfo objectAndItsClassInfo)
always write
|
protected void |
writeDataRecord(DataRecordIdentifier dataRecordIdentifier,
byte[] data) |
assertNotSubstituted, createObjectPersistInfoOfObject, createObjectPersistInfoOfObject, createObjectReadingInStore, createSubstituteObjectPersistInfoOfObject, deepCopy, getBodyDataFromRecord, getClassInfoFactory, getClassInfoInDataRecord, getCurrentDataModelIdentifier, getObjectInput, getObjectIOInputStream, getObjectIOOutputStream, getObjectLinkTreeNode, getObjectOutput, getOrCreateDataRecordIdentifierAssociatedToObject, getOrCreateObjectPersistInfoOfObject, getOrCreateObjectPersistInfoOfObject, getOrCreateObjectPersistInfoOfObject, getProxyManager2, getZipCompressionLevel, isProxyMode, newInstance, newInstance, newInstanceNoConstruction, newObjectLoaded, originalObjectAndPersistInfo, prepareWrite, reCreateObjectReadingInStore, reInitializeEnum, setInstanceFactory, setProxyMode, setProxyObjectState, setSpecificObjectIO, setZipCompressionLevel, substituteForWrite, substituteObject, writeaddObject, getKeptInMemorySubstituteObjectManager, isKeptInMemory, keptInMemoryoriginalObject, keptInMemorysubstituteObject, keyOfObjectpublic SerializerObjectIOManager(int currentDataModelIdentifier,
IClassNameManager classNameManager,
ClassInfoFactory classInfoFactory,
HelperBinaryConversion helperBinaryConversion,
IProxyManagerForObjectIO proxyManager)
throws ObjectIOException
ObjectIOExceptionpublic void setStoreOnlyMarkedStorable(boolean storeOnlyMarkedStorable)
public byte[] marshal(Object object) throws ObjectIOException, ObjectIODataCorruptedException, ObjectIOInvalidClassException, ObjectIONotSerializableException, ObjectIODataRecordNotFoundException, ObjectIOClassNotFoundException, ObjectIOTooBigForSerializationException
public Object unmarshal(byte[] data) throws ObjectIOException, ObjectIODataRecordNotFoundException, ObjectIOClassNotFoundException, ObjectIOInvalidClassException, ObjectIODataCorruptedException, ObjectIONotSerializableException
public ObjectAndPersistInfo createObjectReadingInStoreOrGetExisting(DataRecordIdentifier dataRecordIdentifier, boolean notLazy) throws ObjectIOException, ObjectIODataRecordNotFoundException, ObjectIOClassNotFoundException, ObjectIOInvalidClassException, ObjectIODataCorruptedException, ObjectIONotSerializableException
createObjectReadingInStoreOrGetExisting in interface IObjectIOManagerForObjectIOcreateObjectReadingInStoreOrGetExisting in class AbstractObjectIOManagerIOForObjectdataRecordIdentifier - identifier of data record associated to objectnotLazy - true if force not lazy modeObjectIOException - create object errorObjectIODataRecordNotFoundException - data record for object not foundObjectIOClassNotFoundExceptionObjectIOInvalidClassExceptionObjectIODataCorruptedExceptionObjectIONotSerializableExceptionpublic ObjectAndPersistInfo getObjectByIdentifier(DataRecordIdentifier identifier)
AbstractObjectIOManagerIOForObjectgetObjectByIdentifier in interface IObjectIoManagerForGarbagegetObjectByIdentifier in class AbstractObjectIOManagerIOForObjectidentifier - data record identifierprotected void clearObjectAndPersistInfoByDataRecordIdentifier(DataRecordIdentifier identifier)
clearObjectAndPersistInfoByDataRecordIdentifier in class AbstractObjectIOManagerIOForObjectprotected ObjectAndPersistInfo createObjectAndPersistInfoOfObjectImpl(Object object, boolean proxyInstance, ClassInfo objectClassInfo) throws ObjectIOException
createObjectAndPersistInfoOfObjectImpl in class AbstractObjectIOManagerIOForObjectObjectIOExceptionprotected ObjectAndPersistInfo createSubstitutedObjectAndPersistInfoOfObjectImpl(Object object, ClassInfo objectClassInfo, ObjectAndPersistInfo substituteObjectAndPersistInfo) throws ObjectIOException
createSubstitutedObjectAndPersistInfoOfObjectImpl in class AbstractObjectIOManagerIOForObjectObjectIOExceptionpublic ObjectAndPersistInfo getObjectAndPersistInfoOfObject(Object object) throws ObjectIOException
ObjectIOExceptionprotected DataRecordIdentifier associateNewDataRecordIdentifierToObject(ObjectAndPersistInfo objectAndPersistInfo) throws ObjectIODataCorruptedException, ObjectIOException
associateNewDataRecordIdentifierToObject in class AbstractObjectIOManagerIOForObjectObjectIODataCorruptedExceptionObjectIOExceptionpublic void dataRecordIdentifierAssociatedToObjectSetted(ObjectAndPersistInfo objectAndItsClassInfo) throws ObjectIOException
AbstractObjectIOManagerIOForObjectdataRecordIdentifierAssociatedToObjectSetted in interface IObjectIOManagerForProxyObjectIOdataRecordIdentifierAssociatedToObjectSetted in class AbstractObjectIOManagerIOForObjectObjectIOExceptionpublic boolean objectHasPersistenceState(ObjectAndPersistInfo objectAndPersistInfo)
protected byte[] getDataOfDataRecord(DataRecordIdentifier dataRecordIdentifier) throws ObjectIOException, ObjectIODataCorruptedException, ObjectIODataRecordNotFoundException
AbstractObjectIOManagerIOForObjectgetDataOfDataRecord in class AbstractObjectIOManagerIOForObjectdataRecordIdentifier - data record identifierObjectIOException - reading errorObjectIODataCorruptedExceptionObjectIODataRecordNotFoundExceptionprotected void writeDataRecord(DataRecordIdentifier dataRecordIdentifier, byte[] data) throws ObjectIOException
writeDataRecord in class AbstractObjectIOManagerIOForObjectObjectIOExceptionprotected void notToGarbage(DataRecordIdentifier dataRecordIdentifier, ObjectAndPersistInfo objectAndPersistInfo) throws ObjectIOException
notToGarbage in class AbstractObjectIOManagerIOForObjectObjectIOExceptionpublic Set<ObjectAndPersistInfo> mostAccessedObject()
public boolean isValueChanged(ObjectAndPersistInfo objectAndItsClassInfo) throws ObjectIOException, ObjectIOInvalidClassException, ObjectIONotSerializableException, ObjectIODataCorruptedException, ObjectIODataRecordNotFoundException, ObjectIOClassNotFoundException
ObjectIOExceptionObjectIOInvalidClassExceptionObjectIONotSerializableExceptionObjectIODataCorruptedExceptionObjectIODataRecordNotFoundExceptionObjectIOClassNotFoundExceptionpublic ObjectClassInfoAndDeclared[] willNotBeWrote(ObjectAndPersistInfo objectAndItsClassInfo) throws ObjectIOException
ObjectIOExceptionpublic long getCurrentFileAccessSessionIdentifier()
public JoafipMutex getStoreMutex()
IObjectIOManagerForProxyObjectIOpublic void objectIsAccessed(ObjectAndPersistInfo proxyObjectAndPersistInfo)
IObjectIOManagerForProxyObjectIOpublic void unsetProxyObjectState(ObjectAndPersistInfo objectAndItsClassInfo) throws ObjectIOException, ObjectIOInvalidClassException
public boolean isMaintainInMemoryEnabled()
public boolean isExclusiveAccessSession()
public boolean isRunAutosaveEnableAndDisable()
public void setRunAutosaveEnable(boolean runAutosaveEnable)
protected void checkForAutoSave()
throws ObjectIOException
checkForAutoSave in class AbstractObjectIOManagerIOForObjectObjectIOExceptionpublic boolean isAutoSaveEnabled()
Copyright © 2007-2012 Luc Peuvrier. All Rights Reserved.