com.twitter.storehaus.algebra

MergeableMonoidStore

class MergeableMonoidStore[-K, V] extends MergeableStoreViaGetPut[K, V]

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

Linear Supertypes
MergeableStoreViaGetPut[K, V], MergeableStoreViaSingleGetPut[K, V], MergeableStore[K, V], Mergeable[K, V], Store[K, V], WritableStore[K, Option[V]], ReadableStore[K, V], Closable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MergeableMonoidStore
  2. MergeableStoreViaGetPut
  3. MergeableStoreViaSingleGetPut
  4. MergeableStore
  5. Mergeable
  6. Store
  7. WritableStore
  8. ReadableStore
  9. Closable
  10. AnyRef
  11. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MergeableMonoidStore(store: Store[K, V], fc: FutureCollector[(K, Option[V])] = ...)(implicit arg0: Monoid[V])

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 close(time: Time): Future[Unit]

    Close this store and release any resources.

    Close this store and release any resources. It is undefined what happens if you merge after close

    Definition Classes
    Mergeable → Closable
  9. def close(after: Duration): Future[Unit]

    Definition Classes
    Closable
  10. final def close(): Future[Unit]

    Definition Classes
    Closable
  11. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. def get(k: K): Future[Some[V]]

    Definition Classes
    MergeableMonoidStoreMergeableStoreViaSingleGetPut → ReadableStore
  15. final def getClass(): Class[_]

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

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

    Definition Classes
    Any
  18. def merge(kv: (K, V)): Future[Option[V]]

    sets to .

    sets to .plus(get(kv._1).get.getOrElse(monoid.zero), kv._2) but maybe more efficient implementations

    Definition Classes
    MergeableStoreViaSingleGetPutMergeable
  19. def multiGet[K1 <: K](ks: Set[K1]): Map[K1, Future[Option[V]]]

    Definition Classes
    MergeableMonoidStoreMergeableStoreViaGetPut → ReadableStore
  20. def multiMerge[K1 <: K](kvs: Map[K1, V]): Map[K1, Future[Option[V]]]

    merge a set of keys.

    merge a set of keys.

    Definition Classes
    MergeableStoreViaGetPutMergeable
  21. def multiPut[K1 <: K](kvs: Map[K1, Option[V]]): Map[K1, Future[Unit]]

    Definition Classes
    MergeableMonoidStoreMergeableStoreViaGetPut → WritableStore
  22. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  25. def put(kv: (K, Option[V])): Future[Unit]

    Definition Classes
    MergeableMonoidStoreMergeableStoreViaSingleGetPut → WritableStore
  26. def semigroup: Semigroup[V]

    The semigroup equivalent to the merge operation of this store

    The semigroup equivalent to the merge operation of this store

    Definition Classes
    MergeableMonoidStoreMergeableStoreViaSingleGetPutMergeable
  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  28. def toString(): String

    Definition Classes
    AnyRef → Any
  29. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from MergeableStoreViaGetPut[K, V]

Inherited from MergeableStoreViaSingleGetPut[K, V]

Inherited from MergeableStore[K, V]

Inherited from Mergeable[K, V]

Inherited from Store[K, V]

Inherited from WritableStore[K, Option[V]]

Inherited from ReadableStore[K, V]

Inherited from Closable

Inherited from AnyRef

Inherited from Any

Ungrouped