com.twitter.storehaus.cache

TTLCache

class TTLCache[K, V] extends Cache[K, (Long, V)]

Source
TTLCache.scala
Linear Supertypes
Cache[K, (Long, V)], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. TTLCache
  2. Cache
  3. AnyRef
  4. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TTLCache(ttl: Long, cache: Map[K, (Long, V)])(clock: () ⇒ Long)

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def +(kv: (K, (Long, V))): Cache[K, (Long, V)]

    Definition Classes
    Cache
  5. def -(k: K): Cache[K, (Long, V)]

    Definition Classes
    Cache
  6. def --(ks: Set[K]): Cache[K, (Long, V)]

    Definition Classes
    Cache
  7. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  8. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  9. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  10. val clock: () ⇒ Long

  11. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  12. def contains(k: K): Boolean

    Returns true if the cache contains a value for the supplied key, false otherwise.

    Returns true if the cache contains a value for the supplied key, false otherwise.

    Definition Classes
    TTLCacheCache
  13. def empty: TTLCache[K, V]

    Returns an empty version of this specific cache implementation.

    Returns an empty version of this specific cache implementation.

    Definition Classes
    TTLCacheCache
  14. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  16. def evict(k: K): (Option[(Long, V)], Cache[K, (Long, V)])

    Definition Classes
    TTLCacheCache
  17. def expired(k: K): Boolean

  18. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  19. def get(k: K): Option[(Long, V)]

    Returns an option containing the value stored for the supplied key or None if the key is not present in the cache.

    Returns an option containing the value stored for the supplied key or None if the key is not present in the cache. (A call to get should not change the underlying cache in any way.)

    Definition Classes
    TTLCacheCache
  20. final def getClass(): java.lang.Class[_]

    Definition Classes
    AnyRef → Any
  21. def getNonExpired(k: K): Option[V]

  22. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  23. def hit(k: K): TTLCache[K, V]

    Definition Classes
    TTLCacheCache
  24. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  25. def iterator: Iterator[(K, (Long, V))]

    Returns an iterator of all key-value pairs inside of this cache.

    Returns an iterator of all key-value pairs inside of this cache.

    Definition Classes
    TTLCacheCache
  26. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  27. final def notify(): Unit

    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  29. def put(kv: (K, (Long, V))): (Set[K], TTLCache[K, V])

    Definition Classes
    TTLCacheCache
  30. def putClocked(kv: (K, V)): (Set[K], TTLCache[K, V])

  31. def putWithTime(kv: (K, (Long, V)), currentMillis: Long): (Set[K], TTLCache[K, V])

    Attributes
    protected
  32. def removeExpired: (Set[K], TTLCache[K, V])

  33. def seed(m: Map[K, (Long, V)]): Cache[K, (Long, V)]

    Definition Classes
    Cache
  34. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  35. def toMap: Map[K, (Long, V)]

    Definition Classes
    TTLCacheCache
  36. def toMutable(exhaustFn: (Set[K]) ⇒ Unit = _ => ()): MutableCache[K, (Long, V)]

    Definition Classes
    Cache
  37. def toNonExpiredMap: Map[K, V]

  38. def toRemove(currentMillis: Long): Set[K]

    Attributes
    protected
  39. def toString(): String

    Definition Classes
    AnyRef → Any
  40. def touch(k: K, v: ⇒ (Long, V)): Cache[K, (Long, V)]

    Touches the cache with the supplied key.

    Touches the cache with the supplied key. If the key is present in the cache, the cache calls "hit" on the key. If the key is missing, the cache adds fn(k) to itself.

    Definition Classes
    Cache
  41. val ttl: Long

  42. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from Cache[K, (Long, V)]

Inherited from AnyRef

Inherited from Any