Packages

class LruTreeMap extends LruMapLike[Seq[Any], TreeOrLeaf]

Class defining a tree map with limited capacity that uses an LRU (least recently used) algorithm for automatic eviction. The primary use case is for caches that need to be limited in size while still maintaining good performance. The map uses a key structure with a sequence of objects denoting the address of the value on each level in the tree from top to bottom. A prefix of the key may represent a subtree of values. The map is thread safe.

Linear Supertypes
LruMapLike[Seq[Any], TreeOrLeaf], BoundedMapLike, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LruTreeMap
  2. LruMapLike
  3. BoundedMapLike
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new LruTreeMap(capacity: Int, valueCleanUp: Option[(Any) => Unit] = None)

    capacity

    The maximum capacity of the map.

    valueCleanUp

    A method to run when a value is evicted. Used to trigger additional clean-up logic.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def attachNode(entry: Entry[Seq[Any], TreeOrLeaf]): Entry[Seq[Any], TreeOrLeaf]
    Attributes
    protected
    Definition Classes
    LruMapLike
  6. val cacheSize: AtomicInteger
    Attributes
    protected
    Definition Classes
    BoundedMapLike
  7. val capacity: Int
    Definition Classes
    LruTreeMapBoundedMapLike
  8. def cleanUp(): Unit
    Attributes
    protected
    Definition Classes
    LruMapLike
  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  12. def get(keys: Seq[Any]): Option[TreeOrLeaf]
    Attributes
    protected
    Definition Classes
    LruTreeMapLruMapLike
  13. def getCacheSize: Int
    Definition Classes
    BoundedMapLike
  14. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  15. def getLeaf(keys: Any*): Option[Any]

    Gets the leaf value (i.e.

    Gets the leaf value (i.e. not a subtree) for a sequence of keys, if available.

    keys

    The sequence of keys

  16. def getMisses: Long
    Definition Classes
    BoundedMapLike
  17. def getOrAdd(keys: Seq[Any])(action: => TreeOrLeaf): TreeOrLeaf
    Attributes
    protected
    Definition Classes
    LruTreeMapLruMapLike
  18. def getOrAddLeaf(keys: Any*)(action: => Any): Any

    Get the leaf value associated with a given key sequence, if available, and compute and add it if not.

    Get the leaf value associated with a given key sequence, if available, and compute and add it if not.

    keys

    The sequence of keys

    action

    A function to compute the value.

  19. def getQueueSize: Int
    Definition Classes
    BoundedMapLike
  20. def getRequests: Long
    Definition Classes
    BoundedMapLike
  21. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  22. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  23. def keySet: Set[Seq[Any]]
    Attributes
    protected
    Definition Classes
    LruTreeMapLruMapLike
  24. val lock: AnyRef
    Attributes
    protected
    Definition Classes
    BoundedMapLike
  25. val misses: AtomicLong
    Attributes
    protected
    Definition Classes
    BoundedMapLike
  26. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  27. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  28. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  29. def poll(): Option[(Seq[Any], TreeOrLeaf)]
    Attributes
    protected
    Definition Classes
    LruMapLike
  30. def purge(): Unit
    Definition Classes
    LruMapLikeBoundedMapLike
  31. val queue: ConcurrentLinkedQueue[LruNode[Seq[Any], TreeOrLeaf]]
    Attributes
    protected
    Definition Classes
    LruMapLike
  32. val queueSize: AtomicInteger
    Attributes
    protected
    Definition Classes
    BoundedMapLike
  33. def registerAs(id: String, environment: String): LruTreeMap

    Registers the map with the LruCacheManager

    Registers the map with the LruCacheManager

    id

    The id to use for registration.

    environment

    The unique id of the environment where the map is used.

  34. def remove(keys: Seq[Any]): Int

    Remove the leaf value or subtree associated with a given key sequence.

    Remove the leaf value or subtree associated with a given key sequence.

    keys

    The sequence of keys

    returns

    The number of leaf values removed.

    Definition Classes
    LruTreeMapLruMapLike
  35. val requests: AtomicLong
    Attributes
    protected
    Definition Classes
    BoundedMapLike
  36. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  37. def toString(): String
    Definition Classes
    AnyRef → Any
  38. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  39. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  40. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from LruMapLike[Seq[Any], TreeOrLeaf]

Inherited from BoundedMapLike

Inherited from AnyRef

Inherited from Any

Ungrouped