Java Doc for Db4o.java in  » Database-DBMS » db4o-6.4 » com » db4o » 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 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.db4o.Db4o

All known Subclasses:   com.db4o.ext.ExtDb4o,
Db4o
public class Db4o (Code)
factory class to start db4o database engines.

This class provides static methods to
- open single-user databases Db4o.openFile(String)
- open db4o servers Db4o.openServer(String,int)
- connect to db4o servers Db4o.openClient(String,int,String,String)
- provide access to the global configuration context Db4o.configure()
- print the version number of this db4o version Db4o.main(String[])
See Also:   ExtDb4o
See Also:    ExtDb4o for extended functionality.


Field Summary
final static  Config4Impli_config
    


Method Summary
public static  ConfigurationcloneConfiguration()
     Creates a clone of the global db4o Configuration Configuration .
public static  Configurationconfigure()
     returns the global db4o Configuration Configuration context for the running JVM session.
public static  voidmain(String args)
     prints the version name of this db4o version to System.out.
public static  ConfigurationnewConfiguration()
     Creates a fresh Configuration Configuration instance.
public static  ObjectContaineropenClient(String hostName, int port, String user, String password)
     Operates just like Db4o.openClient(ConfigurationStringintStringString) , but uses the global db4o Configuration Configuration context.
public static  ObjectContaineropenClient(Configuration config, String hostName, int port, String user, String password)
     opens an ObjectContainer ObjectContainer client and connects it to the specified named server and port.
public static  ObjectContaineropenClient(Configuration config, String hostName, int port, String user, String password, NativeSocketFactory socketFactory)
     opens an ObjectContainer ObjectContainer client and connects it to the specified named server and port.
final public static  ObjectContaineropenFile(String databaseFileName)
     Operates just like Db4o.openFile(ConfigurationString) , but uses the global db4o Configuration Configuration context. opens an ObjectContainer ObjectContainer on the specified database file for local use.

A database file can only be opened once, subsequent attempts to open another ObjectContainer ObjectContainer against the same file will result in a DatabaseFileLockedException DatabaseFileLockedException .

Database files can only be accessed for readwrite access from one process (one Java VM) at one time.
final public static  ObjectContaineropenFile(Configuration config, String databaseFileName)
     opens an ObjectContainer ObjectContainer on the specified database file for local use.

A database file can only be opened once, subsequent attempts to open another ObjectContainer ObjectContainer against the same file will result in a DatabaseFileLockedException DatabaseFileLockedException .

Database files can only be accessed for readwrite access from one process (one Java VM) at one time.
final protected static  ObjectContaineropenMemoryFile1(Configuration config, MemoryFile memoryFile)
    
final public static  ObjectServeropenServer(String databaseFileName, int port)
     Operates just like Db4o.openServer(ConfigurationStringint) , but uses the global db4o Configuration Configuration context. opens an ObjectServer ObjectServer on the specified database file and port.

If the server does not need to listen on a port because it will only be used in embedded mode with ObjectServer.openClient , specify '0' as the port number.
Parameters:
  databaseFileName - an absolute or relative path to the database file
Parameters:
  port - the port to be used, or 0, if the server should not open a port,because it will only be used with ObjectServer.openClient.Specify a value < 0 if an arbitrary free port should be chosen - see ExtObjectServer.port.
final public static  ObjectServeropenServer(Configuration config, String databaseFileName, int port)
     opens an ObjectServer ObjectServer on the specified database file and port.

If the server does not need to listen on a port because it will only be used in embedded mode with ObjectServer.openClient , specify '0' as the port number.
Parameters:
  config - a custom Configuration Configuration instance to be obtained via Db4o.newConfiguration
Parameters:
  databaseFileName - an absolute or relative path to the database file
Parameters:
  port - the port to be used, or 0, if the server should not open a port,because it will only be used with ObjectServer.openClient.Specify a value < 0 if an arbitrary free port should be chosen - see ExtObjectServer.port.
final public static  ObjectServeropenServer(Configuration config, String databaseFileName, int port, NativeSocketFactory socketFactory)
     opens an ObjectServer ObjectServer on the specified database file and port.

If the server does not need to listen on a port because it will only be used in embedded mode with ObjectServer.openClient , specify '0' as the port number.
Parameters:
  config - a custom Configuration Configuration instance to be obtained via Db4o.newConfiguration
