Class/Object

com.twitter.storehaus.cache

TTLCache

Related Docs: object TTLCache | package cache

Permalink

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

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

Instance Constructors

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

    Permalink

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, (Long, V))): Cache[K, (Long, V)]

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

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

    Permalink
    Definition Classes
    Cache
  6. final def ==(arg0: Any): Boolean

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

    Permalink
    Definition Classes
    Any
  8. val clock: () ⇒ Long

    Permalink
  9. def clone(): AnyRef

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

    Permalink

    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
  11. def empty: TTLCache[K, V]

    Permalink

    Returns an empty version of this specific cache implementation.

    Returns an empty version of this specific cache implementation.

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

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

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

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

    Permalink
  16. def finalize(): Unit

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

    Permalink

    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
  18. final def getClass(): Class[_]

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

    Permalink
  20. def hashCode(): Int

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

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

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

    Permalink

    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
  24. final def ne(arg0: AnyRef): Boolean

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

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

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

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

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

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

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

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

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

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

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

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

    Permalink
    Attributes
    protected
  37. def toString(): String

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

    Permalink

    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
  39. val ttl: Duration

    Permalink
  40. final def wait(): Unit

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

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped