Db4oFactory Class

Summary

factory class to start db4o database engines.
Assembly
Db4objects.Db4o-2010.dll
Namespace
Db4objects.Db4o
Base Types
  • Object
graph BT Type-->Base0["Object"] Type["Db4oFactory"] class Type type-node

Syntax

[System.ObsoleteAttribute(@"Since 8.1. Use Db4oEmbedded , Db4oClientServer and Db4oVersion classes instead.")]
public class Db4oFactory

Remarks

factory class to start db4o database engines.

This class provides static methods to
- open single-user databases Db4objects.Db4o.Db4oFactory.OpenFile(System.String)
- open db4o servers Db4objects.Db4o.Db4oFactory.OpenServer(System.String,System.Int32)
- connect to db4o servers Db4objects.Db4o.Db4oFactory.OpenClient(System.String,System.Int32,System.String,System.String)
- provide access to the global configuration context Db4objects.Db4o.Db4oFactory.Configure
- print the version number of this db4o version Db4objects.Db4o.Db4oFactory.Main(System.String[])

Attributes

Type Description
ObsoleteAttribute

Methods

Name Value Summary
CloneConfiguration() IConfiguration
Creates a clone of the global db4o Db4objects.Db4o.Config.IConfiguration .
static
Configure() IConfiguration
returns the global db4o Db4objects.Db4o.Config.IConfiguration context for the running VM session.

The Db4objects.Db4o.Config.IConfiguration can be overridden in each Db4objects.Db4o.Ext.IExtObjectContainer.Configure .

static
Main(string[]) void
prints the version name of this db4o version to Sharpen.Runtime.Out .
static
NewConfiguration() IConfiguration
Creates a fresh Db4objects.Db4o.Config.IConfiguration instance.
static
OpenClient(IConfiguration, string, int, string, string) IObjectContainer
opens an Db4objects.Db4o.IObjectContainer client and connects it to the specified named server and port.

The server needs to Db4objects.Db4o.IObjectServer.GrantAccess(System.String,System.String) for the specified user and password.

A client Db4objects.Db4o.IObjectContainer can be cast to Db4objects.Db4o.Ext.IExtClient to use extended Db4objects.Db4o.Ext.IExtObjectContainer and Db4objects.Db4o.Ext.IExtClient methods.

static
OpenClient(string, int, string, string) IObjectContainer
Operates just like Db4objects.Db4o.Db4oFactory.OpenClient(Db4objects.Db4o.Config.IConfiguration,System.String,System.Int32,System.String,System.String) , but uses the global db4o Db4objects.Db4o.Config.IConfiguration context. opens an Db4objects.Db4o.IObjectContainer client and connects it to the specified named server and port.

The server needs to Db4objects.Db4o.IObjectServer.GrantAccess(System.String,System.String) for the specified user and password.

A client Db4objects.Db4o.IObjectContainer can be cast to Db4objects.Db4o.Ext.IExtClient to use extended Db4objects.Db4o.Ext.IExtObjectContainer and Db4objects.Db4o.Ext.IExtClient methods.

static
OpenFile(IConfiguration, string) IObjectContainer
opens an Db4objects.Db4o.IObjectContainer on the specified database file for local use.

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

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

static
OpenFile(string) IObjectContainer
Operates just like Db4objects.Db4o.Db4oEmbedded.OpenFile(Db4objects.Db4o.Config.IEmbeddedConfiguration,System.String) , but uses the global db4o Db4objects.Db4o.Config.IConfiguration context. opens an Db4objects.Db4o.IObjectContainer on the specified database file for local use.

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

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

static
OpenServer(IConfiguration, string, int) IObjectServer
opens an Db4objects.Db4o.IObjectServer 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 Db4objects.Db4o.IObjectServer.OpenClient , specify '0' as the port number.
static
OpenServer(string, int) IObjectServer
Operates just like Db4objects.Db4o.Db4oFactory.OpenServer(Db4objects.Db4o.Config.IConfiguration,System.String,System.Int32) , but uses the global db4o Db4objects.Db4o.Config.IConfiguration context. opens an Db4objects.Db4o.IObjectServer 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 Db4objects.Db4o.IObjectServer.OpenClient , specify '0' as the port number.
static
Version() string
returns the version name of the used db4o version.
static

See Also

  • ExtDb4o