If a key or value that does not implement {@link ManagedObject} isstored in the map, then it is wrapped using the {@link ManagedSerializable} utility class so that the entry may have a {@code ManagedReference} to the value, rather than a standard reference.
This class performs an optimization if both key and value do not implement {@code ManagedObject}. In this case, both objects will be stored together in a {@code KeyValuePair}, which reduces the number of accesses to the data store.
Note that the ordering of entries depends on the object ID of the managed object that represents the key. To insure the proper behavior of the iterator, that object ID must not change after the entry is created. The object ID used is either that of the key itself, if the key is a managed object, or that of the ManagedSerializable wrapper created to wrap either the just key or both the key and value. In either case, the managed object associated with the key is determined in the constructor @see ManagedSerializable
|
|
|
|
|
|