|
db4o 8.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.db4o.defragment.DefragmentConfig
public class DefragmentConfig
Configuration for a defragmentation run.
Defragment
Field Summary | |
---|---|
static java.lang.String |
BACKUP_SUFFIX
|
static boolean |
DEBUG
|
Constructor Summary | |
---|---|
DefragmentConfig(java.lang.String origPath)
Creates a configuration for a defragmentation run. |
|
DefragmentConfig(java.lang.String origPath,
java.lang.String backupPath)
Creates a configuration for a defragmentation run with in-memory mapping. |
|
DefragmentConfig(java.lang.String origPath,
java.lang.String backupPath,
IdMapping mapping)
Creates a configuration for a defragmentation run. |
Method Summary | |
---|---|
java.lang.String |
backupPath()
|
Storage |
backupStorage()
|
void |
backupStorage(Storage backupStorage)
|
int |
blockSize()
|
Configuration |
clonedDb4oConfig()
|
Configuration |
db4oConfig()
|
void |
db4oConfig(Configuration config)
Deprecated. since 7.9: use db4oConfig(EmbeddedConfiguration) instead |
void |
db4oConfig(EmbeddedConfiguration config)
|
boolean |
fileNeedsUpgrade()
|
boolean |
forceBackupDelete()
|
void |
forceBackupDelete(boolean forceBackupDelete)
|
IdMapping |
mapping()
|
int |
objectCommitFrequency()
|
void |
objectCommitFrequency(int objectCommitFrequency)
|
java.lang.String |
origPath()
|
boolean |
readOnly()
|
void |
readOnly(boolean flag)
allows turning on and off readonly mode. When changed classes are likely to be detected defragment, it may be required to open the original database in read/write mode. |
StoredClassFilter |
storedClassFilter()
|
void |
storedClassFilter(StoredClassFilter storedClassFilter)
|
java.lang.String |
tempPath()
|
void |
upgradeFile(java.lang.String tempPath)
Instruct the defragment process to upgrade the source file to the current db4o version prior to defragmenting it. |
static Configuration |
vanillaDb4oConfig(int blockSize)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean DEBUG
public static final java.lang.String BACKUP_SUFFIX
Constructor Detail |
---|
public DefragmentConfig(java.lang.String origPath)
origPath
- The path to the file to be defragmented. Must exist and must be
a valid db4o file.public DefragmentConfig(java.lang.String origPath, java.lang.String backupPath)
origPath
- The path to the file to be defragmented. Must exist and must be
a valid db4o file.backupPath
- The path to the backup of the original file. No file should
exist at this position, otherwise it will be OVERWRITTEN if forceBackupDelete()
is set to true!public DefragmentConfig(java.lang.String origPath, java.lang.String backupPath, IdMapping mapping)
origPath
- The path to the file to be defragmented. Must exist and must be
a valid db4o file.backupPath
- The path to the backup of the original file. No file should
exist at this position, otherwise it will be OVERWRITTEN if forceBackupDelete()
is set to true!mapping
- The Id mapping to be used internally. Pass either a
InMemoryIdMapping
for fastest defragment or a DatabaseIdMapping
for low memory consumption.Method Detail |
---|
public java.lang.String origPath()
public java.lang.String backupPath()
public IdMapping mapping()
public StoredClassFilter storedClassFilter()
StoredClassFilter
used to select stored class extents to
be included into the defragmented file.public void storedClassFilter(StoredClassFilter storedClassFilter)
storedClassFilter
- The StoredClassFilter
used to select stored class extents to
be included into the defragmented file.public boolean forceBackupDelete()
public void forceBackupDelete(boolean forceBackupDelete)
forceBackupDelete
- true, if an existing backup file should be deleted, false otherwise.public void readOnly(boolean flag)
flag
- false, to turn off readonly mode.public boolean readOnly()
public Configuration db4oConfig()
Configuration
to be applied
during the defragment process.public void db4oConfig(Configuration config)
db4oConfig(EmbeddedConfiguration)
instead
config
- The db4o Configuration
to be applied
during the defragment process.public void db4oConfig(EmbeddedConfiguration config)
config
- The db4o EmbeddedConfiguration
to be applied
during the defragment process.public int objectCommitFrequency()
public void objectCommitFrequency(int objectCommitFrequency)
objectCommitFrequency
- The number of processed object (slots) that should trigger an
intermediate commit of the target file. Default: 0, meaning: never.public void upgradeFile(java.lang.String tempPath)
tempPath
- The location for an intermediate, upgraded version of the source file.public boolean fileNeedsUpgrade()
public java.lang.String tempPath()
public int blockSize()
public static Configuration vanillaDb4oConfig(int blockSize)
public Configuration clonedDb4oConfig()
public void backupStorage(Storage backupStorage)
public Storage backupStorage()
|
db4o 8.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |