ThreadLocalHashMap

fm.common.ThreadLocalHashMap
class ThreadLocalHashMap[K, V]

Wraps a Scala mutable.HashMap inside of a ThreadLocal and exposes some simple operations.

The initial use case of this is for caching NumberFormat instances by Locale. This can be accomplished by overriding the initialValue method and just calling the apply() method with the Locale.

Attributes

K

The HashMap Key

V

The HashMap Value

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

final def apply(key: K): V
final def get(key: K): Option[V]
protected def initialValue(key: K): Option[V]
final def update(key: K, value: V): Unit