Class/Object

com.twitter.util

ImmutableLRU

Related Docs: object ImmutableLRU | package util

Permalink

class ImmutableLRU[K, V] extends AnyRef

An immutable key/value store that evicts the least recently accessed elements to stay constrained in a maximum size bound.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ImmutableLRU
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(kv: (K, V)): (Option[K], ImmutableLRU[K, V])

    Permalink

    Build a new LRU containing the given key/value

    Build a new LRU containing the given key/value

    returns

    a tuple with of the following two items: _1 represents the evicted entry (if the given lru is at the maximum size) or None if the lru is not at capacity yet. _2 is the new lru with the given key/value pair inserted.

  4. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. def get(k: K): (Option[V], ImmutableLRU[K, V])

    Permalink

    If the key is present in the cache, returns the pair of Some(value) and the cache with the key's entry as the most recently accessed.

    If the key is present in the cache, returns the pair of Some(value) and the cache with the key's entry as the most recently accessed. Else, returns None and the unmodified cache.

  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. implicit val kOrd: Ordering[K]

    Permalink
    Attributes
    protected
  15. def keySet: Set[K]

    Permalink

    the Set of all keys in the LRU

    the Set of all keys in the LRU

    Note

    accessing this set does not update the element LRU ordering

  16. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. def remove(k: K): (Option[V], ImmutableLRU[K, V])

    Permalink

    If the key is present in the cache, returns the pair of Some(value) and the cache with the key removed.

    If the key is present in the cache, returns the pair of Some(value) and the cache with the key removed. Else, returns None and the unmodified cache.

  20. def size: Int

    Permalink

    the number of entries in the cache

  21. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  22. def toString(): String

    Permalink
    Definition Classes
    ImmutableLRU → AnyRef → Any
  23. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped