| Modifier and Type | Field and Description |
|---|---|
| public static final Object | INVALID_NATURAL_ID_REFERENCE
Marker reference used to indicate that a given natural-id is invalid |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if a new entry was actually added; false otherwise.Caches a natural-id-to-identifier resolution. |
| public void | |
| public void | |
| public Object | findCachedIdByNaturalId(Object naturalId, EntityMappingType entityDescriptor)
Find the cached identifier for the given natural-id |
| public Object | Returns: The cross-referenced natural-id values ornullFind the cached natural-id for the given identifier |
| public Collection | Returns: The primary keysFind all the locally cached primary key cross-reference entries for the given entity. |
| public void | handleEviction(Object id, Object object, EntityMappingType entityDescriptor)
Called on |
| public void | handleSynchronization(Object id, Object entity, EntityMappingType entityDescriptor)
Part of the "load synchronization process". |
| public void | manageLocalResolution(Object id, Object naturalIdValue, EntityMappingType entityDescriptor, CachedNaturalIdValueSource source)
Ensures that the necessary local cross-reference exists. |
| public void | manageSharedResolution(Object id, Object naturalId, Object previousNaturalId, EntityMappingType entityDescriptor, CachedNaturalIdValueSource source)
Ensures that the necessary cross-reference exists in the L2 cache |
| public Object | removeLocalResolution(Object id, Object naturalId, EntityMappingType entityDescriptor)
Removes any local cross-reference, returning the previously cached value if one. |
| public Object | Returns: The cached values, if any. May be different from incoming values.Removes a natural-id-to-identifier resolution. |
| public void | removeSharedResolution(Object id, Object naturalId, EntityMappingType entityDescriptor)
Removes any cross-reference from the L2 cache |
| INVALID_NATURAL_ID_REFERENCE | back to summary |
|---|---|
| public static final Object INVALID_NATURAL_ID_REFERENCE Marker reference used to indicate that a given natural-id is invalid | |
| cacheResolution | back to summary |
|---|---|
| public boolean cacheResolution(Object id, Object naturalId, EntityMappingType entityDescriptor) Caches a natural-id-to-identifier resolution. Handles both the local (transactional) and shared (second-level) caches.
| |
| cacheResolutionFromLoad | back to summary |
|---|---|
| public void cacheResolutionFromLoad(Object id, Object naturalId, EntityMappingType entityDescriptor) | |
| cleanupFromSynchronizations | back to summary |
|---|---|
| public void cleanupFromSynchronizations() The clean up process of | |
| findCachedIdByNaturalId | back to summary |
|---|---|
| public Object findCachedIdByNaturalId(Object naturalId, EntityMappingType entityDescriptor) Find the cached identifier for the given natural-id
| |
| findCachedNaturalIdById | back to summary |
|---|---|
| public Object findCachedNaturalIdById(Object id, EntityMappingType entityDescriptor) Find the cached natural-id for the given identifier
| |
| getCachedPkResolutions | back to summary |
|---|---|
| public Collection Find all the locally cached primary key cross-reference entries for the given entity.
| |
| handleEviction | back to summary |
|---|---|
| public void handleEviction(Object id, Object object, EntityMappingType entityDescriptor) Called on | |
| handleSynchronization | back to summary |
|---|---|
| public void handleSynchronization(Object id, Object entity, EntityMappingType entityDescriptor) Part of the "load synchronization process". Responsible for maintaining cross-reference entries when natural-id values were found to have changed.
Also responsible for tracking the old values as no longer valid until the next flush
because otherwise going to the database would just re-pull the old values as valid.
In this responsibility,
| |
| manageLocalResolution | back to summary |
|---|---|
| public void manageLocalResolution(Object id, Object naturalIdValue, EntityMappingType entityDescriptor, CachedNaturalIdValueSource source) Ensures that the necessary local cross-reference exists. Specifically, this only effects the persistence-context cache, not the L2 cache | |
| manageSharedResolution | back to summary |
|---|---|
| public void manageSharedResolution(Object id, Object naturalId, Object previousNaturalId, EntityMappingType entityDescriptor, CachedNaturalIdValueSource source) Ensures that the necessary cross-reference exists in the L2 cache | |
| removeLocalResolution | back to summary |
|---|---|
| public Object removeLocalResolution(Object id, Object naturalId, EntityMappingType entityDescriptor) Removes any local cross-reference, returning the previously cached value if one. Again, this only effects the persistence-context cache, not the L2 cache | |
| removeResolution | back to summary |
|---|---|
| public Object removeResolution(Object id, Object naturalId, EntityMappingType entityDescriptor) Removes a natural-id-to-identifier resolution. Handles both the local (transactional) and shared (second-level) caches.
| |
| removeSharedResolution | back to summary |
|---|---|
| public void removeSharedResolution(Object id, Object naturalId, EntityMappingType entityDescriptor) Removes any cross-reference from the L2 cache | |