ClassLoaderCachedFactory

mill.util.ClassLoaderCachedFactory
abstract class ClassLoaderCachedFactory[T](jobs: Int)(implicit e: Enclosing) extends CachedFactory[Seq[PathRef], T]

Combination of CachedFactory and RefCountedClassLoaderCache, providing an easy way to generate values of type T to each be used in a single-thread while re-using the underling URLClassLoaders where possible.

Attributes

Source
ClassLoaderCachedFactory.scala
Graph
Supertypes
class CachedFactory[Seq[PathRef], T]
class CachedFactoryWithInitData[Seq[PathRef], Unit, T]
trait AutoCloseable
class Object
trait Matchable
class Any
Show all
Known subtypes

Members list

Value members

Abstract methods

def getValue(cl: ClassLoader): T

Attributes

Source
ClassLoaderCachedFactory.scala

Concrete methods

override def close(): Unit

Attributes

Definition Classes
CachedFactoryWithInitData -> AutoCloseable
Source
ClassLoaderCachedFactory.scala
override def maxCacheSize: Int

Attributes

Definition Classes
Source
ClassLoaderCachedFactory.scala
override def setup(key: Seq[PathRef]): T

Attributes

Definition Classes
Source
ClassLoaderCachedFactory.scala
override def teardown(key: Seq[PathRef], value: T): Unit

Attributes

Definition Classes
Source
ClassLoaderCachedFactory.scala

Inherited methods

def cacheEntryStillValid(key: Seq[PathRef], initData: => Unit, value: T): Boolean

Returns true if the cache entry associated with the given key is still valid, false otherwise.

Returns true if the cache entry associated with the given key is still valid, false otherwise.

If false, the entry will be removed from the cache and setup will be invoked.

Attributes

Inherited from:
CachedFactoryWithInitData
Source
CachedFactory.scala
final def setup(key: Seq[PathRef], initData: Unit): T

Attributes

Inherited from:
CachedFactory
Source
CachedFactory.scala
def withValue[R](key: Seq[PathRef])(block: T => R): R

Attributes

Inherited from:
CachedFactory
Source
CachedFactory.scala
def withValue[R](key: Seq[PathRef], initData: => Unit)(block: T => R): R

Attributes

Inherited from:
CachedFactoryWithInitData
Source
CachedFactory.scala