|
db4o 2.5 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
configuration interface for db4o.
This interface contains methods to configure db4o. All methods
should be called before starting the db4o engine.
Db4o.configure()
returns the single global Configuration object.
Method Summary | |
void |
activationDepth(int depth)
sets the activation depth to the specified value. |
void |
automaticShutDown(boolean flag)
turns automatic shutdown of the engine on and off. |
void |
callbacks(boolean flag)
turns ObjectCallback
methods on and off.
|
void |
classActivationDepthConfigurable(boolean flag)
turns individual class activation depth configuration on and off. |
void |
encrypt(boolean flag)
configures the use of encryption. |
void |
exceptionsOnNotStorable(boolean flag)
configures whether Exceptions are to be thrown, if objects can not be stored. |
MessageSender |
getMessageSender()
returns the MessageSender for this Configuration context. |
void |
lockDatabaseFile(boolean flag)
can be used to turn the database file locking thread off. |
void |
messageLevel(int level)
sets the detail level of db4o messages. |
ObjectClass |
objectClass(java.lang.String className)
returns an ObjectClass object
to configure the specified class.
|
void |
password(java.lang.String pass)
protects the database file with a password. |
void |
readOnly(boolean flag)
turns readOnly mode on and off. |
void |
reflectWith(IReflect reflector)
configures the use of a specially designed reflection implementation. |
void |
refreshClasses()
forces analysation of all Classes during a running session. |
void |
setBlobPath(java.lang.String path)
configures the path to be used to store and read Blob data. |
void |
setClassLoader(java.lang.ClassLoader classLoader)
configures db4o to use a custom ClassLoader. |
void |
setMessageRecipient(MessageRecipient messageRecipient)
sets the MessageRecipient to receive Client Server messages. |
void |
setOut(java.io.PrintStream outStream)
assigns a PrintStream where db4o is to print its event messages.
|
void |
unicode(boolean flag)
configures the storage format of Strings. |
void |
updateDepth(int depth)
specifies the global updateDepth. |
void |
weakReferences(boolean flag)
turns weak reference management on or off. |
Method Detail |
public void activationDepth(int depth)
ObjectSet
as a result of a
query
object.member1.member2.member3.member4.member5
will be instantiated.
member5 will have all it's members set to null. Primitive
types will have the default values respectively. In db4o terminology, the
state of member5 is called DEACTIVATED
. member5 can be
activated by calling
ObjectContainer#activate(member5, depth)
.
ObjectContainer#deactivate(Object, depth)
can be used to
manually free memory by deactivating objects.
depth
- the desired global activation depth.public void automaticShutDown(boolean flag)
Runtime.addShutdownHook()
System.runFinalizersOnExit(true)
and code
in the finalizer.true
.flag
- whether db4o should shut down automatically.public void callbacks(boolean flag)
ObjectCallback
methods on and off.
flag
- false to turn callback methods offObjectCallbacks
public void classActivationDepthConfigurable(boolean flag)
flag
- false to turn the possibility to individually configure class
activation depths offpublic void encrypt(boolean flag)
Db4o.openFile()
.flag
- true for turning encryption on, false for turning encryption
off.password()
public void exceptionsOnNotStorable(boolean flag)
ObjectNotStorableException
if an object can not be stored.
flag
- true to throw Exceptions if objects can not be stored.public MessageSender getMessageSender()
public void messageLevel(int level)
level
- integer from 0 to 3
Db4o.setOut(PrintStream)
public void lockDatabaseFile(boolean flag)
true
.flag
- false
to turn database file locking off.public ObjectClass objectClass(java.lang.String className)
ObjectClass
object
to configure the specified class.
className
- the fully qualified name of the class to be configured.ObjectClass
object for configuration.public void password(java.lang.String pass)
Db4o.openFile()
.String
- the password to be used.public void readOnly(boolean flag)
Db4o.openFile()
will open files.flag
- true
for configuring readOnly mode for subsequent
calls to
Db4o.openFile()
.public void reflectWith(IReflect reflector)
public void refreshClasses()
public void setBlobPath(java.lang.String path) throws java.io.IOException
path
- the path to be usedpublic void setClassLoader(java.lang.ClassLoader classLoader)
ClassLoader
- the ClassLoader to be usedpublic void setMessageRecipient(MessageRecipient messageRecipient)
MessageRecipient
- the MessageRecipient to be usedpublic void setOut(java.io.PrintStream outStream)
PrintStream
where db4o is to print its event messages.
Db4o.configure().messageLevel()
to produce more detailed
messages.
setOut(System.out)
to print messages to the
console.outStream
- the new PrintStream
for messages.public void unicode(boolean flag)
Db4o.openFile()
.
db4o database files keep their string format after creation.false
true
flag
- true
for turning Unicode support on,
false
for turning Unicode
support off.public void updateDepth(int depth)
depth
- the depth of the desired update.ObjectClass#updateDepth()
,
ObjectClass#cascadeOnUpdate()
,
public void weakReferences(boolean flag)
ExtObjectContainer.html#purge(java.lang.Object)
true
.
|
db4o 2.5 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |