MutableConsumer

A Consumer simplifies resource management by maintaining a use count for each cached value. Furthermore, it combines a producer with a production function.

Companion
class
class Object
trait Matchable
class Any

Value members

Concrete methods

def apply[A, B](producer: MutableProducer[A, B])(source: A => Future[B]): MutableConsumer[A, B]

Creates a new consumer from a given producer and production function.

Creates a new consumer from a given producer and production function.

Type Params
A

the key type

B

the value type

Value Params
producer

the cache producing instance

source

a function which will create the value for a given key whenever the resource is acquired and no valid cached value is found.