Parameters:
  databaseFileName - an absolute or relative path to the database file
Parameters:
  port - the port to be used, or 0, if the server should not open a port,because it will only be used with ObjectServer.openClient.Specify a value < 0 if an arbitrary free port should be chosen - see ExtObjectServer.port.
Parameters:
  socketFactory - the NativeSocketFactory to be used for socket creation an ObjectServer ObjectServer listeningon the specified port.
See Also:   Configuration.readOnly
See Also:   Configuration.encrypt
See Also:   Configuration.password
throws:
  Db4oIOException - I/O operation failed or was unexpectedly interrupted.
throws:
  DatabaseFileLockedException - the required database file is locked by another process.
throws:
  IncompatibleFileFormatException - runtime com.db4o.config.Configuration configuration is not compatiblewith the configuration of the database file.
static  Reflectorreflector()
    
final public static  Stringversion()
     returns the version name of the used db4o version.

Field Detail
i_config
final static Config4Impl i_config(Code)





Method Detail
cloneConfiguration
public static Configuration cloneConfiguration()(Code)
Creates a clone of the global db4o Configuration Configuration . a fresh configuration with all option values set to the valuescurrently configured for the global db4o configuration context



configure
public static Configuration configure()(Code)
returns the global db4o Configuration Configuration context for the running JVM session.

The Configuration Configuration can be overriden in each com.db4o.ext.ExtObjectContainer.configure ObjectContainer .

the global Configuration configuration context



main
public static void main(String args)(Code)
prints the version name of this db4o version to System.out.



newConfiguration
public static Configuration newConfiguration()(Code)
Creates a fresh Configuration Configuration instance. a fresh, independent configuration with all options set to their default values



openClient
public static ObjectContainer openClient(String hostName, int port, String user, String password) throws Db4oIOException, OldFormatException, InvalidPasswordException(Code)
Operates just like Db4o.openClient(ConfigurationStringintStringString) , but uses the global db4o Configuration Configuration context. opens an ObjectContainer ObjectContainer client and connects it to the specified named server and port.

The server needs to ObjectServer.grantAccess allow access for the specified user and password.

A client ObjectContainer ObjectContainer can be cast to ExtClient ExtClient to use extended ExtObjectContainer ExtObjectContainer and ExtClient ExtClient methods.


Parameters:
  hostName - the host name
Parameters:
  port - the port the server is using
Parameters:
  user - the user name
Parameters:
  password - the user password an open ObjectContainer ObjectContainer
See Also:   ObjectServer.grantAccess
throws:
  Db4oIOException - I/O operation failed or was unexpectedly interrupted.
throws:
  OldFormatException - open operation failed because the database fileis in old format and com.db4o.config.Configuration.allowVersionUpdates(boolean) is set to false.
throws:
  InvalidPasswordException - password supplied for the connection isinvalid.



openClient
public static ObjectContainer openClient(Configuration config, String hostName, int port, String user, String password) throws Db4oIOException, OldFormatException, InvalidPasswordException(Code)
opens an ObjectContainer ObjectContainer client and connects it to the specified named server and port.

The server needs to ObjectServer.grantAccess allow access for the specified user and password.

A client ObjectContainer ObjectContainer can be cast to ExtClient ExtClient to use extended ExtObjectContainer ExtObjectContainer and ExtClient ExtClient methods.


Parameters:
  config - a custom Configuration Configuration instance to be obtained via Db4o.newConfiguration
Parameters:
  hostName - the host name
Parameters:
  port - the port the server is using
Parameters:
  user - the user name
Parameters:
  password - the user password an open ObjectContainer ObjectContainer
See Also:   ObjectServer.grantAccess
throws:
  Db4oIOException - I/O operation failed or was unexpectedly interrupted.
throws:
  OldFormatException - open operation failed because the database fileis in old format and com.db4o.config.Configuration.allowVersionUpdates(boolean) is set to false.
throws:
  InvalidPasswordException - password supplied for the connection isinvalid.



openClient
public static ObjectContainer openClient(Configuration config, String hostName, int port, String user, String password, NativeSocketFactory socketFactory) throws Db4oIOException, OldFormatException, InvalidPasswordException(Code)
opens an ObjectContainer ObjectContainer client and connects it to the specified named server and port.

