Object/Trait

com.twitter.storehaus.algebra

MergeableStore

Related Docs: trait MergeableStore | package algebra

Permalink

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
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. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

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

    Permalink

    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.

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

    Permalink
  8. final def eq(arg0: AnyRef): Boolean

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

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

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

    Permalink

    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.

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

    Permalink

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

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

    Permalink

    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.

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

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

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

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

    Permalink

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

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

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

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

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

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

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

    Permalink

    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.

  24. final def wait(): Unit

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

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

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

    Permalink

    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

Deprecated Value Members

  1. def multiMergeFromMultiSet[K, V](store: Store[K, V], kvs: Map[K, V], missingfn: (K) ⇒ Future[Option[V]] = FutureOps.missingValueFor)(implicit collect: FutureCollector, sg: Semigroup[V]): Map[K, Future[Option[V]]]

    Permalink

    Use the newer function with less params below.

    Use the newer function with less params below. This function just calls that ignoring missingfn and collect.

    Annotations
    @deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped