a
and b
into Persistit, and will then traverse the resulting tree and print the names of the classes of the key values. The question is whether "MyClass2" will be printed before or after "MyClass2". The answer depends on the order in which MyClass1 and MyClass2 were first registered within Persistit. At the time a new class is first registered, Persistit assigns a permanent int
-valued class handle to the class. Whenever an instance of that class is encoded within either a Key
or a Value
, that handle value, rather than the class name, is used. This reduces disk, memory and CPU consumption whenever Persistit stores or retrieves objects. Handles are assigned in increasing numeric order as classes are registered. Thus if MyClass1
was registered before MyClass2
, it will precede MyClass2
in traversal order. Otherwise it will follow MyClass2
.
|
|