Java Doc for Defragment.java in  » Database-DBMS » db4o-6.4 » com » db4o » tools » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database DBMS » db4o 6.4 » com.db4o.tools 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.db4o.tools.Defragment

Defragment
public class Defragment (Code)
old Deframent source code, now replaced by the built-in functionality in com.db4o.defragment.Defragment.

This class is deprecated. Please use com.db4o.defragment.Defragment .
This class 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 yor own special Db4o translators, they need to be installed 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.
- Always back up your class files with your database files also.
You will need them to restore the full data of all objects from old database file versions.
- Scan the output log for "Class not available" messages.

You may also run this task programmatically on a scheduled basis. In this case note that Defragment modifies db4o configuration parameters. You may have to restore them for your application. See the private methods Defragment#configureDb4o() and Db4o#restoreConfiguration() in the sourcecode of com.db4o.tools.Defragment.java for the exact changed parameters that may need to be restored.



Constructor Summary
public  Defragment()
    

Method Summary
public static  voidmain(String[] args)
     the main method that runs Defragment.
public  voidrun(String filename, boolean forceBackupDelete)
     programmatic interface to run Defragment with a forced delete of a possible old Defragment backup.
This method is supplied for regression tests only.
public static  voidsetSecondClass(String className)
     allows to specify a class to be treated as "second class". Second class objects are not migrated to the new database on their own.


Constructor Detail
Defragment
public Defragment()(Code)
the main method is the only entry point




Method Detail
main
public static void main(String[] args)(Code)
the main method that runs Defragment.
Parameters:
  args - a String array of length 1, with the name of the databasefile as element 0.



run
public void run(String filename, boolean forceBackupDelete)(Code)
programmatic interface to run Defragment with a forced delete of a possible old Defragment backup.
This method is supplied for regression tests only. It is not recommended to be used by application programmers.
Parameters:
  filename - the database file.
Parameters:
  forceBackupDelete - forces deleting an old backup. Not recommended.



setSecondClass
public static void setSecondClass(String className)(Code)
allows to specify a class to be treated as "second class". Second class objects are not migrated to the new database on their own. A second class objects is only migrated, if it is referenced by another object.
Parameters:
  className - the fully qualified classname, including the package name for Java, including the namespaces and assembly name for .NET. Format examples:
Java: 'com.db4o.f1.Pilot'
.NET: 'com.db4o.f1.Pilot, MyAssembly'



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.