db4o

Configuration Members

Configuration overview

Public Instance Methods

activationDepth sets the activation depth to the specified value.
automaticShutDown turns automatic shutdown of the engine on and off.
blockSize sets the storage data blocksize for new ObjectContainers.
callbacks turns callback methods on and off.
callConstructors advises db4o to try instantiating objects with/without calling constructors.
classActivationDepthConfigurable turns maximumActivationDepth on and off.

This feature is turned on by default.

detectSchemaChanges tuning feature: configures whether db4o checks all persistent classes upon system startup, for added or removed fields.
disableCommitRecovery turns commit recovery off.
discardFreeSpace tuning feature: configures the minimum size of free space slots in the database file that are to be reused.
encrypt configures the use of encryption.
exceptionsOnNotStorable configures whether Exceptions are to be thrown, if objects can not be stored.
flushFileBuffers configures file buffers to be flushed during transaction commits.
freespace returns the freespace configuration interface
generateUUIDs configures db4o to generate UUIDs for stored objects.
generateVersionNumbers configures db4o to generate version numbers for stored objects.
getMessageSender returns the MessageSender for this Configuration context.
internStrings Configures db4o to call intern() on strings upon retrieval.
io allows to configure db4o to use a customized byte IO adapter.
lockDatabaseFile can be used to turn the database file locking thread off.
markTransient allows to mark fields as transient with custom attributes.
messageLevel sets the detail level of db4o messages.
objectClass returns an ObjectClass object to configure the specified class.

The clazz parameter can be any of the following:
- a fully qualified classname as a String.
- a Class object.
- any other object to be used as a template.

optimizeNativeQueries Overloaded. If set to true, db4o will try to optimize native queries dynamically at query execution time, otherwise it will run native queries in unoptimized mode as SODA evaluations.
password protects the database file with a password.
readOnly turns readOnly mode on and off.
reflectWith configures the use of a specially designed reflection implementation.
refreshClasses forces analysis of all Classes during a running session.
reserveStorageSpace tuning feature only: reserves a number of bytes in database files.
setBlobPath configures the path to be used to store and read Blob data.
setClassLoader configures db4o to use a custom ClassLoader.
setMessageRecipient sets the MessageRecipient to receive Client Server messages.
setOut Assigns a PrintStream where db4o is to print its event messages.

Messages are useful for debugging purposes and for learning to understand, how db4o works. The message level can be raised with messageLevel to produce more detailed messages.

Use
setOut(System.out)
to print messages to the console.

singleThreadedClient configures the client messaging system to be single threaded or multithreaded.
testConstructors tuning feature: configures whether db4o should try to instantiate one instance of each persistent class on system startup.
timeoutClientSocket configures the time a client waits for a message response from the server.
timeoutPingClients configures the delay time after which the server starts pinging connected clients to check the connection.
timeoutServerSocket configures the timeout of the serverside socket.
unicode configures the storage format of Strings.
updateDepth specifies the global updateDepth.
weakReferenceCollectionInterval configures the timer for WeakReference collection.
weakReferences turns weak reference management on or off.

See Also

Configuration Interface | com.db4o.config Namespace