The server needs to ObjectServer.grantAccess allow access for the specified user and password.

A client ObjectContainer ObjectContainer can be cast to ExtClient ExtClient to use extended ExtObjectContainer ExtObjectContainer and ExtClient ExtClient methods.


Parameters:
  config - a custom Configuration Configuration instance to be obtained via Db4o.newConfiguration
Parameters:
  hostName - the host name
Parameters:
  port - the port the server is using
Parameters:
  user - the user name
Parameters:
  password - the user password an open ObjectContainer ObjectContainer
See Also:   ObjectServer.grantAccess
throws:
  Db4oIOException - I/O operation failed or was unexpectedly interrupted.
throws:
  OldFormatException - open operation failed because the database fileis in old format and com.db4o.config.Configuration.allowVersionUpdates(boolean) is set to false.
throws:
  InvalidPasswordException - password supplied for the connection isinvalid.



openFile
final public static ObjectContainer openFile(String databaseFileName) throws Db4oIOException, DatabaseFileLockedException, IncompatibleFileFormatException, OldFormatException, DatabaseReadOnlyException(Code)
Operates just like Db4o.openFile(ConfigurationString) , but uses the global db4o Configuration Configuration context. opens an ObjectContainer ObjectContainer on the specified database file for local use.

A database file can only be opened once, subsequent attempts to open another ObjectContainer ObjectContainer against the same file will result in a DatabaseFileLockedException DatabaseFileLockedException .

Database files can only be accessed for readwrite access from one process (one Java VM) at one time. All versions except for db4o mobile edition use an internal mechanism to lock the database file for other processes.


Parameters:
  databaseFileName - an absolute or relative path to the database file an open ObjectContainer ObjectContainer
See Also:   Configuration.readOnly
See Also:   Configuration.encrypt
See Also:   Configuration.password
throws:
  Db4oIOException - I/O operation failed or was unexpectedly interrupted.
throws:
  DatabaseFileLockedException - the required database file is locked by another process.
throws:
  IncompatibleFileFormatException - runtime com.db4o.config.Configuration configuration is not compatiblewith the configuration of the database file.
throws:
  OldFormatException - open operation failed because the database fileis in old format and com.db4o.config.Configuration.allowVersionUpdates(boolean) is set to false.
throws:
  DatabaseReadOnlyException - database was configured as read-only.



openFile
final public static ObjectContainer openFile(Configuration config, String databaseFileName) throws Db4oIOException, DatabaseFileLockedException, IncompatibleFileFormatException, OldFormatException, DatabaseReadOnlyException(Code)
opens an ObjectContainer ObjectContainer on the specified database file for local use.

A database file can only be opened once, subsequent attempts to open another ObjectContainer ObjectContainer against the same file will result in a DatabaseFileLockedException DatabaseFileLockedException .

Database files can only be accessed for readwrite access from one process (one Java VM) at one time. All versions except for db4o mobile edition use an internal mechanism to lock the database file for other processes.


Parameters:
  config - a custom Configuration Configuration instance to be obtained via Db4o.newConfiguration
Parameters:
  databaseFileName - an absolute or relative path to the database file an open ObjectContainer ObjectContainer
See Also:   Configuration.readOnly
See Also:   Configuration.encrypt
See Also:   Configuration.password
throws:
  Db4oIOException - I/O operation failed or was unexpectedly interrupted.
throws:
  DatabaseFileLockedException - the required database file is locked by another process.
throws:
  IncompatibleFileFormatException - runtime com.db4o.config.Configuration configuration is not compatiblewith the configuration of the database file.
throws:
  OldFormatException - open operation failed because the database fileis in old format and com.db4o.config.Configuration.allowVersionUpdates(boolean) is set to false.
throws:
  DatabaseReadOnlyException - database was configured as read-only.



openMemoryFile1
final protected static ObjectContainer openMemoryFile1(Configuration config, MemoryFile memoryFile) throws Db4oIOException, DatabaseFileLockedException, OldFormatException(Code)



openServer
final public static ObjectServer openServer(String databaseFileName, int port) throws Db4oIOException, IncompatibleFileFormatException, OldFormatException, DatabaseFileLockedException, DatabaseReadOnlyException(Code)
Operates just like Db4o.openServer(ConfigurationStringint) , but uses the global db4o Configuration Configuration context. opens an ObjectServer ObjectServer on the specified database file and port.

