Community
Participate
Working Groups
>The following IdentityMapAccessor.invalidateClass() code can be optimized to check the invalidationState before resetting it to CACHE_KEY_INVALID=-1. If the recurse boolean is set to true and all implementing subclasses of a particular class in the identityMap are invalidated in a single invalidateClass() call then code that references individual classes of this invalidated inheritance tree will re-invalidate the keys unnecessarily. >The following key is already invalidated key HardCacheWeakIdentityMap$ReferenceCacheKey (id=123) invalidationState -1 >in a previous call to public void invalidateClass(Class myClass, boolean recurse) { ... if (recurse || ((obj != null) && obj.getClass().equals(myClass))) { key.setInvalidationState(CacheKey.CACHE_KEY_INVALID); >See implementor CacheImpl.evict() in bug# 248780
>this enhancement still occurs but is modified because of the optimization in bug# 312503
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink