@NotStorableClass public abstract class AbstractDelegatingToStoreManagers extends AbstractStoreDelegatingToDataManager
Modifier and Type | Field and Description |
---|---|
protected boolean |
autoSaveEnabled |
protected ClassInfoFactory |
classInfoFactory |
protected IClassNameManager |
classNameManager |
protected int |
currentDataModelIdentifier
data model identifier
|
protected boolean |
garbageManagement
true if garbage management activated
|
protected GarbageManager |
garbageManager
manager of to garbage record identifier storing and link storing
|
protected HelperBinaryConversion |
helperBinaryConversion |
protected HelperReflect |
helperReflect |
protected Object |
mutex
file access synchronization mutex
|
protected ObjectIOManager |
objectIOManager
object reading and writing on data file manager
|
protected ProxyManager2 |
proxyManager2 |
protected boolean |
proxyMode |
protected IFilePersistenceAutoSaver |
saver |
protected StoreGarbager |
storeGarbager
manage garbage of data record
|
protected StoreHeader |
storeHeader
store header, data record #0
|
protected StoreSaver3 |
storeSaver
manage saving of object
|
protected StoreSynchro |
storeSynchro
group of synchronization object for file access, share between
Store and ProxyCallBack |
dataManager, logger, STORE_DATA, TRACE_FILE
Modifier | Constructor and Description |
---|---|
protected |
AbstractDelegatingToStoreManagers(StoreProperties storeProperties) |
clearDataManager, dataManagerBackup, dataManagerFreeSize, dataManagerGetNumberOfDataRecord, dataManagerGetNumberOfFreeRecord, dataManagerHeapSize, dataManagerUsedSize, flushDataManager, getDataManager, getNewDataRecordIdentifier, getStorageFileName, startDataManagerService, stopDataManagerService
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addProhibitedPackage, addToNotCheckMethod, addToNotCheckMethod, addToNotCheckMethod, addToNotCheckMethod, clear, close, createObjectReadingInStoreOrGetExisting, disableBackgroundGarbageSweep, doNotSave, enableBackgroundGarbageSweep, endAccessSession, freeSize, garbageSweep, getAllReferenceLink, getCandidate, getDataRecordIdentifierAssociatedToObject, getNumberOfDataRecord, getNumberOfFreeRecord, getNumberOfGarbageCandidate, getNumberOfModified, getNumberOfObjectState, getNumberOfReferenced, getNumberOfToGarbage, getNumberOfVisitedForSave, getNumberOfWeakReference, getObjectHavingStateSet, getRoot, getStoredEnumMap, getStoreRoot, getToGarbage, isBackgroundGarbageSweepWorking, isChangeLogEnabled, newAccessSession, open, readRoot, removeWriteSubstitution, removeWriteSubstitution, save, setAutoSaveEventListener, setChangeLogEnabled, setDeprecatedInStore, setDeprecatedInStore, setEnumState, setForceEnhance, setForceEnhance, setGarbageListener, setInstanceFactory, setNoLazyLoad, setNoLazyLoad, setNoLazyLoad, setNoLazyLoad, setNotPersistedField, setNotPersistedField, setNotStorable, setNotStorable, setObjectIOForClass, setObjectIOForClass, setRoot, setStorable, setStorable, setStoredEnumMap, setStoreNotUseStandardSerialization, setStoreNotUseStandardSerialization, setStoreSerializeAndGZippedInOneRecord, setStoreSerializeAndGZippedInOneRecord, setStoreSerializeAndZippedInOneRecord, setStoreSerializeAndZippedInOneRecord, setStoreSerializeInOneRecord, setStoreSerializeInOneRecord, setSubstituteObjectManager, setSubstituteObjectManager, setSubstitutionOfJavaUtilCollection, setWriteSubstitution, setWriteSubstitution, totalSize, usedForGarbageManagement, usedSize
setBackgroundException
protected final HelperReflect helperReflect
protected final boolean proxyMode
protected final boolean garbageManagement
protected IClassNameManager classNameManager
protected ObjectIOManager objectIOManager
protected StoreSaver3 storeSaver
protected StoreGarbager storeGarbager
protected GarbageManager garbageManager
protected StoreHeader storeHeader
protected final StoreSynchro storeSynchro
Store
and ProxyCallBack
protected final Object mutex
protected ClassInfoFactory classInfoFactory
protected HelperBinaryConversion helperBinaryConversion
protected int currentDataModelIdentifier
protected ProxyManager2 proxyManager2
protected boolean autoSaveEnabled
protected IFilePersistenceAutoSaver saver
protected AbstractDelegatingToStoreManagers(StoreProperties storeProperties) throws StoreException
StoreException
public boolean isProxyMode()
public JoafipMutex getMutex()
public ClassLoaderProvider getClassLoaderProvider()
public void setClassLoaderProvider(ClassLoaderProvider classLoaderProvider)
public ProxyManager2 getProxyManager2()
public StoreSynchro getStoreSynchro()
public HelperBinaryConversion getHelperBinaryConversion()
public void stop() throws StoreException
StoreException
public ClassInfoFactory getClassInfoFactory()
public boolean isGarbageManagement() throws StoreException
StoreException
public HeapRecordableManager getHeapRecordableManager() throws StoreException
StoreException
protected boolean readAndSetHeapRecordableState(IHeapRecordable heapRecordable) throws HeapRecordableException
HeapRecordableException
protected DataRecordIdentifier attachHeapRecordable(IHeapRecordable heapRecordable) throws HeapRecordableException
HeapRecordableException
protected void heapRecordableManagerSave() throws HeapRecordableException
HeapRecordableException
protected void heapRecordableManagerDoNotSave(boolean clear)
public ObjectIOManager getObjectIOManager() throws StoreException
StoreException
public StoreSaver3 getStoreSaver()
public void setZipCompressionLevel(int zipCompressionLevel) throws StoreException
zipCompressionLevel
- the zip the compression level for object storing using zipped
serializationStoreException
protected void loadClassName() throws StoreException, StoreClassNotFoundException
public IClassNameManager getClassNameManager()
public int getClassIdentifier(Class<?> clazz) throws StoreException, StoreClassNotFoundException
public GarbageManager getGarbageManager()
StoreException
public void setStoreMode(NavigableMap<String,EnumStoreMode> storeModeMap)
public void setDeprecatedInStore(NavigableMap<String,Boolean> deprecatedinStoreMap)
public void setNotStorable(NavigableMap<String,Boolean> notStorableMap)
public Object deepCopy(Object sourceObject, boolean forceLoad) throws CopierException
CopierException
public void setPersistenceId(int persistenceId)
public int getPersistenceId()
public long getCurrentFileAccessSessionIdentifier()
public void xmlExport(String directoryName, String temporaryDirectoryName, boolean exportPersistedClassByteCode) throws StoreException, StoreClassNotFoundException, StoreInvalidClassException, StoreDataCorruptedException, StoreNotSerializableException, StoreTooBigForSerializationException
IStore
directoryName directory
also export byte code of class of persisted object
- Parameters:
directoryName
- directory name where store exporttemporaryDirectoryName
- temporary directory name used to store temporary files while
exportingexportPersistedClassByteCode
- true if export persisted class byte code
- Throws:
StoreException
StoreClassNotFoundException
StoreInvalidClassException
StoreDataCorruptedException
StoreNotSerializableException
StoreTooBigForSerializationException
-
setExportListener
public void setExportListener(IExporterListener listener)
-
getNumberOfObjectExported
public int getNumberOfObjectExported()
-
xmlImport
public void xmlImport(String directoryName,
boolean validating)
throws StoreException,
StoreClassNotFoundException,
StoreInvalidClassException,
StoreDataCorruptedException,
StoreNotSerializableException
Description copied from interface: IStore
import from exported data in directoryName directory
- Parameters:
directoryName
- directory name where are stored exported data to import
- Throws:
StoreException
StoreClassNotFoundException
StoreInvalidClassException
StoreDataCorruptedException
StoreNotSerializableException
-
setImportListener
public void setImportListener(IImportListener listener)
-
getCurrentDataModelIdentifier
public int getCurrentDataModelIdentifier()
-
getConversionManager
public ConversionManager getConversionManager()
-
newProxyInstance
public Object newProxyInstance(Object sourceObject)
throws StoreException
- Throws:
StoreException
-
newProxyInstance
public Object newProxyInstance(Class<?> objectClass,
Class<?>[] parameterTypes,
Object[] initargs)
throws StoreException
- Throws:
StoreException
-
newProxyInstance
public Object newProxyInstance(Class<?> objectClass)
throws StoreException
- Throws:
StoreException
-
setStoreOnlyMarkedStorable
public void setStoreOnlyMarkedStorable(boolean storeOnlyMarkedStorable)
-
allClassInformation
public Collection<ClassInfo> allClassInformation()
-
keptInMemory
public void keptInMemory(String key,
Object object)
throws StoreException
- Throws:
StoreException
-
isKeptInMemory
public boolean isKeptInMemory(Object object)
-
referencedByPesistedStaticField
public void referencedByPesistedStaticField(Class<?> classHavingStaticFieldReferenced)
throws StoreException
- Throws:
StoreException
-
storedImmutableEnum
public void storedImmutableEnum(Class<? extends Enum<?>> enumClass)
throws StoreException
Description copied from interface: IStore
declare immutable enum class to persist
- Throws:
StoreException
-
getWroteObjectSet
public Map<String,MutableInteger> getWroteObjectSet()
-
setRecordSaveActions
public void setRecordSaveActions(boolean recordActions)
-
setRecordSaveActions
public void setRecordSaveActions(boolean recordActions,
ISaveRecordActionListener saveRecordActionListener)
-
setSaveRecordActionListener
public void setSaveRecordActionListener(ISaveRecordActionListener saveRecordActionListener)
-
setSaveInDataAccessSessionEnabled
public void setSaveInDataAccessSessionEnabled(boolean enabled)
-
setMaintainedInMemoryEnabled
public void setMaintainedInMemoryEnabled(boolean enabled)
-
setAutoSaveEnabled
public void setAutoSaveEnabled(boolean enabled)
-
isAutoSaveEnabled
public boolean isAutoSaveEnabled()
-
autoSaveSetup
public void autoSaveSetup(int maxInMemoryThreshold)
-
setSaver
public void setSaver(IFilePersistenceAutoSaver saver)
-
maintainInMemorySetup
public void maintainInMemorySetup(int maintainedInMemoryQuota)
-
newInstance
public Object newInstance(Class<?> objectClass,
Class<?>[] parameterTypes,
Object[] initargs)
- Parameters:
objectClass
- the class of the object to createparameterTypes
- parameters type, see
Class.getConstructor(Class...)
initargs
- the construction parameters, see
Constructor.newInstance(Object...)
- Returns:
- the created instance according to proxy mode
-
newInstance
protected Object newInstance(ClassInfo objectClassInfo,
Class<?>[] parameterTypes,
Object[] initargs)
throws ProxyException,
ReflectException,
ClassInfoException,
ObjectIOException
-
knownAsNotExisting
public ClassInfo knownAsNotExisting(String className)
throws StoreClassNotFoundException,
StoreException
-
getClassInfoInDataRecord
public ClassInfo getClassInfoInDataRecord(DataRecordIdentifier dataRecordIdentifier)
throws StoreException
- Throws:
StoreException
-
classOfObject
public Class<?> classOfObject(Object object)
throws StoreException
- Returns:
- class of object, proxied class in case of proxy object
- Throws:
StoreException
-
classInfoOfObject
public ClassInfo classInfoOfObject(Object object)
throws StoreException
- Throws:
StoreException
-
getGarbageCandidateRecordManager
@Fortest
public GarbageCandidateRecordManager getGarbageCandidateRecordManager()
for test purpose
- Returns:
- manager of garbage candidate record in file
-
getToVisitRecordManager
@Fortest
public ToVisitRecordManager getToVisitRecordManager()
-
getVisitedRecordManager
@Fortest
public VisitedRecordManager getVisitedRecordManager()
-
getToGarbageRecordManager
@Fortest
public ToGarbageRecordManager getToGarbageRecordManager()
for test purpose
- Returns:
- manager of to garbage record in file
-
getLinkRecordManager
@Fortest
public LinkRecordManager getLinkRecordManager()
Description copied from interface: IStore
for test purpose
- Returns:
- the link record manager
-
usedForClassNameManagement
public void usedForClassNameManagement(Set<DataRecordIdentifier> setToUpdate)
throws StoreException
- Throws:
StoreException
-
getObjectAndPersistInfoOfObjectFromQueue
@Fortest
public ObjectAndPersistInfo getObjectAndPersistInfoOfObjectFromQueue(Object object)
-
getObjectAndPersistInfoOfObjectFromQueue
@Fortest
public List<ObjectAndPersistInfo> getObjectAndPersistInfoOfObjectFromQueue()
-
listenStateMapClean
@Fortest
public void listenStateMapClean(IObjectStateMapCLeanListener listener)
Copyright © 2007-2012 Luc Peuvrier. All Rights Reserved.