Package

com.twitter.storehaus

algebra

Permalink

package algebra

Visibility
  1. Public
  2. All

Type Members

  1. class AlgebraicMutableCache[K, V] extends AnyRef

    Permalink
  2. class AlgebraicReadableStore[K, V] extends AnyRef

    Permalink
  3. class AlgebraicStore[K, V] extends AnyRef

    Permalink
  4. class BufferingMergeable[K, V] extends Mergeable[K, V]

    Permalink

    A Mergeable that sits on top of another mergeable and pre-aggregates before pushing into merge/multiMerge.

    A Mergeable that sits on top of another mergeable and pre-aggregates before pushing into merge/multiMerge. This is very useful for cases where you have some keys that are very hot, or you have a remote mergeable that you don't want to constantly hit.

  5. class BufferingStore[K, V] extends BufferingMergeable[K, V] with MergeableStore[K, V]

    Permalink

    A MergeableStore that does the same buffering as BufferingMergeable, but flushes on put/get.

  6. class ConcurrentHashMapMergeableStore[K, V] extends MergeableStore[K, V]

    Permalink

    A threadsafe local MergeableStore useful for testing or other local applications

  7. class ConvertedMergeableStore[K1, -K2, V1, V2] extends storehaus.ConvertedStore[K1, K2, V1, V2] with MergeableStore[K2, V2]

    Permalink

    Caveat Emptor! The semigroup on the resulting ConvertedMergeableStore will be the bijected semigroup from Semigroup[V1] => Semigroup[V2].

    Caveat Emptor! The semigroup on the resulting ConvertedMergeableStore will be the bijected semigroup from Semigroup[V1] => Semigroup[V2]. This will not necessarily result in the behavior you'd expect.

  8. class EnrichedMergeableStore[K, V] extends AnyRef

    Permalink

    Enrichment on the com.twitter.storehaus.algebra.MergeableStore trait.

    Enrichment on the com.twitter.storehaus.algebra.MergeableStore trait. Storehaus uses the enrichment pattern instead of adding these methods directly to the trait because many of the functions (mapValues, for example) have different meanings for ReadableStore, Store and MergeableStore.

    import MergeableStore.enrich

    to get access to these methods.

    TODO: in scala 2.10 this should be a value class

  9. case class ExpiredException[K, V](pair: (K, V)) extends RuntimeException with Product with Serializable

    Permalink

    Injection that maps values paired with stale values of T => None on inversion.

  10. trait Mergeable[-K, V] extends Closable

    Permalink

    Main trait to represent objects that are used for aggregation

  11. class MergeableJMapLongStore[K] extends MergeableJMapStore[K, Long]

    Permalink

    MergeableStore instance that is backed by a ConcurrentHashMap This class is thread safe with a locking merge operation and thread safe put/get operations provided by the underlying ConcurrentHashMap There is no multi operation optimization so all multi operations use the default Store implementation.

    MergeableStore instance that is backed by a ConcurrentHashMap This class is thread safe with a locking merge operation and thread safe put/get operations provided by the underlying ConcurrentHashMap There is no multi operation optimization so all multi operations use the default Store implementation.

    This class is ideal for local testing of code that interacts with a MergeableStore[String,Long] such as RedisLongStore without the need to hit a remote database. Can also be used for data processing where you don't care about persistence beyond the running process.

  12. class MergeableJMapStore[K, V] extends MergeableStore[K, V]

    Permalink
  13. class MergeableMonoidStore[-K, V] extends MergeableStoreViaGetPut[K, V]

    Permalink

    Uses the monoid and filters zeros on put.

    Uses the monoid and filters zeros on put. On get, empty is replaced with Monoid.zero. This store never returns Future.None. The design choice of never returning None is to make sure users do not mistake zero for meaning empty. Clearly, we cannot tell the difference, but returning zero is assumed to make it less likely the user thinks the key is absent (which this store can never confirm).

  14. trait MergeableProxy[K, V] extends Mergeable[K, V] with Proxied[Mergeable[K, V]]

    Permalink

    Proxy for Mergeables.

    Proxy for Mergeables. Methods not overrided in extensions will be forwared to Proxied self member

  15. trait MergeableStore[-K, V] extends Store[K, V] with Mergeable[K, V]

    Permalink

    Main trait to represent stores that are used for aggregation

  16. trait MergeableStoreProxy[K, V] extends MergeableStore[K, V] with Proxied[MergeableStore[K, V]]

    Permalink

    Proxy for MergeableStoress.

    Proxy for MergeableStoress. Methods not overrided in extensions will be forwared to Proxied self member

  17. class MergeableStoreViaGetPut[-K, V] extends MergeableStoreViaSingleGetPut[K, V]

    Permalink
  18. class MergeableStoreViaSingleGetPut[-K, V] extends MergeableStore[K, V]

    Permalink

    Just get, locally merge, then put.

    Just get, locally merge, then put. This is only safe if there is only one writer thread per key. Otherwise you need to do some locking or compare-and-swap in the store

  19. case class PromiseLink[V](promise: Promise[Option[V]], value: V) extends Product with Serializable

    Permalink

    This class allows code to depends on the data that a value will be combined with, fulfilling the Promise with the value just before the value is added in.

  20. class PromiseLinkMonoid[V] extends PromiseLinkSemigroup[V] with Monoid[PromiseLink[V]]

    Permalink

    TODO: REMOVE WHEN NEXT VERSION OF ALGEBIRD IS PUBLISHED https://github.com/twitter/storehaus/issues/157 This Monoid allows code to depend on the result of computation asynchronously.

    TODO: REMOVE WHEN NEXT VERSION OF ALGEBIRD IS PUBLISHED https://github.com/twitter/storehaus/issues/157 This Monoid allows code to depend on the result of computation asynchronously. This is a slightly less general version of the TunnelMonoid. See the documentation for TunnelMonoid for general motivation. NOTE: the Promise will be fulfilled with the value just before the PromiseLink is calculated.

  21. class PromiseLinkSemigroup[V] extends Semigroup[PromiseLink[V]]

    Permalink
  22. class ReadableStoreMonoid[K, V] extends ReadableStoreSemigroup[K, V] with Monoid[ReadableStore[K, V]]

    Permalink

    Same as a ReadableStoreSemigroup except with a zero that the constant store always returning Monoid.zero[V]

  23. class ReadableStoreSemigroup[K, V] extends Semigroup[ReadableStore[K, V]]

    Permalink

    A semigroup that uses the future semigroup to add results of both gets

  24. trait SummerConstructor[K] extends AnyRef

    Permalink

    For any given V, construct a StatefulSummer of Map[K, V]

  25. class TTLInjection[K, T, V] extends Injection[(K, V), (K, (T, V))]

    Permalink
  26. class UnpivotedMergeableStore[-K, OuterK, InnerK, V] extends UnpivotedStore[K, OuterK, InnerK, V] with MergeableStore[K, V]

    Permalink

    MergeableStore enrichment which presents a MergeableStore[K, V] over top of a packed MergeableStore[OuterK, Map[InnerK, V]].

  27. class ConvertedStore[K1, -K2, V1, V2] extends ConvertedReadableStore[K1, K2, V1, V2] with Store[K2, V2]

    Permalink

    Use an injection on V2,V1 to convert a store of values V2.

    Use an injection on V2,V1 to convert a store of values V2. If the value stored in the underlying store cannot be converted back to V2, then you will get a Future.exception containing the string "cannot be converted" TODO: we should add a specific exception type here so we can safely filter these cases to Future.None if we so choose.

    Annotations
    @deprecated
    Deprecated

    (Since version 0.3.1) Use com.twitter.storehaus.ConvertedStore instead

Value Members

  1. object Algebras

    Permalink

    import Algebras._ to get Monoid/Semigroup on ReadableStore

  2. object ConcurrentHashMapMergeableStore

    Permalink
  3. object HHFilteredStore

    Permalink
  4. object MergeableStore

    Permalink

    Some factory methods and combinators on MergeableStore

  5. object MutableCacheAlgebra

    Permalink

    Enrichments and modifications to instances of MutableCache.

    Enrichments and modifications to instances of MutableCache. Use these enrichments by importing MutableCacheAlgebra._.

  6. object PromiseLink extends Serializable

    Permalink
  7. object ReadableStoreAlgebra

    Permalink

    Enrichments on ReadableStore.

  8. object StoreAlgebra

    Permalink

    Algebraic Enrichments on Store.

  9. package query

    Permalink
  10. package reporting

    Permalink

Ungrouped