hazelcast/hazelcast — pull request #2523 by MrEasy (2014-05-21 15:20:46+00:00)
Title: ClassLoaderUtil caching Classes

Fixes https://github.com/hazelcast/hazelcast/issues/1162
As written in issue:
I made some tests with the current constructor cache and results are disappointing; I get high CPU usage due to constant Class-loading, since the classes are not cached.
Also from my point of view, the constructor cache has some flaws, like using WeakReferences instead of SoftReferences (see my comment above), and also the cache being initialized with string keys, which makes him a candidate for a memory leak.

This PR, builds upon the current cache implementation, but caches the classes and eliminates those 2 concerns above and resolves the issue in my tests.