public class Db4oEmbedded
extends java.lang.Object
class in
db4o-[version]-cs-java[java-version].jar
for methods to open db4o servers and db4o clients.| Constructor and Description |
|---|
Db4oEmbedded() |
| Modifier and Type | Method and Description |
|---|---|
static EmbeddedConfiguration |
newConfiguration()
Creates a fresh
EmbeddedConfiguration instance. |
static EmbeddedObjectContainer |
openFile(EmbeddedConfiguration config,
java.lang.String databaseFileName)
opens an
ObjectContainer
on the specified database file for local use. |
static EmbeddedObjectContainer |
openFile(java.lang.String databaseFileName)
Same as calling
openFile(EmbeddedConfiguration, String) with a fresh configuration (newConfiguration()). |
public static EmbeddedConfiguration newConfiguration()
EmbeddedConfiguration instance.public static final EmbeddedObjectContainer openFile(EmbeddedConfiguration config, java.lang.String databaseFileName) throws Db4oIOException, DatabaseFileLockedException, IncompatibleFileFormatException, OldFormatException, DatabaseReadOnlyException
ObjectContainer
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 newConfigurationdatabaseFileName - 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 EmbeddedObjectContainer openFile(java.lang.String databaseFileName) throws Db4oIOException, DatabaseFileLockedException, IncompatibleFileFormatException, OldFormatException, DatabaseReadOnlyException
openFile(EmbeddedConfiguration, String) with a fresh configuration (newConfiguration()).databaseFileName - an absolute or relative path to the database fileDb4oIOExceptionDatabaseFileLockedExceptionIncompatibleFileFormatExceptionOldFormatExceptionDatabaseReadOnlyExceptionopenFile(EmbeddedConfiguration, String)