com.db4o.tools
Class Defragment
java.lang.Object
|
+--com.db4o.tools.Defragment
- public class Defragment
- extends java.lang.Object
defragments a database file.
This class is not part of db4o.jar. It is delivered as sourcecode
in the path ../com/db4o/tools/
Prerequites:
- The database file may not be in use.
- All stored classes need to be available.
- If you use special Db4o translators, they need to be installed
with
Db4o.configure().objectClass("classname").
translate(new Translatorclass());
before starting Defragment.
Performed tasks:
- Free filespace is removed.
- Deleted IDs are removed.
- Unavailable classes are removed.
- Unavailable class members are removed.
- Class indices are restored.
- Previous rename tasks are removed.
Backup:
Defragment creates a backup file with the name [filename].bak. If
a file with this name is already present, Defragment will not run
for safety reasons.
Recommendations:
- Keep the backup copy of your database file.
- Scan the output log for "Class not available" messages.
Constructor Summary |
Defragment()
the main method is the only entry point |
Method Summary |
static void |
main(java.lang.String[] args)
the main method that runs Defragment. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Defragment
public Defragment()
- the main method is the only entry point
main
public static void main(java.lang.String[] args)
- the main method that runs Defragment.
- Parameters:
String[]
- a String array of length 1, with the name of the database
file as element 0.