@NotStorableClass public class SerializerObjectIOManager extends AbstractObjectIOManagerIOForObject
classNameManager, currentDataModelIdentifier, HEADER_DATA_SIZE, helperBinaryConversion, helperReflect, logger, OBJECT_MUST_HAVE_DATA_RECORD_IDENTIFIER_SET, objectInputEnum, objectOutputs
classInfoFactory
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, write
addObject, getKeptInMemorySubstituteObjectManager, isKeptInMemory, keptInMemoryoriginalObject, keptInMemorysubstituteObject, keyOfObject
public SerializerObjectIOManager(int currentDataModelIdentifier, IClassNameManager classNameManager, ClassInfoFactory classInfoFactory, HelperBinaryConversion helperBinaryConversion, IProxyManagerForObjectIO proxyManager) throws ObjectIOException
ObjectIOException
public 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 IObjectIOManagerForObjectIO
createObjectReadingInStoreOrGetExisting
in class AbstractObjectIOManagerIOForObject
dataRecordIdentifier
- identifier of data record associated to objectnotLazy
- true if force not lazy modeObjectIOException
- create object errorObjectIODataRecordNotFoundException
- data record for object not foundObjectIOClassNotFoundException
ObjectIOInvalidClassException
ObjectIODataCorruptedException
ObjectIONotSerializableException
public ObjectAndPersistInfo getObjectByIdentifier(DataRecordIdentifier identifier)
AbstractObjectIOManagerIOForObject
getObjectByIdentifier
in interface IObjectIoManagerForGarbage
getObjectByIdentifier
in class AbstractObjectIOManagerIOForObject
identifier
- data record identifierprotected void clearObjectAndPersistInfoByDataRecordIdentifier(DataRecordIdentifier identifier)
clearObjectAndPersistInfoByDataRecordIdentifier
in class AbstractObjectIOManagerIOForObject
protected ObjectAndPersistInfo createObjectAndPersistInfoOfObjectImpl(Object object, boolean proxyInstance, ClassInfo objectClassInfo) throws ObjectIOException
createObjectAndPersistInfoOfObjectImpl
in class AbstractObjectIOManagerIOForObject
ObjectIOException
protected ObjectAndPersistInfo createSubstitutedObjectAndPersistInfoOfObjectImpl(Object object, ClassInfo objectClassInfo, ObjectAndPersistInfo substituteObjectAndPersistInfo) throws ObjectIOException
createSubstitutedObjectAndPersistInfoOfObjectImpl
in class AbstractObjectIOManagerIOForObject
ObjectIOException
public ObjectAndPersistInfo getObjectAndPersistInfoOfObject(Object object) throws ObjectIOException
ObjectIOException
protected DataRecordIdentifier associateNewDataRecordIdentifierToObject(ObjectAndPersistInfo objectAndPersistInfo) throws ObjectIODataCorruptedException, ObjectIOException
associateNewDataRecordIdentifierToObject
in class AbstractObjectIOManagerIOForObject
ObjectIODataCorruptedException
ObjectIOException
public void dataRecordIdentifierAssociatedToObjectSetted(ObjectAndPersistInfo objectAndItsClassInfo) throws ObjectIOException
AbstractObjectIOManagerIOForObject
dataRecordIdentifierAssociatedToObjectSetted
in interface IObjectIOManagerForProxyObjectIO
dataRecordIdentifierAssociatedToObjectSetted
in class AbstractObjectIOManagerIOForObject
ObjectIOException
public boolean objectHasPersistenceState(ObjectAndPersistInfo objectAndPersistInfo)
protected byte[] getDataOfDataRecord(DataRecordIdentifier dataRecordIdentifier) throws ObjectIOException, ObjectIODataCorruptedException, ObjectIODataRecordNotFoundException
AbstractObjectIOManagerIOForObject
getDataOfDataRecord
in class AbstractObjectIOManagerIOForObject
dataRecordIdentifier
- data record identifierObjectIOException
- reading errorObjectIODataCorruptedException
ObjectIODataRecordNotFoundException
protected void writeDataRecord(DataRecordIdentifier dataRecordIdentifier, byte[] data) throws ObjectIOException
writeDataRecord
in class AbstractObjectIOManagerIOForObject
ObjectIOException
protected void notToGarbage(DataRecordIdentifier dataRecordIdentifier, ObjectAndPersistInfo objectAndPersistInfo) throws ObjectIOException
notToGarbage
in class AbstractObjectIOManagerIOForObject
ObjectIOException
public Set<ObjectAndPersistInfo> mostAccessedObject()
public boolean isValueChanged(ObjectAndPersistInfo objectAndItsClassInfo) throws ObjectIOException, ObjectIOInvalidClassException, ObjectIONotSerializableException, ObjectIODataCorruptedException, ObjectIODataRecordNotFoundException, ObjectIOClassNotFoundException
ObjectIOException
ObjectIOInvalidClassException
ObjectIONotSerializableException
ObjectIODataCorruptedException
ObjectIODataRecordNotFoundException
ObjectIOClassNotFoundException
public ObjectClassInfoAndDeclared[] willNotBeWrote(ObjectAndPersistInfo objectAndItsClassInfo) throws ObjectIOException
ObjectIOException
public long getCurrentFileAccessSessionIdentifier()
public JoafipMutex getStoreMutex()
IObjectIOManagerForProxyObjectIO
public void objectIsAccessed(ObjectAndPersistInfo proxyObjectAndPersistInfo)
IObjectIOManagerForProxyObjectIO
public 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 AbstractObjectIOManagerIOForObject
ObjectIOException
public boolean isAutoSaveEnabled()
Copyright © 2007-2012 Luc Peuvrier. All Rights Reserved.