public class ClassloadingMutexProvider
extends Object
Java 7+ onwards allows parallel classloading. Therefore we can define use a lock with per-class granularity.
However in Java 6 we have to use a fat global lock.
This abstraction provides a suitable mutex depending on the version of underlying platform.
The provided mutexes are closeable as we want to know when the granular mutexes from Java are no longer needed.