blob: 10d872d017a78fccbf6bceba90627f41a23ef822 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
package cbt
import java.net._
import java.util.concurrent.ConcurrentHashMap
import collection.JavaConversions._
class ClassLoaderCache(logger: Logger){
val persistent = new KeyLockedLazyCache(
NailgunLauncher.classLoaderCacheKeys.asInstanceOf[ConcurrentHashMap[String,AnyRef]],
NailgunLauncher.classLoaderCacheValues.asInstanceOf[ConcurrentHashMap[AnyRef,ClassLoader]],
Some(logger)
)
val transient = new KeyLockedLazyCache(
new ConcurrentHashMap[String,AnyRef],
new ConcurrentHashMap[AnyRef,ClassLoader],
Some(logger)
)
override def toString = s"""ClassLoaderCache("""+ persistent.keys.keySet.toVector.map(_.toString).sorted.map(" "++_).mkString("\n","\n","\n") +""")"""
}
|