Interner

com.netflix.atlas.core.util.Interner
See theInterner companion object
trait Interner[T]

Keeps track of canonical references for a type of object. Typically used to reduce memory overhead if an application potentially creates many copies of equal objects and will need to keep them around for some period of time.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class CaffeineInterner[T]
trait InternMap[K]
class NoopInterner[T]
Show all

Members list

Value members

Abstract methods

def intern(value: T): T

Returns a representative instance that is equal to the specified instance. Check the particular implementation before making any assumptions about the ability to just use reference equality on interned instances.

Returns a representative instance that is equal to the specified instance. Check the particular implementation before making any assumptions about the ability to just use reference equality on interned instances.

Attributes

def size: Int

Returns the number of items that are currently interned.

Returns the number of items that are currently interned.

Attributes