Skip Headers
Oracle TopLink Developer's Guide
10g Release 3 (10.1.3)
B13593-01
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

Configuring Cache Type and Size at the Descriptor Level

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:

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 

Supported.


Supported.


Object-Relational Descriptors

Unsupported

Supported.


EIS DescriptorsFoot 2 

Supported.


Supported.


XML Descriptors

Unsupported
Unsupported

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

Using TopLink Workbench

To specify the identity map information for a descriptor, use this procedure:

  1. Select the descriptor in the Navigator.

  2. Select the Caching tab in the Editor. The Caching tab appears.

    Figure 28-25 Caching Tab, Identity Map Options

    Description of Figure 28-25  follows
    Description of "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.
  • When using Weak with Soft Subcache or Weak with Hard Subcache, the size is the size of the subcache.

  • When using Full or Weak, the size indicates the starting size of the identity map.

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

Using Java

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.