KotlinWorkerManager

mill.kotlinlib.KotlinWorkerManager
See theKotlinWorkerManager companion object

Attributes

Companion
object
Source
KotlinWorkerManager.scala
Graph
Supertypes
class CachedFactoryBase[Seq[PathRef], Seq[PathRef], Unit, KotlinWorker]
trait AutoCloseable
class Object
trait Matchable
class Any
Show all

Members list

Type members

Inherited types

type Entry = Entry[Seq[PathRef], Seq[PathRef], KotlinWorker]

Attributes

Inherited from:
CachedFactoryBase
Source
CachedFactoryBase.scala

Value members

Concrete methods

def getValue(cl: ClassLoader): KotlinWorker

Attributes

Source
KotlinWorkerManager.scala

Inherited methods

final override def cacheEntryStillValid(key: Seq[PathRef], internalKey: Seq[PathRef], initData: => Unit, value: KotlinWorker): Boolean

Returns true if the cache entry associated with the given key is still valid. If false, the entry will be removed from the cache and setup will be invoked.

Returns true if the cache entry associated with the given key is still valid. If false, the entry will be removed from the cache and setup will be invoked.

Attributes

Definition Classes
Inherited from:
CachedFactoryWithInitData
Source
CachedFactory.scala
def cacheEntryStillValid(key: Seq[PathRef], initData: => Unit, value: KotlinWorker): 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
override def close(): Unit

Attributes

Definition Classes
Inherited from:
ClassLoaderCachedFactory
Source
ClassLoaderCachedFactory.scala
def getOrCreate(key: Seq[PathRef], initData: => Unit): KotlinWorker

Get a value for the given key, creating one if necessary. The caller must call release when done with the value.

Get a value for the given key, creating one if necessary. The caller must call release when done with the value.

Attributes

Inherited from:
CachedFactoryBase
Source
CachedFactoryBase.scala
final def keyToInternalKey(key: Seq[PathRef]): Seq[PathRef]

Convert the public key to an internal key used for caching.

Convert the public key to an internal key used for caching.

Attributes

Inherited from:
CachedFactoryWithInitData
Source
CachedFactory.scala
override def maxCacheSize: Int

Maximum number of unused values to keep in the LRU cache. Set to 0 to disable caching of unused values (values are closed immediately when released).

Maximum number of unused values to keep in the LRU cache. Set to 0 to disable caching of unused values (values are closed immediately when released).

Attributes

Definition Classes
Inherited from:
ClassLoaderCachedFactory
Source
ClassLoaderCachedFactory.scala
def release(key: Seq[PathRef]): Option[Entry]

Release a reference to the value associated with the given key. If this was the last reference, the value moves to the unused cache.

Release a reference to the value associated with the given key. If this was the last reference, the value moves to the unused cache.

Attributes

Returns

Some(entry) if there are still active references (only possible in shared mode), None otherwise

Inherited from:
CachedFactoryBase
Source
CachedFactoryBase.scala
def releaseKeyValue(key: Seq[PathRef], value: KotlinWorker): Option[Entry]

Release a reference to a specific value, matching by value identity. This should be used when shareValues = false and multiple entries may have the same key.

Release a reference to a specific value, matching by value identity. This should be used when shareValues = false and multiple entries may have the same key.

Attributes

Inherited from:
CachedFactoryBase
Source
CachedFactoryBase.scala
override def setup(key: Seq[PathRef]): KotlinWorker

Attributes

Definition Classes
Inherited from:
ClassLoaderCachedFactory
Source
ClassLoaderCachedFactory.scala
final def setup(key: Seq[PathRef], initData: Unit): KotlinWorker

Attributes

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

Create a new value for the given key.

Create a new value for the given key.

Attributes

Inherited from:
CachedFactoryWithInitData
Source
CachedFactory.scala
final def shareValues: Boolean

If true, a value can be used concurrently by multiple consumers (reference counted). If false, a value can only be used by one consumer at a time.

If true, a value can be used concurrently by multiple consumers (reference counted). If false, a value can only be used by one consumer at a time.

Attributes

Inherited from:
CachedFactoryWithInitData
Source
CachedFactory.scala
override def teardown(key: Seq[PathRef], value: KotlinWorker): Unit
final def teardown(key: Seq[PathRef], internalKey: Seq[PathRef], value: KotlinWorker): Unit

Clean up a value when it is evicted from the cache.

Clean up a value when it is evicted from the cache.

Attributes

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

Attributes

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

Get a value, use it in the provided block, then release it.

Get a value, use it in the provided block, then release it.

Attributes

Inherited from:
CachedFactoryBase
Source
CachedFactoryBase.scala