|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IFilePersistence
| Method Summary | |
|---|---|
void |
checkIntegrity()
check integrity |
void |
close()
close ( important to close files ) do not save modification |
java.lang.Object |
copy(java.lang.Object sourceObject)
|
DataAccessSession |
createDataAccessSession()
|
void |
disableBackgroundGarbageSweep()
disable background garbage sweep operation |
void |
enableBackgroundGarbageSweep(int sleepTime)
enable background garbage sweep operation |
long |
freeSize()
|
int |
garbageSweep()
garbage sweep, remove data record for object not attached to root should be call only when session closed |
java.lang.String |
getBackupFileName()
|
java.lang.String |
getChangeFileName()
|
java.lang.ClassLoader |
getClassLoader()
|
int |
getNumberOfDataRecord()
|
int |
getNumberOfFreeRecord()
|
int |
getNumberOfGarbageCandidate()
|
int |
getNumberOfModified()
|
int |
getNumberOfToGarbage()
|
int |
getNumberOfVisited()
|
java.lang.String |
getStorageFileName()
|
int |
numberOfObjectState()
|
void |
setChangeLogEnabled(boolean enabled,
int maxNumberOfChangeLog)
set enable state of file change logging |
void |
setClassLoader(java.lang.ClassLoader classLoader)
|
void |
setForceEnhance(java.lang.Class objectClass)
force class to be enhanced even if have public method |
void |
setForceEnhance(java.lang.Class[] objectClasses)
force classes to be enhanced even if have public method |
void |
setGarbageListener(IGarbageListener listener)
set garbage listener |
void |
setNoLazyLoad(java.lang.Class objectClass)
set no use of lazy load for a class |
void |
setNoLazyLoad(java.lang.Class[] objectClasses)
set no use of lazy load for the classes |
void |
setObjectIOForClass(java.lang.Class<?> objectClass,
java.lang.Class<? extends IObjectIO> objectIOClass)
set object input output manager for a class |
void |
setStoreNotUseStandardSerialization(java.lang.Class objectClass)
set not use standard serialization for a serializable class |
void |
setStoreNotUseStandardSerialization(java.lang.Class[] objectClasses)
set not use standard serialization for a serializable classes |
void |
setStoreSerializeAndGZippedInOneRecord(java.lang.Class objectClass)
set storage mode serialized and GZipped for a serializable class |
void |
setStoreSerializeAndGZippedInOneRecord(java.lang.Class[] objectClasses)
set storage mode serialized and GZipped for a serializable classes |
void |
setStoreSerializeAndZippedInOneRecord(java.lang.Class objectClass)
set storage mode serialized and Zipped for a serializable class |
void |
setStoreSerializeAndZippedInOneRecord(java.lang.Class[] objectClasses)
set storage mode serialized and Zipped for a serializable classes |
void |
setStoreSerializeInOneRecord(java.lang.Class objectClass)
set storage mode serialized for a serializable class |
void |
setStoreSerializeInOneRecord(java.lang.Class[] objectClasses)
set storage mode serialized for a serializable classes |
void |
setSubstitution(java.lang.Class replaced,
java.lang.Class substitute,
ISubsituteSynchronizer synchronizer)
record a class substitution association All file persistence instance use same substitution |
void |
setSubstitutionOfJavaUtilCollection()
set java util collection substitution PVector for Vector PLinkedList for LinkedList PArrayList for ArrayList PHashSet for HashSet PLinkedHashSet for LinkedHashSet PTreeSet for TreeSet PHashMap for HashMap PLinkedHashMap for LinkedHashMap PTreeMap for TreeMap PHashMap for HashTable |
void |
setZipCompressionLevel(int zipCompressionLevel)
the compression level have value 0 thru 9: #NO_COMPRESSION
#BEST_SPEED
.... |
void |
storedEnum(java.lang.Class<? extends java.lang.Enum> enumClass)
inform that enum class is persisted |
void |
storedEnum(java.lang.Class<? extends java.lang.Enum>[] enumClasses)
inform that enum classes are persisted |
void |
storedEnum(java.lang.Enum enumObject)
inform that enum object is persisted |
long |
totalSize()
|
long |
usedSize()
|
void |
xmlExport(java.lang.String directoryName,
java.lang.String temporaryDirectoryName,
boolean exportPersistedClassByteCode)
export persisted data in file export.xml put in directoryName |
void |
xmlImport(java.lang.String directoryName)
import from exported data in directoryName |
| Method Detail |
|---|
void setChangeLogEnabled(boolean enabled,
int maxNumberOfChangeLog)
throws FilePersistenceException
enabled - true if change log enabledmaxNumberOfChangeLog - max number of state change log
FilePersistenceException
void setZipCompressionLevel(int zipCompressionLevel)
throws FilePersistenceException
#NO_COMPRESSION#BEST_SPEED#BEST_COMPRESSION
zipCompressionLevel - the zip the compression level (0-9) for object storing using
zipped serialization
FilePersistenceException
void setGarbageListener(IGarbageListener listener)
throws FilePersistenceException
listener - th garbage listener, can be null to remove previous one
FilePersistenceException
void setSubstitutionOfJavaUtilCollection()
throws FilePersistenceException
FilePersistenceException
void setSubstitution(java.lang.Class replaced,
java.lang.Class substitute,
ISubsituteSynchronizer synchronizer)
throws FilePersistenceException
replaced - the replaced classsubstitute - the subsitutute for the replaced classsynchronizer - the state synchronizer for class and its substitute
FilePersistenceExceptionvoid setNoLazyLoad(java.lang.Class objectClass)
objectClass - void setNoLazyLoad(java.lang.Class[] objectClasses)
objectClasses -
void setStoreNotUseStandardSerialization(java.lang.Class objectClass)
throws FilePersistenceException
objectClass -
FilePersistenceException
void setStoreNotUseStandardSerialization(java.lang.Class[] objectClasses)
throws FilePersistenceException
objectClasses -
FilePersistenceException
void setStoreSerializeAndGZippedInOneRecord(java.lang.Class objectClass)
throws FilePersistenceException
objectClass -
FilePersistenceException
void setStoreSerializeAndGZippedInOneRecord(java.lang.Class[] objectClasses)
throws FilePersistenceException
objectClasses -
FilePersistenceException
void setStoreSerializeAndZippedInOneRecord(java.lang.Class objectClass)
throws FilePersistenceException
objectClass -
StoreException
FilePersistenceException
void setStoreSerializeAndZippedInOneRecord(java.lang.Class[] objectClasses)
throws FilePersistenceException
objectClasses -
FilePersistenceException
void setStoreSerializeInOneRecord(java.lang.Class objectClass)
throws FilePersistenceException
objectClass -
FilePersistenceException
void setStoreSerializeInOneRecord(java.lang.Class[] objectClasses)
throws FilePersistenceException
objectClasses -
FilePersistenceExceptionvoid setForceEnhance(java.lang.Class objectClass)
objectClass - void setForceEnhance(java.lang.Class[] objectClasses)
objectClasses -
void setObjectIOForClass(java.lang.Class<?> objectClass,
java.lang.Class<? extends IObjectIO> objectIOClass)
throws FilePersistenceException
objectClass - the class for which is provide the object input outputobjectIOClass - object input output manager class for the class
FilePersistenceException - object I/O construction failure
void storedEnum(java.lang.Class<? extends java.lang.Enum>[] enumClasses)
throws FilePersistenceException
enumClasses - the enum classes
FilePersistenceException
void storedEnum(java.lang.Class<? extends java.lang.Enum> enumClass)
throws FilePersistenceException
enumClass - the enum class
FilePersistenceException
void storedEnum(java.lang.Enum enumObject)
throws FilePersistenceException
enumClass - the enum class
FilePersistenceException
int garbageSweep()
throws FilePersistenceException
FilePersistenceException
void enableBackgroundGarbageSweep(int sleepTime)
throws FilePersistenceException
sleepTime - sleep time between garbage sweep operation
FilePersistenceException
void disableBackgroundGarbageSweep()
throws FilePersistenceException
FilePersistenceException
int getNumberOfGarbageCandidate()
throws FilePersistenceException
FilePersistenceException
int getNumberOfToGarbage()
throws FilePersistenceException
FilePersistenceException
int getNumberOfDataRecord()
throws FilePersistenceException
FilePersistenceException
int getNumberOfFreeRecord()
throws FilePersistenceException
FilePersistenceException
long usedSize()
throws FilePersistenceException
FilePersistenceException
long freeSize()
throws FilePersistenceException
FilePersistenceException
long totalSize()
throws FilePersistenceException
FilePersistenceException
int numberOfObjectState()
throws FilePersistenceException
FilePersistenceException
int getNumberOfModified()
throws FilePersistenceException
FilePersistenceException
int getNumberOfVisited()
throws FilePersistenceException
FilePersistenceException
void checkIntegrity()
throws FilePersistenceException
FilePersistenceException
java.lang.String getStorageFileName()
throws FilePersistenceException
FilePersistenceException
java.lang.String getBackupFileName()
throws FilePersistenceException
FilePersistenceException
java.lang.String getChangeFileName()
throws FilePersistenceException
FilePersistenceException
void close()
throws FilePersistenceException
FilePersistenceException
DataAccessSession createDataAccessSession()
throws FilePersistenceException
FilePersistenceException
java.lang.Object copy(java.lang.Object sourceObject)
throws FilePersistenceException
sourceObject -
FilePersistenceException
void xmlExport(java.lang.String directoryName,
java.lang.String temporaryDirectoryName,
boolean exportPersistedClassByteCode)
throws FilePersistenceException,
FilePersistenceClassNotFoundException,
FilePersistenceInvalidClassException,
FilePersistenceDataCorruptedException,
FilePersistenceNotSerializableException
directoryName directory
can 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:
FilePersistenceException
FilePersistenceClassNotFoundException
FilePersistenceInvalidClassException
FilePersistenceDataCorruptedException
FilePersistenceNotSerializableException
void xmlImport(java.lang.String directoryName)
throws FilePersistenceException,
FilePersistenceClassNotFoundException,
FilePersistenceInvalidClassException,
FilePersistenceDataCorruptedException,
FilePersistenceNotSerializableException
directoryName directory
- Parameters:
directoryName - directory name where are stored exported data to import
- Throws:
FilePersistenceException
FilePersistenceClassNotFoundException
FilePersistenceInvalidClassException
FilePersistenceDataCorruptedException
FilePersistenceNotSerializableException
void setClassLoader(java.lang.ClassLoader classLoader)
throws FilePersistenceException
FilePersistenceException
java.lang.ClassLoader getClassLoader()
throws FilePersistenceException
FilePersistenceException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||