If the server does not need to listen on a port because it will only be used in embedded mode with ObjectServer.openClient , specify '0' as the port number.
Parameters:
  databaseFileName - an absolute or relative path to the database file
Parameters:
  port - the port to be used, or 0, if the server should not open a port,because it will only be used with ObjectServer.openClient.Specify a value < 0 if an arbitrary free port should be chosen - see ExtObjectServer.port. an ObjectServer ObjectServer listeningon the specified port.
See Also:   Configuration.readOnly
See Also:   Configuration.encrypt
See Also:   Configuration.password
throws:
  Db4oIOException - I/O operation failed or was unexpectedly interrupted.
throws:
  DatabaseFileLockedException - the required database file is locked by another process.
throws:
  IncompatibleFileFormatException - runtime com.db4o.config.Configuration configuration is not compatiblewith the configuration of the database file.
throws:
  OldFormatException - open operation failed because the database fileis in old format and com.db4o.config.Configuration.allowVersionUpdates(boolean) is set to false.
throws:
  DatabaseReadOnlyException - database was configured as read-only.



openServer
final public static ObjectServer openServer(Configuration config, String databaseFileName, int port) throws Db4oIOException, IncompatibleFileFormatException, OldFormatException, DatabaseFileLockedException, DatabaseReadOnlyException(Code)
opens an ObjectServer ObjectServer on the specified database file and port.

If the server does not need to listen on a port because it will only be used in embedded mode with ObjectServer.openClient , specify '0' as the port number.
Parameters:
  config - a custom Configuration Configuration instance to be obtained via Db4o.newConfiguration
Parameters:
  databaseFileName - an absolute or relative path to the database file
Parameters:
  port - the port to be used, or 0, if the server should not open a port,because it will only be used with ObjectServer.openClient.Specify a value < 0 if an arbitrary free port should be chosen - see ExtObjectServer.port. an ObjectServer ObjectServer listeningon the specified port.
See Also:   Configuration.readOnly
See Also:   Configuration.encrypt
See Also:   Configuration.password
throws:
  Db4oIOException - I/O operation failed or was unexpectedly interrupted.
throws:
  DatabaseFileLockedException - the required database file is locked by another process.
throws:
  IncompatibleFileFormatException - runtime com.db4o.config.Configuration configuration is not compatiblewith the configuration of the database file.
throws:
  OldFormatException - open operation failed because the database fileis in old format and com.db4o.config.Configuration.allowVersionUpdates(boolean) is set to false.
throws:
  DatabaseReadOnlyException - database was configured as read-only.



openServer
final public static ObjectServer openServer(Configuration config, String databaseFileName, int port, NativeSocketFactory socketFactory) throws Db4oIOException, IncompatibleFileFormatException, OldFormatException, DatabaseFileLockedException, DatabaseReadOnlyException(Code)
opens an ObjectServer ObjectServer on the specified database file and port.

If the server does not need to listen on a port because it will only be used in embedded mode with ObjectServer.openClient , specify '0' as the port number.
Parameters:
  config - a custom Configuration Configuration instance to be obtained via Db4o.newConfiguration
Parameters:
  databaseFileName - an absolute or relative path to the database file
Parameters:
  port - the port to be used, or 0, if the server should not open a port,because it will only be used with ObjectServer.openClient.Specify a value < 0 if an arbitrary free port should be chosen - see ExtObjectServer.port.
Parameters:
  socketFactory - the NativeSocketFactory to be used for socket creation an ObjectServer ObjectServer listeningon the specified port.
See Also:   Configuration.readOnly
See Also:   Configuration.encrypt
See Also:   Configuration.password
throws:
  Db4oIOException - I/O operation failed or was unexpectedly interrupted.
throws:
  DatabaseFileLockedException - the required database file is locked by another process.
throws:
  IncompatibleFileFormatException - runtime com.db4o.config.Configuration configuration is not compatiblewith the configuration of the database file.
throws:
  OldFormatException - open operation failed because the database fileis in old format and com.db4o.config.Configuration.allowVersionUpdates(boolean) is set to false.
throws:
  DatabaseReadOnlyException - database was configured as read-only.



reflector
static Reflector reflector()(Code)



version
final public static String version()(Code)
returns the version name of the used db4o version.

version information as a String.



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.