Object/Trait

com.twitter.storehaus

ReadableStore

Related Docs: trait ReadableStore | package storehaus

Permalink

object ReadableStore

Holds various factory and transformation functions for ReadableStore instances

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ReadableStore
  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. final def ==(arg0: Any): Boolean

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

    Permalink

    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 com.twitter.storehaus.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 com.twitter.storehaus.ComposedStore. See also ReadableStore.convert if you need to change the value or key before the andThen

  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. def const[V](v: V): ReadableStore[Any, V]

    Permalink

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

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

    Permalink

    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.

  9. val empty: ReadableStore[Any, Nothing]

    Permalink

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

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

    Permalink

    Adds enrichment methods to ReadableStore This allows you to do: store.mapValues, for instance.

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

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

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

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

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

    Permalink

    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.

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

    Permalink

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

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

    Permalink

    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).

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

    Permalink

    Treat a Function1 like a ReadableStore

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

    Permalink

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

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

    Permalink

    Factory method to create a ReadableStore from an IndexedSeq.

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

    Permalink

    Factory method to create a ReadableStore from a Map.

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

    Permalink

    Treat a PartialFunction like a ReadableStore

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

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

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

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

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

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

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

    Permalink

    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.

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

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

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

    Permalink

    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

  32. final def wait(): Unit

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

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

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

    Permalink

    Returns a new ReadableStore that caches reads from the underlying store using the supplied immutable cache.

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

    Permalink

    Returns a new ReadableStore that caches reads from the underlying store using the supplied mutable cache.

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

    Permalink

    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

Ungrouped