public class Db4o
extends java.lang.Object
openFile(String) openServer(String, int) openClient(String, int, String, String) configure() main(String[])ExtDb4o for extended functionality.| Constructor and Description |
|---|
Db4o() |
| Modifier and Type | Method and Description |
|---|---|
static Configuration |
cloneConfiguration()
Deprecated.
use explicit configuration via
Db4oEmbedded.newConfiguration() instead |
static Configuration |
configure()
Deprecated.
use explicit configuration via
Db4oEmbedded.newConfiguration() instead |
static void |
main(java.lang.String[] args)
prints the version name of this db4o version to
System.out. |
static Configuration |
newConfiguration()
Deprecated.
Use
Db4oEmbedded.newConfiguration() instead. |
static ObjectContainer |
openClient(Configuration config,
java.lang.String hostName,
int port,
java.lang.String user,
java.lang.String password)
Deprecated.
See the
com.db4o.cs.Db4oClientServer class in
db4o-X.x-cs-java.jar
for methods to open db4o servers and db4o clients. |
static ObjectContainer |
openClient(java.lang.String hostName,
int port,
java.lang.String user,
java.lang.String password)
Deprecated.
See the
com.db4o.cs.Db4oClientServer class in
db4o-X.x-cs-java.jar
for methods to open db4o servers and db4o clients. |
static ObjectContainer |
openFile(Configuration config,
java.lang.String databaseFileName)
Deprecated.
|
static ObjectContainer |
openFile(java.lang.String databaseFileName)
Deprecated.
|
static ObjectServer |
openServer(Configuration config,
java.lang.String databaseFileName,
int port)
Deprecated.
See the
com.db4o.cs.Db4oClientServer class in
db4o-X.x-cs-java.jar
for methods to open db4o servers and db4o clients. |
static ObjectServer |
openServer(java.lang.String databaseFileName,
int port)
Deprecated.
See the
com.db4o.cs.Db4oClientServer class in
db4o-X.x-cs-java.jar
for methods to open db4o servers and db4o clients. |
static java.lang.String |
version()
returns the version name of the used db4o version.
|
public static void main(java.lang.String[] args)
System.out.public static Configuration configure()
Db4oEmbedded.newConfiguration() insteadConfiguration context
for the running JVM session.
Configuration
can be overriden in each
ObjectContainer.configuration contextpublic static Configuration newConfiguration()
Db4oEmbedded.newConfiguration() instead.Configuration instance.public static Configuration cloneConfiguration()
Db4oEmbedded.newConfiguration() insteadConfiguration.public static ObjectContainer openClient(java.lang.String hostName, int port, java.lang.String user, java.lang.String password) throws Db4oIOException, OldFormatException, InvalidPasswordException
com.db4o.cs.Db4oClientServer class in
db4o-X.x-cs-java.jar
for methods to open db4o servers and db4o clients.openClient(Configuration, String, int, String, String), but uses
the global db4o Configuration context.
opens an ObjectContainer
client and connects it to the specified named server and port.
allow access for the specified user and password.
ObjectContainer can be cast to
ExtClient to use extended
ExtObjectContainer
and ExtClient methods.
hostName - the host nameport - the port the server is usinguser - the user namepassword - the user passwordObjectContainerDb4oIOException - I/O operation failed or was unexpectedly interrupted.OldFormatException - open operation failed because the database file
is in old format and Configuration.allowVersionUpdates(boolean)
is set to false.InvalidPasswordException - password supplied for the connection is
invalid.ObjectServer.grantAccess(java.lang.String, java.lang.String)public static ObjectContainer openClient(Configuration config, java.lang.String hostName, int port, java.lang.String user, java.lang.String password) throws Db4oIOException, OldFormatException, InvalidPasswordException
com.db4o.cs.Db4oClientServer class in
db4o-X.x-cs-java.jar
for methods to open db4o servers and db4o clients.ObjectContainer
client and connects it to the specified named server and port.
allow access for the specified user and password.
ObjectContainer can be cast to
ExtClient to use extended
ExtObjectContainer
and ExtClient methods.
config - a custom Configuration instance to be obtained via Db4oEmbedded.newConfiguration()hostName - the host nameport - the port the server is usinguser - the user namepassword - the user passwordObjectContainerDb4oIOException - I/O operation failed or was unexpectedly interrupted.OldFormatException - open operation failed because the database file
is in old format and Configuration.allowVersionUpdates(boolean)
is set to false.InvalidPasswordException - password supplied for the connection is
invalid.ObjectServer.grantAccess(java.lang.String, java.lang.String)public static final ObjectContainer openFile(java.lang.String databaseFileName) throws Db4oIOException, DatabaseFileLockedException, IncompatibleFileFormatException, OldFormatException, DatabaseReadOnlyException
Db4oEmbedded.openFile(EmbeddedConfiguration, String) insteadDb4oEmbedded#openFile(Configuration, String), but uses
the global db4o Configuration context.
opens an ObjectContainer
on the specified database file for local use.
ObjectContainer against the same file will result in
a DatabaseFileLockedException.databaseFileName - an absolute or relative path to the database fileObjectContainerDb4oIOException - I/O operation failed or was unexpectedly interrupted.DatabaseFileLockedException - the required database file is locked by
another process.IncompatibleFileFormatException - runtime
configuration is not compatible
with the configuration of the database file.OldFormatException - open operation failed because the database file
is in old format and Configuration.allowVersionUpdates(boolean)
is set to false.DatabaseReadOnlyException - database was configured as read-only.Configuration.readOnly(boolean),
Configuration.encrypt(boolean),
Configuration.password(java.lang.String)public static final ObjectContainer openFile(Configuration config, java.lang.String databaseFileName) throws Db4oIOException, DatabaseFileLockedException, IncompatibleFileFormatException, OldFormatException, DatabaseReadOnlyException
Db4oEmbedded.openFile(EmbeddedConfiguration, String) insteadObjectContainer
on the specified database file for local use.
ObjectContainer against the same file will result in
a DatabaseFileLockedException.config - a custom Configuration instance to be obtained via Db4oEmbedded.newConfiguration()databaseFileName - an absolute or relative path to the database fileObjectContainerDb4oIOException - I/O operation failed or was unexpectedly interrupted.DatabaseFileLockedException - the required database file is locked by
another process.IncompatibleFileFormatException - runtime
configuration is not compatible
with the configuration of the database file.OldFormatException - open operation failed because the database file
is in old format and Configuration.allowVersionUpdates(boolean)
is set to false.DatabaseReadOnlyException - database was configured as read-only.Configuration.readOnly(boolean),
Configuration.encrypt(boolean),
Configuration.password(java.lang.String)public static final ObjectServer openServer(java.lang.String databaseFileName, int port) throws Db4oIOException, IncompatibleFileFormatException, OldFormatException, DatabaseFileLockedException, DatabaseReadOnlyException
com.db4o.cs.Db4oClientServer class in
db4o-X.x-cs-java.jar
for methods to open db4o servers and db4o clients.openServer(Configuration, String, int), but uses
the global db4o Configuration context.
opens an ObjectServer
on the specified database file and port.
ObjectServer.openClient(), specify '0' as the
port number.databaseFileName - an absolute or relative path to the database fileport - 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().ObjectServer listening
on the specified port.Db4oIOException - I/O operation failed or was unexpectedly interrupted.DatabaseFileLockedException - the required database file is locked by
another process.IncompatibleFileFormatException - runtime
configuration is not compatible
with the configuration of the database file.OldFormatException - open operation failed because the database file
is in old format and Configuration.allowVersionUpdates(boolean)
is set to false.DatabaseReadOnlyException - database was configured as read-only.Configuration.readOnly(boolean),
Configuration.encrypt(boolean),
Configuration.password(java.lang.String)public static final ObjectServer openServer(Configuration config, java.lang.String databaseFileName, int port) throws Db4oIOException, IncompatibleFileFormatException, OldFormatException, DatabaseFileLockedException, DatabaseReadOnlyException
com.db4o.cs.Db4oClientServer class in
db4o-X.x-cs-java.jar
for methods to open db4o servers and db4o clients.ObjectServer
on the specified database file and port.
ObjectServer.openClient(), specify '0' as the
port number.config - a custom Configuration instance to be obtained via Db4oEmbedded.newConfiguration()databaseFileName - an absolute or relative path to the database fileport - 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().ObjectServer listening
on the specified port.Db4oIOException - I/O operation failed or was unexpectedly interrupted.DatabaseFileLockedException - the required database file is locked by
another process.IncompatibleFileFormatException - runtime
configuration is not compatible
with the configuration of the database file.OldFormatException - open operation failed because the database file
is in old format and Configuration.allowVersionUpdates(boolean)
is set to false.DatabaseReadOnlyException - database was configured as read-only.Configuration.readOnly(boolean),
Configuration.encrypt(boolean),
Configuration.password(java.lang.String)public static final java.lang.String version()
String.