com.twitter.storehaus

ConvertedReadableStore

class ConvertedReadableStore[K1, -K2, V1, +V2] extends AbstractReadableStore[K2, V2]

Convert the keys/values of a store.

Value conversion returns a Future because V1 => V2 may fail, and we are going to convert to a future anyway (so, a Try is kind of a Future that is not async). Thus we might as well add the flexibility of accepting a V1 => Future[V2], though in practice Future.value/exception will generally be used.

Source
ConvertedReadableStore.scala
Linear Supertypes
AbstractReadableStore[K2, V2], ReadableStore[K2, V2], Closeable, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. ConvertedReadableStore
  2. AbstractReadableStore
  3. ReadableStore
  4. Closeable
  5. AnyRef
  6. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ConvertedReadableStore(rs: ReadableStore[K1, V1])(kfn: (K2) ⇒ K1)(vfn: (V1) ⇒ Future[V2])

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
    ConvertedReadableStoreReadableStore → Closeable
  9. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  12. def get(k2: K2): Future[Option[V2]]

    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
    ConvertedReadableStoreReadableStore
  13. final def getClass(): java.lang.Class[_]

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

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

    Definition Classes
    Any
  16. def multiGet[K3 <: K2](s: Set[K3]): Map[K3, Future[Option[V2]]]

    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
    ConvertedReadableStoreReadableStore
  17. final def ne(arg0: AnyRef): Boolean

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

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

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

    Definition Classes
    AnyRef
  21. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AbstractReadableStore[K2, V2]

Inherited from ReadableStore[K2, V2]

Inherited from Closeable

Inherited from AnyRef

Inherited from Any