openjpa/openjpa-lib/src
Patrick Linskey c9fd781007 Simplify algorithm in NullSafeConcurrentHashMap; change SizedConcurrentHashMap's algorithms to remove overflow before putting new records into cache instead of after to avoid removing the very instances that were put.
git-svn-id: https://svn.apache.org/repos/asf/openjpa/branches/1.1.x@652930 13f79535-47bb-0310-9956-ffa450edef68
2008-05-02 22:21:51 +00:00
..
main Simplify algorithm in NullSafeConcurrentHashMap; change SizedConcurrentHashMap's algorithms to remove overflow before putting new records into cache instead of after to avoid removing the very instances that were put. 2008-05-02 22:21:51 +00:00
test OPENJPA-544. JDK1.5 conversion hangover. Introduce pseudo-random behavior into NullSafeConcurrentHashMap. This is important for the various data structures in OpenJPA and derivitaves (mostly caches) that rely on pseudo-random cache removal. These data structures were exacerbated by the fact that ConcurrentHashMap seems to return an Iterator that is approximately LIFO, which is often the worst possible algorithm. This change is pseudo-random in the face of 16 random removes / accesses per put() call; this behavior is hard coded and could be tweaked to become configurable / adaptive. 2008-05-01 13:56:17 +00:00