db4o

Configuration.activationDepth Method 

sets the activation depth to the specified value.

void activationDepth(
   int depth
);

Parameters

depth
the desired global activation depth.

Remarks

sets the activation depth to the specified value.

Why activation?
During the instantiation of stored objects from persistent storage, the instantiation of members needs to be limited to a certain depth. Otherwise a possible root object would completely instantiate all stored objects to memory.

db4o uses a preconfigured "activation depth" of 5.

If an object is returned in an ObjectSet as a result of a get

            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 activate .

Note that raising the global activation depth will consume more memory and have negative effects on the performance of first-time retrievals. Lowering the global activation depth needs more individual activation work but can increase performance of queries.

deactivate can be used to manually free memory by deactivating objects.

Examples: ../com/db4o/samples/activate.

See Also

Configuration Interface | com.db4o.config Namespace | maximumActivationDepth