com.twitter.storehaus

TunableReplicatedStore

class TunableReplicatedStore[-K, V] extends TunableReplicatedReadableStore[K, V] with Store[K, V]

Replicates writes to a seq of stores, and returns after picked write consistency is satisfied.

Consistency semantics: One - returns after first successful write (other writes can complete in the background), fails if no write is successful Quorum - returns after N/2 + 1 writes succeed (other writes can complete in the background), fails otherwise All - returns if all N writes succeed, fails otherwise

Additionally, the following operations are supported: readRepair - read repair any missing or incorrect data (only for Quorum reads) writeRollback - delete the key on all replicas if write fails (only for Quorum writes and All writes)

Source
TunableReplicatedStore.scala
Linear Supertypes
Store[K, V], TunableReplicatedReadableStore[K, V], AbstractReadableStore[K, V], ReadableStore[K, V], Closeable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. TunableReplicatedStore
  2. Store
  3. TunableReplicatedReadableStore
  4. AbstractReadableStore
  5. ReadableStore
  6. Closeable
  7. AnyRef
  8. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TunableReplicatedStore(stores: Seq[Store[K, V]], readConsistency: ConsistencyLevel, writeConsistency: ConsistencyLevel, readRepair: Boolean = true, writeRollback: Boolean = true)

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[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  8. def close(): Unit

    Close this store and release any resources.

    Close this store and release any resources. It is undefined what happens on get/multiGet after close

    Definition Classes
    ReadableStore → Closeable
  9. def doGet(k: K): Future[(Option[V], Seq[Int])]

  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[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  13. def get(k: K): Future[Option[V]]

    get a single key from the store.

    get a single key from the store. Prefer multiGet if you are getting more than one key at a time

    Definition Classes
    TunableReplicatedStoreTunableReplicatedReadableStoreReadableStore
  14. final def getClass(): java.lang.Class[_]

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

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

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

    Get a set of keys from the store.

    Get a set of keys from the store. Important: all keys in the input set are in the resulting map. If the store fails to return a value for a given key, that should be represented by a Future.exception.

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

    Replace a set of keys at one time

    Replace a set of keys at one time

    Definition Classes
    Store
  19. final def ne(arg0: AnyRef): Boolean

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

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

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

    replace a value Delete is the same as put((k,None))

    replace a value Delete is the same as put((k,None))

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

    Definition Classes
    AnyRef
  24. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from Store[K, V]

Inherited from TunableReplicatedReadableStore[K, V]

Inherited from AbstractReadableStore[K, V]

Inherited from ReadableStore[K, V]

Inherited from Closeable

Inherited from AnyRef

Inherited from Any