@NotStorableClass public class ObjectIOManager extends AbstractObjectIOManagerDelegatingToStateMap
net.sf.joafip.store.service.objectio.serialize.ObjectIOLazyGeneric
classNameManager, currentDataModelIdentifier, HEADER_DATA_SIZE, helperBinaryConversion, helperReflect, logger, OBJECT_MUST_HAVE_DATA_RECORD_IDENTIFIER_SET, objectInputEnum, objectOutputs
classInfoFactory
Constructor and Description |
---|
ObjectIOManager(int currentDataModelIdentifier,
IHeapDataManager dataManager,
boolean proxyMode,
IClassNameManager classNameManager,
StoreSynchro storeSynchro,
ClassInfoFactory classInfoFactory,
HelperBinaryConversion helperBinaryConversion,
ProxyManager2 proxyManager2) |
Modifier and Type | Method and Description |
---|---|
protected DataRecordIdentifier |
associateNewDataRecordIdentifierToObject(ObjectAndPersistInfo objectAndPersistInfo) |
protected void |
autoSave() |
protected void |
checkForAutoSave() |
void |
closeChangeLog()
close change log file
|
ObjectAndPersistInfo |
createReadingInStoreGenericObjectNotLazy(DataRecordIdentifier dataRecordIdentifier)
near as
#createObjectReadingInStoreOrGetExisting(Long, Class) but
force direct loading. |
long |
getCurrentFileAccessSessionIdentifier() |
byte[] |
getDataOfDataRecord(DataRecordIdentifier dataRecordIdentifier)
get data of data record for an identifier
|
IGarbageManagerForLinkUpdate |
getGarbageManager() |
JoafipMutex |
getStoreMutex()
get the mutex for storage file access
|
boolean |
isAutoSaveEnabled() |
boolean |
isGarbageManagement() |
boolean |
isMaintainInMemoryEnabled() |
boolean |
isRunAutosaveEnableAndDisable() |
boolean |
isValueChanged(ObjectAndPersistInfo objectAndPersistInfo) |
Map<DataRecordIdentifier,byte[]> |
loadChangeLog(String fileName)
load change log in memory from a change log file
|
protected void |
notToGarbage(DataRecordIdentifier dataRecordIdentifier,
ObjectAndPersistInfo objectAndPersistInfo) |
void |
objectIsAccessed(ObjectAndPersistInfo objectAndPersistInfo)
call when object is accessed
|
void |
openChangeLog(String changeFileName)
|
void |
setAutoSaveEnabled(boolean enabled,
int maxInMemoryThreshold) |
void |
setAutoSaveEventListener(IAutoSaveEventListener saveEventListener) |
void |
setExclusiveAccessSession(boolean exclusiveAccessSession) |
void |
setGarbageManagement(boolean garbageManagement,
IGarbageManagerForLinkUpdate garbageManager) |
void |
setMaintainedInMemoryQuota(int maintainedInMemoryQuota) |
void |
setMaintenedInMemoryEnabled(boolean maintainInMemoryEnabled,
int maintainedInMemoryQuota) |
void |
setMaxInMemoryThreshold(int maxInMemoryThreshold) |
void |
setRunAutosaveEnable(boolean runAutosaveEnable) |
void |
setSaver(IFilePersistenceAutoSaver saver) |
void |
storeInChangeLog(ObjectAndPersistInfo objectAndPersistInfo)
write object in serialized form to change log
|
void |
unsetProxyObjectState(ObjectAndPersistInfo objectAndPersistInfo) |
ObjectClassInfoAndDeclared[] |
willNotBeWrote(ObjectAndPersistInfo objectAndPersistInfo)
notify that object will not be wrote
|
protected void |
writeDataRecord(DataRecordIdentifier dataRecordIdentifier,
byte[] data) |
clearObjectAndPersistInfoByDataRecordIdentifier, clearObjectState, closeObjectState, createObjectAndPersistInfoOfObjectImpl, createSubstitutedObjectAndPersistInfoOfObjectImpl, dataRecordIdentifierAssociatedToObjectSetted, getDataRecordIdentifierAssociatedToObject, getNumberOfObjectState, getNumberOfReferenced, getNumberOfWeakReference, getObjectAndPersistInfoOfObject, getObjectAndPersistInfoOfObjectFromQueue, getObjectAndPersistInfoOfObjectFromQueue, getObjectByIdentifier, getObjectHavingStateSet, getObjectStateMap, isExclusiveAccessSession, listenStateMapClean, mostAccessedObject, objectHasPersistenceState, objectIsAccessedDelegate, setExclusiveAccessSessionDelegate, setMaintainedInMemoryQuotaDelegate, setTrackingOfAccessedObjectEnabledDelegate, weakReferenceOnObject
assertNotSubstituted, createObjectPersistInfoOfObject, createObjectPersistInfoOfObject, createObjectReadingInStore, createObjectReadingInStoreOrGetExisting, 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 ObjectIOManager(int currentDataModelIdentifier, IHeapDataManager dataManager, boolean proxyMode, IClassNameManager classNameManager, StoreSynchro storeSynchro, ClassInfoFactory classInfoFactory, HelperBinaryConversion helperBinaryConversion, ProxyManager2 proxyManager2) throws ObjectIOException
ObjectIOException
@Fortest public boolean isGarbageManagement()
@Fortest public IGarbageManagerForLinkUpdate getGarbageManager()
public void setGarbageManagement(boolean garbageManagement, IGarbageManagerForLinkUpdate garbageManager) throws ObjectIOException
ObjectIOException
protected void notToGarbage(DataRecordIdentifier dataRecordIdentifier, ObjectAndPersistInfo objectAndPersistInfo) throws ObjectIOException
notToGarbage
in class AbstractObjectIOManagerIOForObject
ObjectIOException
public ObjectClassInfoAndDeclared[] willNotBeWrote(ObjectAndPersistInfo objectAndPersistInfo) throws ObjectIOException
IObjectIOManagerForSave
ObjectIOException
public ObjectAndPersistInfo createReadingInStoreGenericObjectNotLazy(DataRecordIdentifier dataRecordIdentifier) throws ObjectIOException, ObjectIODataRecordNotFoundException, ObjectIOClassNotFoundException, ObjectIOInvalidClassException, ObjectIODataCorruptedException, ObjectIONotSerializableException
#createObjectReadingInStoreOrGetExisting(Long, Class)
but
force direct loading.dataRecordIdentifier
- identifier of data record associated to objectObjectIODataRecordNotFoundException
- no data record for object foundObjectIOException
- object creation errorObjectIODataCorruptedException
ObjectIOInvalidClassException
ObjectIOClassNotFoundException
ObjectIONotSerializableException
public boolean isValueChanged(ObjectAndPersistInfo objectAndPersistInfo) throws ObjectIOException, ObjectIOInvalidClassException, ObjectIONotSerializableException, ObjectIODataCorruptedException, ObjectIODataRecordNotFoundException, ObjectIOClassNotFoundException
ObjectIOException
ObjectIOInvalidClassException
ObjectIONotSerializableException
ObjectIODataCorruptedException
ObjectIODataRecordNotFoundException
ObjectIOClassNotFoundException
protected void writeDataRecord(DataRecordIdentifier dataRecordIdentifier, byte[] data) throws ObjectIOException
writeDataRecord
in class AbstractObjectIOManagerIOForObject
ObjectIOException
public byte[] getDataOfDataRecord(DataRecordIdentifier dataRecordIdentifier) throws ObjectIOException, ObjectIODataCorruptedException, ObjectIODataRecordNotFoundException
AbstractObjectIOManagerIOForObject
getDataOfDataRecord
in class AbstractObjectIOManagerIOForObject
dataRecordIdentifier
- data record identifierObjectIOException
- reading errorObjectIODataCorruptedException
ObjectIODataRecordNotFoundException
public void unsetProxyObjectState(ObjectAndPersistInfo objectAndPersistInfo) throws ObjectIOException, ObjectIOInvalidClassException
protected DataRecordIdentifier associateNewDataRecordIdentifierToObject(ObjectAndPersistInfo objectAndPersistInfo) throws ObjectIODataCorruptedException, ObjectIOException
associateNewDataRecordIdentifierToObject
in class AbstractObjectIOManagerIOForObject
ObjectIODataCorruptedException
ObjectIOException
public JoafipMutex getStoreMutex()
IObjectIOManagerForProxyObjectIO
public long getCurrentFileAccessSessionIdentifier()
public void openChangeLog(String changeFileName) throws ObjectIOException
changeFileName
- file name for file use to store change logObjectIOException
public void closeChangeLog() throws ObjectIOException
ObjectIOException
public void storeInChangeLog(ObjectAndPersistInfo objectAndPersistInfo) throws ObjectIOException, ObjectIOInvalidClassException, ObjectIONotSerializableException, ObjectIOClassNotFoundException, ObjectIODataRecordNotFoundException, ObjectIODataCorruptedException, ObjectIOTooBigForSerializationException
object
- the object to writeObjectIOException
ObjectIONotSerializableException
ObjectIOInvalidClassException
ObjectIOClassNotFoundException
ObjectIODataCorruptedException
ObjectIODataRecordNotFoundException
ObjectIOTooBigForSerializationException
public Map<DataRecordIdentifier,byte[]> loadChangeLog(String fileName) throws ObjectIOException
fileName
- the change log file nameObjectIOException
public void setExclusiveAccessSession(boolean exclusiveAccessSession)
public void setMaintenedInMemoryEnabled(boolean maintainInMemoryEnabled, int maintainedInMemoryQuota)
public void setMaintainedInMemoryQuota(int maintainedInMemoryQuota)
public boolean isMaintainInMemoryEnabled()
public void objectIsAccessed(ObjectAndPersistInfo objectAndPersistInfo)
IObjectIOManagerForProxyObjectIO
public void setAutoSaveEnabled(boolean enabled, int maxInMemoryThreshold)
public void setMaxInMemoryThreshold(int maxInMemoryThreshold)
public void setAutoSaveEventListener(IAutoSaveEventListener saveEventListener)
public boolean isAutoSaveEnabled()
public boolean isRunAutosaveEnableAndDisable()
public void setRunAutosaveEnable(boolean runAutosaveEnable)
protected void checkForAutoSave() throws ObjectIOException
checkForAutoSave
in class AbstractObjectIOManagerIOForObject
ObjectIOException
protected void autoSave() throws ObjectIOException
ObjectIOException
public void setSaver(IFilePersistenceAutoSaver saver)
Copyright © 2007-2012 Luc Peuvrier. All Rights Reserved.