com.twitter.storehaus

ReadableStore

object ReadableStore extends AnyRef

Holds various factory and transformation functions for ReadableStore instances

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

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

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

    Definition Classes
    Any
  6. def andThen[K, V, V2, V3 >: V](l: ReadableStore[K, V], r: ReadableStore[V3, V2])(implicit fc: FutureCollector[V3]): ReadableStore[K, V2]

    Do a "join" on two stores: look up from the first, and use that value as the key in the next A factory method for ComposedStore.

    Do a "join" on two stores: look up from the first, and use that value as the key in the next A factory method for ComposedStore. See also ReadableStore.convert if you need to change the value or key before the andThen

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  9. def const[V](v: V): ReadableStore[Any, V]

    Returns a new ReadableStore[Any, V] that always returns the supplied value V.

  10. def convert[K1, K2, V1, V2](store: ReadableStore[K1, V1])(kfn: (K2) ⇒ K1)(vfn: (V1) ⇒ Future[V2]): ReadableStore[K2, V2]

    Lazily change the key and value for a store.

    Lazily change the key and value for a store. This does not change the representation, only alters before going in or out of the store.

  11. val empty: ReadableStore[Any, Nothing]

    Due to the variance notations, this suffices for an empty store of any K,V type

  12. implicit def enrich[K, V](store: ReadableStore[K, V]): EnrichedReadableStore[K, V]

    Adds enrichment methods to ReadableStore This allows you to do: store.

    Adds enrichment methods to ReadableStore This allows you to do: store.mapValues, for instance. Access this in your code by doing:

     import ReadableStore.enrich 
    
  13. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  16. def find[K, V](stores: Seq[ReadableStore[K, V]])(pred: (Option[V]) ⇒ Boolean): ReadableStore[K, V]

    Returns a ReadableStore[K, V] that attempts reads out of the supplied Seq[ReadableStore[K, V]] in order and returns the first successful value that passes the supplied predicate.

  17. def first[K, V](stores: Seq[ReadableStore[K, V]]): ReadableStore[K, V]

    Returns a new ReadableStore[K, V] that queries all of the stores and returns the first values that are not exceptions.

  18. def firstPresent[K, V](stores: Seq[ReadableStore[K, V]]): ReadableStore[K, V]

    Returns a new ReadableStore[K, V] that queries all of the stores and returns the first values that are not exceptions and that are present (ie, not equivalent to Future.

    Returns a new ReadableStore[K, V] that queries all of the stores and returns the first values that are not exceptions and that are present (ie, not equivalent to Future.None).

  19. def fromFn[K, V](getfn: (K) ⇒ Option[V]): ReadableStore[K, V]

    Treat a Function1 like a ReadableStore

  20. def fromFnFuture[K, V](getfn: (K) ⇒ Future[Option[V]]): ReadableStore[K, V]

    Treat a function returning a Future[Option[V]] as the get method of a ReadableStore

  21. def fromIndexedSeq[T](iseq: IndexedSeq[T]): ReadableStore[Int, T]

    Factory method to create a ReadableStore from an IndexedSeq.

  22. def fromMap[K, V](m: Map[K, V]): ReadableStore[K, V]

    Factory method to create a ReadableStore from a Map.

  23. def fromPartial[K, V](getfn: PartialFunction[K, V]): ReadableStore[K, V]

    Treat a PartialFunction like a ReadableStore

  24. final def getClass(): java.lang.Class[_]

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

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

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

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

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

    Definition Classes
    AnyRef
  30. def select[K, V](stores: Seq[ReadableStore[K, V]])(pred: (Option[V]) ⇒ Boolean): ReadableStore[K, V]

    Returns a new ReadableStore[K, V] that queries all of the stores and returns the first values that are not exceptions and that pass the supplied predicate.

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

    Definition Classes
    AnyRef
  32. def toString(): String

    Definition Classes
    AnyRef → Any
  33. def unpivot[K, OuterK, InnerK, V](store: ReadableStore[OuterK, Map[InnerK, V]])(split: (K) ⇒ (OuterK, InnerK)): ReadableStore[K, V]

    unpivot or uncurry a ReadableStore which has a value that is a Map.

    unpivot or uncurry a ReadableStore which has a value that is a Map. Often it is more efficient to pack values into inner maps, especially when you have very sparse stores. This allows you to work with such a packed store as though it was unpacked

  34. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()
  37. def withCache[K, V](store: ReadableStore[K, V], cache: Cache[K, Future[Option[V]]]): ReadableStore[K, V]

  38. def withCache[K, V](store: ReadableStore[K, V], cache: MutableCache[K, Future[Option[V]]]): ReadableStore[K, V]

  39. def withRetry[K, V](store: ReadableStore[K, V], backoffs: Iterable[Duration])(pred: (Option[V]) ⇒ Boolean)(implicit timer: Timer): ReadableStore[K, V]

    Returns a ReadableStore[K, V] that attempts reads from a store multiple times until a predicate is met.

    Returns a ReadableStore[K, V] that attempts reads from a store multiple times until a predicate is met. The iterable of backoffs defines the time interval between two read attempts. If there is not read result satisfying the given predicate after all read attempts, a NotFoundException will be thrown.

Inherited from AnyRef

Inherited from Any