Avoid using same cache instance for storing CacheValue and evictAll notifications
---------------------------------------------------------------------------------
Key: HHH-4713
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4713
Project: Hibernate Core
Issue Type: Bug
Components: caching (L2)
Affects Versions: 3.5.0-Beta-2
Reporter: Galder Zamarreno
Assignee: Galder Zamarreno
Fix For: 3.5
Store evictAll information in a separate infinispan cache instance in order to avoid doing
stuff like this in BaseRegion.toMap which could be quite expensive in the context of
SecondLevelCacheStatistics calculations:
public Map toMap() {
if (checkValid()) {
// If copying causes issues, provide a lazily loaded Map
Map map = new HashMap();
Set<Map.Entry> entries = cacheAdapter.toMap().entrySet();
for (Map.Entry entry : entries) {
Object key = entry.getKey();
if (!CacheHelper.isEvictAllNotification(key)) {
map.put(key, entry.getValue());
}
}
return map;
}
return Collections.EMPTY_MAP;
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira