|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.joafip.service.AbstractFilePersistenceDelegate
net.sf.joafip.service.FilePersistence
@NotStorableClass public class FilePersistence
manager for file persistence of java object
| Field Summary | |
|---|---|
static int |
BEST_COMPRESSION
Compression level for best compression. |
static int |
BEST_SPEED
Compression level for fastest compression. |
static int |
DEFAULT_COMPRESSION
Default compression level. |
static int |
NO_COMPRESSION
Compression level for no compression. |
| Fields inherited from class net.sf.joafip.service.AbstractFilePersistenceDelegate |
|---|
_log, mutex, store |
| Constructor Summary | |
|---|---|
FilePersistence(java.io.File path,
boolean removeFiles,
boolean garbageManagement)
create a file persistence using proxy for lazy loading no file cache used, crash safe mode enabled |
|
FilePersistence(java.io.File path,
boolean proxyMode,
boolean removeFiles,
boolean garbageManagement)
create a file persistence and optionally proxy for lazy loading no file cache used, crash safe mode enabled |
|
FilePersistence(java.io.File path,
boolean proxyMode,
boolean removeFiles,
int pageSize,
int maxPage,
boolean garbageManagement,
boolean crashSafeMode)
create a file persistence and optionally proxy for lazy loading file cache used |
|
FilePersistence(java.io.File path,
boolean removeFiles,
int pageSize,
int maxPage,
boolean garbageManagement)
create a file persistence using proxy for lazy loading file cache used, crash safe mode enabled |
|
FilePersistence(IHeapDataManager dataManager,
boolean proxyMode,
boolean removeFiles,
boolean garbageManagement)
create a persistence using a provided data manager and optionaly proxy for lazy loading |
|
FilePersistence(java.lang.String propertiesSetupResourceName,
boolean removeFiles)
create a persistence setup from properties |
|
FilePersistence(java.lang.String pathName,
boolean removeFiles,
boolean garbageManagement)
create a file persistence using proxy for lazy loading no file cache used, crash safe mode enabled |
|
FilePersistence(java.lang.String pathName,
boolean proxyMode,
boolean removeFiles,
boolean garbageManagement)
create a file persistence and optionally proxy for lazy loading no file cache used, crash safe mode enabled |
|
FilePersistence(java.lang.String pathName,
boolean proxyMode,
boolean removeFiles,
boolean garbageManagement,
boolean crashSafeMode)
create a file persistence and optionally proxy for lazy loading no file cache used |
|
FilePersistence(java.lang.String pathName,
boolean proxyMode,
boolean removeFiles,
int pageSize,
int maxPage,
boolean garbageManagement,
boolean crashSafeMode)
create a file persistence and optionally proxy for lazy loading file cache used |
|
FilePersistence(java.lang.String pathName,
boolean removeFiles,
int pageSize,
int maxPage,
boolean garbageManagement,
boolean crashSafeMode)
create a file persistence using proxy for lazy loading file cache used |
|
| Method Summary | |
|---|---|
protected void |
assertNoObjectStored()
assert there is no object stored |
protected void |
checkSessionClosed()
|
void |
close()
close ( important to close files ) do not save modification |
DataAccessSession |
createDataAccessSession()
|
static EnumFileState |
fileState(java.lang.Exception exception)
to have the file state give by exception or its primary cause |
static java.lang.String |
getVersion()
|
boolean |
isUsed()
for tests only ( used to check all user thread have ended usage ) |
static void |
setIdCount(int idCount)
for test only |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int NO_COMPRESSION
public static final int BEST_SPEED
public static final int BEST_COMPRESSION
public static final int DEFAULT_COMPRESSION
| Constructor Detail |
|---|
public FilePersistence(java.io.File path,
boolean removeFiles,
boolean garbageManagement)
throws FilePersistenceException,
FilePersistenceInvalidClassException,
FilePersistenceNotSerializableException,
FilePersistenceClassNotFoundException,
FilePersistenceDataCorruptedException
path - directory path where store filesremoveFiles - true if remove files before opengarbageManagement - true if manage garbage
FilePersistenceException - no file in stable state, file state restored to stable, file
persistence is not opened
FilePersistenceNotSerializableException - Some object to be serialized does not follow joafip
persistence rules or does not implement the
java.io.Serializable interface.
FilePersistenceInvalidClassException - something is wrong with a class used by serialization
FilePersistenceDataCorruptedException - data is inconsistent.
FilePersistenceClassNotFoundException - Class of a serialized object cannot be found.
public FilePersistence(java.lang.String pathName,
boolean removeFiles,
boolean garbageManagement)
throws FilePersistenceException,
FilePersistenceInvalidClassException,
FilePersistenceNotSerializableException,
FilePersistenceClassNotFoundException,
FilePersistenceDataCorruptedException
pathName - directory path name where store filesremoveFiles - true if remove files before opengarbageManagement - true if manage garbage
FilePersistenceException - no file in stable state, file state restored to stable, file
persistence is not opened
FilePersistenceNotSerializableException - Some object to be serialized does not follow joafip
persistence rules or does not implement the
java.io.Serializable interface.
FilePersistenceInvalidClassException - something is wrong with a class used by serialization
FilePersistenceDataCorruptedException - data is inconsistent.
FilePersistenceClassNotFoundException - Class of a serialized object cannot be found.
public FilePersistence(java.io.File path,
boolean proxyMode,
boolean removeFiles,
boolean garbageManagement)
throws FilePersistenceException,
FilePersistenceInvalidClassException,
FilePersistenceNotSerializableException,
FilePersistenceClassNotFoundException,
FilePersistenceDataCorruptedException
path - directory path where store filesremoveFiles - true if remove files before openproxyMode - true if use proxy for lazy loadingremoveFiles - true if remove files before opengarbageManagement - true if manage garbage
FilePersistenceException - no file in stable state, file state restored to stable, file
persistence is not opened
FilePersistenceNotSerializableException - Some object to be serialized does not follow joafip
persistence rules or does not implement the
java.io.Serializable interface.
FilePersistenceInvalidClassException - something is wrong with a class used by serialization
FilePersistenceDataCorruptedException - data is inconsistent.
FilePersistenceClassNotFoundException - Class of a serialized object cannot be found.
public FilePersistence(java.lang.String pathName,
boolean proxyMode,
boolean removeFiles,
boolean garbageManagement)
throws FilePersistenceException,
FilePersistenceInvalidClassException,
FilePersistenceNotSerializableException,
FilePersistenceClassNotFoundException,
FilePersistenceDataCorruptedException
pathName - directory path name where store filesremoveFiles - true if remove files before openproxyMode - true if use proxy for lazy loadingremoveFiles - true if remove files before opengarbageManagement - true if manage garbage
FilePersistenceException - no file in stable state, file state restored to stable, file
persistence is not opened
FilePersistenceNotSerializableException - Some object to be serialized does not follow joafip
persistence rules or does not implement the
java.io.Serializable interface.
FilePersistenceInvalidClassException - something is wrong with a class used by serialization
FilePersistenceDataCorruptedException - data is inconsistent.
FilePersistenceClassNotFoundException - Class of a serialized object cannot be found.
public FilePersistence(java.lang.String pathName,
boolean proxyMode,
boolean removeFiles,
boolean garbageManagement,
boolean crashSafeMode)
throws FilePersistenceException,
FilePersistenceInvalidClassException,
FilePersistenceNotSerializableException,
FilePersistenceClassNotFoundException,
FilePersistenceDataCorruptedException
pathName - directory path name where store filesproxyMode - true if use proxy for lazy loadingremoveFiles - true if remove files before opengarbageManagement - true if manage garbagecrashSafeMode - true if crash safe mode enabled
FilePersistenceException - no file in stable state, file state restored to stable, file
persistence is not opened
FilePersistenceNotSerializableException - Some object to be serialized does not follow joafip
persistence rules or does not implement the
java.io.Serializable interface.
FilePersistenceInvalidClassException - something is wrong with a class used by serialization
FilePersistenceDataCorruptedException - data is inconsistent.
FilePersistenceClassNotFoundException - Class of a serialized object cannot be found.
public FilePersistence(java.io.File path,
boolean removeFiles,
int pageSize,
int maxPage,
boolean garbageManagement)
throws FilePersistenceException,
FilePersistenceInvalidClassException,
FilePersistenceNotSerializableException,
FilePersistenceClassNotFoundException,
FilePersistenceDataCorruptedException
path - directory path where store filesremoveFiles - true if remove files before openpageSize - page size ( number of byte ), must be greater or equals to
1024maxPage - maximum number of page for read cachegarbageManagement - true if manage garbage
FilePersistenceException - no file in stable state, file state restored to stable, file
persistence is not opened
FilePersistenceNotSerializableException - Some object to be serialized does not follow joafip
persistence rules or does not implement the
java.io.Serializable interface.
FilePersistenceInvalidClassException - something is wrong with a class used by serialization
FilePersistenceDataCorruptedException - data is inconsistent.
FilePersistenceClassNotFoundException - Class of a serialized object cannot be found.
public FilePersistence(java.lang.String pathName,
boolean removeFiles,
int pageSize,
int maxPage,
boolean garbageManagement,
boolean crashSafeMode)
throws FilePersistenceException,
FilePersistenceInvalidClassException,
FilePersistenceNotSerializableException,
FilePersistenceClassNotFoundException,
FilePersistenceDataCorruptedException
pathName - directory path name where store filesremoveFiles - true if remove files before openpageSize - page size for read cache ( number of byte ), must be greater
or equals to 1024maxPage - maximum number of page for read cachegarbageManagement - true if manage garbagecrashSafeMode - true if crash safe mode enabled
FilePersistenceException - no file in stable state, file state restored to stable, file
persistence is not opened
FilePersistenceNotSerializableException - Some object to be serialized does not follow joafip
persistence rules or does not implement the
java.io.Serializable interface.
FilePersistenceInvalidClassException - something is wrong with a class used by serialization
FilePersistenceDataCorruptedException - data is inconsistent.
FilePersistenceClassNotFoundException - Class of a serialized object cannot be found.
public FilePersistence(java.io.File path,
boolean proxyMode,
boolean removeFiles,
int pageSize,
int maxPage,
boolean garbageManagement,
boolean crashSafeMode)
throws FilePersistenceException,
FilePersistenceInvalidClassException,
FilePersistenceNotSerializableException,
FilePersistenceClassNotFoundException,
FilePersistenceDataCorruptedException
path - directory path where store filesproxyMode - true if use proxy for lazy loadingremoveFiles - true if remove files before openpageSize - page size ( number of byte ), must be greater or equals to
1024maxPage - maximum number of page for read cachegarbageManagement - true if manage garbagecrashSafeMode - true if crash safe mode enabled
FilePersistenceException - no file in stable state, file state restored to stable, file
persistence is not opened
FilePersistenceNotSerializableException - Some object to be serialized does not follow joafip
persistence rules or does not implement the
java.io.Serializable interface.
FilePersistenceInvalidClassException - something is wrong with a class used by serialization
FilePersistenceDataCorruptedException - data is inconsistent.
FilePersistenceClassNotFoundException - Class of a serialized object cannot be found.
public FilePersistence(java.lang.String pathName,
boolean proxyMode,
boolean removeFiles,
int pageSize,
int maxPage,
boolean garbageManagement,
boolean crashSafeMode)
throws FilePersistenceException,
FilePersistenceInvalidClassException,
FilePersistenceNotSerializableException,
FilePersistenceClassNotFoundException,
FilePersistenceDataCorruptedException
pathName - directory path name where store filesproxyMode - true if use proxy for lazy loadingremoveFiles - true if remove files before openpageSize - page size ( number of byte ), must be greater or equals to
1024maxPage - maximum number of page for read cachegarbageManagement - true if manage garbagecrashSafeMode - true if crash safe mode enabled
FilePersistenceException - no file in stable state, file state restored to stable, file
persistence is not opened
FilePersistenceNotSerializableException - Some object to be serialized does not follow joafip
persistence rules or does not implement the
java.io.Serializable interface.
FilePersistenceInvalidClassException - something is wrong with a class used by serialization
FilePersistenceDataCorruptedException - data is inconsistent.
FilePersistenceClassNotFoundException - Class of a serialized object cannot be found.
public FilePersistence(IHeapDataManager dataManager,
boolean proxyMode,
boolean removeFiles,
boolean garbageManagement)
throws FilePersistenceException,
FilePersistenceInvalidClassException,
FilePersistenceNotSerializableException,
FilePersistenceClassNotFoundException,
FilePersistenceDataCorruptedException
dataManager - the provided data managerproxyMode - true if use proxy for lazy loadingremoveFiles - true if remove files before opengarbageManagement - true if manage garbage
FilePersistenceException
FilePersistenceNotSerializableException - Some object to be serialized does not follow joafip
persistence rules or does not implement the
java.io.Serializable interface.
FilePersistenceInvalidClassException - something is wrong with a class used by serialization
FilePersistenceDataCorruptedException - data is inconsistent.
FilePersistenceClassNotFoundException - Class of a serialized object cannot be found.
public FilePersistence(java.lang.String propertiesSetupResourceName,
boolean removeFiles)
throws FilePersistenceException,
FilePersistenceInvalidClassException,
FilePersistenceNotSerializableException,
FilePersistenceClassNotFoundException,
FilePersistenceDataCorruptedException
propertiesSetupResourceName - properties to use for setupremoveFiles - true if remove files before open
FilePersistenceException
FilePersistenceNotSerializableException - Some object to be serialized does not follow joafip
persistence rules or does not implement the
java.io.Serializable interface.
FilePersistenceInvalidClassException - something is wrong with a class used by serialization
FilePersistenceDataCorruptedException - data is inconsistent.
FilePersistenceClassNotFoundException - Class of a serialized object cannot be found.| Method Detail |
|---|
public static java.lang.String getVersion()
public void close()
throws FilePersistenceException
IFilePersistence
FilePersistenceException
public DataAccessSession createDataAccessSession()
throws FilePersistenceException
FilePersistenceException
@Fortest
public boolean isUsed()
throws FilePersistenceException
FilePersistenceException
protected void checkSessionClosed()
throws FilePersistenceException
checkSessionClosed in class AbstractFilePersistenceDelegateFilePersistenceExceptionpublic static EnumFileState fileState(java.lang.Exception exception)
exception - exception
@Fortest
public static void setIdCount(int idCount)
throws FilePersistenceException
idCount -
FilePersistenceException
protected void assertNoObjectStored()
throws FilePersistenceException,
FilePersistenceClassNotFoundException,
FilePersistenceInvalidClassException,
FilePersistenceDataCorruptedException,
FilePersistenceNotSerializableException
AbstractFilePersistenceDelegate
assertNoObjectStored in class AbstractFilePersistenceDelegateFilePersistenceException
FilePersistenceClassNotFoundException
FilePersistenceInvalidClassException
FilePersistenceDataCorruptedException
FilePersistenceNotSerializableException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||