Oracle TopLink Developer's Guide
10g Release 3 (10.1.3) B13593-01 |
|
Previous |
Next |
The TopLink cache is an in-memory repository that stores recently read or written objects based on class and primary key values. TopLink uses the cache to do the following:
improve performance by holding recently read or written objects and accessing them in-memory to minimize database access
manage locking and isolation level
manage object identity
Table 28-13 summarizes which descriptors support identity map configuration.
Table 28-13 Descriptor Support for Identity Map
Descriptor | Using TopLink Workbench
|
Using Java
|
---|---|---|
Relational DescriptorsFoot 1 |
|
|
Object-Relational Descriptors |
|
|
EIS DescriptorsFoot 2 |
|
|
XML Descriptors |
|
|
Footnote 1 Relational class descriptors only (see "Relational Class Descriptors").
Footnote 2 EIS root descriptors only (see "EIS Root Descriptors").
This configuration overrides the default identity map configuration defined at the project level (see "Configuring Cache Type and Size at the Project Level").
For detailed information on caching and object identity, and the recommended settings to maximize TopLink performance, see to "Cache Type and Object Identity".
For more information about the cache, see "Understanding the Cache".
To specify the identity map information for a descriptor, use this procedure:
Select the descriptor in the Navigator.
Select the Caching tab in the Editor. The Caching tab appears.
Figure 28-25 Caching Tab, Identity Map Options
Use the following table to enter data in following fields on the Caching tab:
Field | Description |
---|---|
TypeFoot 1 | Use the Type list to choose the identity map:
For more information, see "Cache Type and Object Identity". Changing the project's default identity map does not affect descriptors that already exist in the project. |
SizeFootref 1 | Specify the size of the cache.
|
Default | When you enter a cache size, the Default check box is cleared. To reset the size to the default for the selected cache type, check the Default check box. |
Footnote 1 If a descriptor is a child in an inheritance hierarchy, TopLink makes this field read only and displays the options from the parent root descriptor. For more information, see "Inheritance".
Use one of the following ClassDescriptor
methods to configure the descriptor to use the appropriate type of identity map:
useFullIdentitMap
useWeakIdentityMap
useSoftCacheWeakIdentityMap
useHardCacheWeakIdentityMap
useNoIdentityMap
Use the ClassDescriptor
method setIdentityMapSize
to configure the size of the identity map.