@NoStorableAccess public class FilePersistenceBuilder extends Object
Constructor and Description |
---|
FilePersistenceBuilder() |
Modifier and Type | Method and Description |
---|---|
IFilePersistence |
build() |
void |
fileBufferSetup(int maxNumberOfBuffer,
int maxBufferSize) |
FilePersistenceProperties |
getFilePersistenceProperties() |
void |
setAutoSaveEnabled(boolean autoSaveEnabled) |
void |
setBackgroundGarbageSweepEnabled(boolean backgroundGarbageSweepEnabled) |
void |
setBackgroundGarbageSweepSleepTime(int backgroundGarbageSweepSleepTime) |
void |
setBackupDataFileName(String backupDataFileName) |
void |
setCrashSafeMode(boolean crashSafeMode) |
void |
setDataFileName(String dataFileName) |
void |
setDataManager(IHeapDataManager dataManager) |
void |
setDataModelConversionDefInputStream(InputStreamAndSource dataModelConversionDefInputStream) |
void |
setDataModelIdentifier(int dataModelIdentifier) |
void |
setFileAccessMode(EnumFileAccessMode fileAccessMode) |
void |
setFileCache(int pageSize,
int maxPage)
file cache used
|
void |
setFileOperationRetryMsDelay(int fileOperationRetryMsDelay) |
void |
setGarbageManagement(boolean garbageManagement) |
void |
setGlobalStateFlagFileName(String globalStateFlagFileName) |
void |
setMaintenedInMemory(boolean maintenedInMemory) |
void |
setMaintenedInMemoryQuota(int maintenedInMemoryQuota) |
void |
setMaxBufferSize(int maxBufferSize) |
void |
setMaxFileOperationRetry(int maxFileOperationRetry) |
void |
setMaxInMemoryThreshold(int maxInMemoryThreshold) |
void |
setMaxNumberOfBuffer(int maxNumberOfBuffer) |
void |
setNoMoreDataAction(EnumNoMoreDataAction noMoreDataAction) |
void |
setPathName(String pathName) |
void |
setProxyMode(boolean proxyMode) |
void |
setRecordSaveActions(boolean recordSaveActions) |
void |
setRemoveFiles(boolean removeFiles) |
void |
setStateBackupOkFlagFileName(String stateBackupOkFlagFileName) |
void |
setStateOkFlagFileName(String stateOkFlagFileName) |
void |
setStoreOnlyMarkedStorable(boolean storeOnlyMarkedStorable) |
void |
setSubsOfJavaUtil(boolean subsOfJavaUtil) |
void |
setZipCompressionLevel(int zipCompressionLevel) |
void |
setZipCompressionLevelSetted(boolean zipCompressionLevelSetted) |
public void setDataModelIdentifier(int dataModelIdentifier)
dataModelIdentifier
- current data model identifierpublic void setDataModelConversionDefInputStream(InputStreamAndSource dataModelConversionDefInputStream)
dataModelConversionDefInputStream
- input stream of conversion definition for data modelpublic void setFileAccessMode(EnumFileAccessMode fileAccessMode)
public void setMaxNumberOfBuffer(int maxNumberOfBuffer)
public void setMaxBufferSize(int maxBufferSize)
public void fileBufferSetup(int maxNumberOfBuffer, int maxBufferSize)
public void setPathName(String pathName)
pathName
- name of directory path where store filespublic void setDataFileName(String dataFileName)
dataFileName
- name of the file for the heap data storagepublic void setBackupDataFileName(String backupDataFileName)
backupDataFileName
- name of the backup file for the heap data storage (use in
crash safe mode only)public void setStateOkFlagFileName(String stateOkFlagFileName)
stateOkFlagFileName
- name of the file used has flag for data file on stable statepublic void setStateBackupOkFlagFileName(String stateBackupOkFlagFileName)
stateBackupOkFlagFileName
- name of the file used has flag for backup data file on stable
statepublic void setGlobalStateFlagFileName(String globalStateFlagFileName)
globalStateFlagFileName
- name of file indicating backup and data file stable statepublic void setMaxFileOperationRetry(int maxFileOperationRetry)
maxFileOperationRetry
- max retry of file operation in cas of failurepublic void setFileOperationRetryMsDelay(int fileOperationRetryMsDelay)
fileOperationRetryMsDelay
- millisecond delay before retry file operation after failurepublic void setNoMoreDataAction(EnumNoMoreDataAction noMoreDataAction)
public void setRemoveFiles(boolean removeFiles)
removeFiles
- true if remove files before openpublic void setAutoSaveEnabled(boolean autoSaveEnabled)
autoSaveEnabled
- true to enabled auto savepublic void setMaxInMemoryThreshold(int maxInMemoryThreshold)
maxInMemoryThreshold
- public void setMaintenedInMemory(boolean maintenedInMemory)
maintenedInMemory
- public void setMaintenedInMemoryQuota(int maintenedInMemoryQuota)
maintenedInMemoryQuota
- public void setBackgroundGarbageSweepEnabled(boolean backgroundGarbageSweepEnabled)
backgroundGarbageSweepEnabled
- public void setBackgroundGarbageSweepSleepTime(int backgroundGarbageSweepSleepTime)
backgroundGarbageSweepSleepTime
- public void setGarbageManagement(boolean garbageManagement)
garbageManagement
- true if manage garbagepublic void setProxyMode(boolean proxyMode)
proxyMode
- true if use proxy for lazy loadingpublic void setCrashSafeMode(boolean crashSafeMode)
crashSafeMode
- true if crash safe mode enabledpublic void setFileCache(int pageSize, int maxPage)
pageSize
- page size ( number of byte ), must be greater or equals to
1024maxPage
- maximum number of page for read cachepublic void setDataManager(IHeapDataManager dataManager)
dataManager
- the provided data managerpublic void setStoreOnlyMarkedStorable(boolean storeOnlyMarkedStorable)
storeOnlyMarkedStorable
- public void setZipCompressionLevel(int zipCompressionLevel)
zipCompressionLevel
- public void setZipCompressionLevelSetted(boolean zipCompressionLevelSetted)
zipCompressionLevelSetted
- public void setSubsOfJavaUtil(boolean subsOfJavaUtil)
subsOfJavaUtil
- public void setRecordSaveActions(boolean recordSaveActions)
recordSaveActions
- public FilePersistenceProperties getFilePersistenceProperties()
public IFilePersistence build() throws FilePersistenceException, FilePersistenceInvalidClassException, FilePersistenceNotSerializableException, FilePersistenceClassNotFoundException, FilePersistenceDataCorruptedException
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 serializationFilePersistenceDataCorruptedException
- data is inconsistent.FilePersistenceClassNotFoundException
- Class of a serialized object cannot be found.FilePersistenceException
Copyright © 2007-2012 Luc Peuvrier. All Rights Reserved.