ConfigBuilder

final class ConfigBuilder[A, B] extends ConfigLike[A, B]

A configuration builder is a mutable version of Config and will be implicitly converted to the latter when passed into Producer.apply.

trait ConfigLike[A, B]
class Object
trait Matchable
class Any

Value members

Concrete methods

def build: Config[A, B]
def fileExtension: String

The file name extension to use, excluding leading period. It must only consist of letters and digits.

The file name extension to use, excluding leading period. It must only consist of letters and digits.

The default value is "cache".

def fileExtension_=(value: String): Unit
def folder: File

The directory where the cached values are stored. If this directory does not exist upon cache creation, it will be created on the fly.

The directory where the cached values are stored. If this directory does not exist upon cache creation, it will be created on the fly.

By default this will lazily create a temporary directory deleted on application exit. If this value is set via folder_=, that setting replaces the default behavior.

def folder_=(value: File): Unit
override def toString: String
Definition Classes
Any

Concrete fields

var accept: (A, B) => Boolean

Acceptor function. Given an initially found value, this function should return true if the value is still valid, or false if it is invalid and should be recomputed. This function is used only once during the initial directory scan of the producer after it is created.

Acceptor function. Given an initially found value, this function should return true if the value is still valid, or false if it is invalid and should be recomputed. This function is used only once during the initial directory scan of the producer after it is created.

The default function always returns true, i.e. assumes that values never become invalid.

The maximum capacity of the cache.

The maximum capacity of the cache.

The default value is Limit(-1, -1) (unlimited capacity).

var evict: (A, B) => Unit

A function which is being called when an entry is evicted from cache. The function must ensure that any associated resources are disposed of.

A function which is being called when an entry is evicted from cache. The function must ensure that any associated resources are disposed of.

The default function is a no-op.

var executionContext: ExecutionContext

The context used by the cache to spawn future computations.

The context used by the cache to spawn future computations.

The default value is ExecutionContext.global.

var space: (A, B) => Long

Associate resources space function. Given a value, this function should compute the size in bytes of any additional resources used by this entry.

Associate resources space function. Given a value, this function should compute the size in bytes of any additional resources used by this entry.

The default function always returns zero, i.e. assumes that there are no additional resources associated with a value.