com.twitter.storehaus.cache

Cache

trait Cache[K, V] extends AnyRef

Immutable Cache trait for use with Storehaus stores.

Inspired by clojure's core.cache: https://github.com/clojure/core.cache/blob/master/src/main/clojure/clojure/core/cache.clj

Source
Cache.scala
Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Cache
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def empty: Cache[K, V]

    Returns an empty version of this specific cache implementation.

  2. abstract def evict(k: K): (Option[V], Cache[K, V])

  3. abstract def get(k: K): Option[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.)

  4. abstract def hit(k: K): Cache[K, V]

  5. abstract def iterator: Iterator[(K, V)]

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

  6. abstract def put(kv: (K, V)): (Set[K], Cache[K, V])

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

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

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

  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. def clone(): AnyRef

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

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

  12. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  15. final def getClass(): java.lang.Class[_]

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

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

    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  21. def seed(m: Map[K, V]): Cache[K, V]

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

    Definition Classes
    AnyRef
  23. def toMap: Map[K, V]

  24. def toMutable(exhaustFn: (Set[K]) ⇒ Unit = _ => ()): MutableCache[K, V]

  25. def toString(): String

    Definition Classes
    AnyRef → Any
  26. def touch(k: K, v: ⇒ V): Cache[K, 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.

  27. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any