com.twitter.storehaus.algebra

MergeableStore

object MergeableStore

Some factory methods and combinators on MergeableStore

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MergeableStore
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
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. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def convert[K1, K2, V1, V2](store: MergeableStore[K1, V1])(kfn: (K2) ⇒ K1)(implicit bij: ImplicitBijection[V2, V1]): MergeableStore[K2, V2]

    Convert the key and value type of this mergeable.

    Convert the key and value type of this mergeable. Note this just bijects the Monoid, so the underlying monoid action is unchanged. For instance if you did a Bijection from Long to (Int,Int), the underlying monoid would still be long, not the default (Int,Int) monoid which works differently. Use of this probably requires careful design.

  9. implicit def enrich[K, V](store: MergeableStore[K, V]): EnrichedMergeableStore[K, V]

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

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. def fromStore[K, V](store: Store[K, V])(implicit sg: Semigroup[V], fc: FutureCollector[(K, Option[V])]): MergeableStore[K, V]

    Create a mergeable by implementing merge with get followed by put.

    Create a mergeable by implementing merge with get followed by put. Only safe if each key is owned by a single thread.

  14. def fromStoreEmptyIsZero[K, V](store: Store[K, V])(implicit mon: Monoid[V], fc: FutureCollector[(K, Option[V])]): MergeableStore[K, V]

    Create a mergeable by implementing merge with get followed by put.

    Create a mergeable by implementing merge with get followed by put. Only safe if each key is owned by a single thread. This deletes zeros on put, but returns zero on empty (never returns None). Useful for sparse storage of counts, etc...

  15. def fromStoreNoMulti[K, V](store: Store[K, V])(implicit sg: Semigroup[V]): MergeableStore[K, V]

    Create a mergeable by implementing merge with single get followed by put for each key.

    Create a mergeable by implementing merge with single get followed by put for each key. Also forces multiGet and multiPut to use the store's default implementation of a single get and put. The merge is only safe if each key is owned by a single thread. Useful in certain cases where multiGets and multiPuts may result in higher error rates or lower throughput.

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

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

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

    Definition Classes
    Any
  19. def multiMergeFromMultiSet[K, V](store: Store[K, V], kvs: Map[K, V])(implicit collect: FutureCollector[(K, (Option[V], Option[V]))], sg: Semigroup[V]): Map[K, Future[Option[V]]]

    Implements multiMerge functionality in terms of an underlying store's multiGet and multiSet.

  20. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  23. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  24. def toString(): String

    Definition Classes
    AnyRef → Any
  25. def unpivot[K, OuterK, InnerK, V](store: MergeableStore[OuterK, Map[InnerK, V]])(split: (K) ⇒ (OuterK, InnerK))(implicit arg0: Semigroup[V]): MergeableStore[K, V]

    unpivot or uncurry this MergeableStore TODO: not clear is correct.

    unpivot or uncurry this MergeableStore TODO: not clear is correct. It is injecting whatever Semigroup is present at call time not the actual Semigroup being used by the underlying store. I guess we need to unpivot the Semigroup as well (and might not even be well defined). If the Semigroup is the usual mapMonoid, everything is fine.

  26. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. def withSummer[K, V](store: MergeableStore[K, V])(summerCons: SummerConstructor[K]): MergeableStore[K, V]

    Use a StatefulSummer to buffer results before calling merge.

    Use a StatefulSummer to buffer results before calling merge. Useful when merging to a remote store, of if you have some very hot keys

Inherited from AnyRef

Inherited from Any

Ungrouped