Packages

object RedisBatch extends HasFlatMap[RedisBatch]

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RedisBatch
  2. HasFlatMap
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. final class Index extends AnyRef
  2. implicit final class SequenceOps[Ops, Res] extends AnyVal

Value Members

  1. def failure(cause: Throwable): RedisBatch[Nothing]
  2. implicit def flatMapOps[A](left: RedisBatch[A]): FlatMapOps[RedisBatch[A], A]
    Definition Classes
    HasFlatMap
  3. def foldLeft[T, A](ops: TraversableOnce[RedisBatch[A]], zero: T)(fun: (T, A) ⇒ T): RedisBatch[T]
  4. def foldLeftMap[A, B, T](coll: TraversableOnce[A], zero: T)(opFun: (A) ⇒ RedisBatch[B])(fun: (T, B) ⇒ T): RedisBatch[T]
  5. def foreach[A](ops: TraversableOnce[A])(opFun: (A) ⇒ RedisBatch[Any]): RedisBatch[Unit]
  6. def fromTry[T](t: commons.Try[T]): RedisBatch[T]
  7. def sequence[Ops, Res](ops: Ops)(implicit sequencer: Sequencer[Ops, Res]): RedisBatch[Res]

    Merges multiple RedisBatches into one.

    Merges multiple RedisBatches into one. This is similar to Scala's Future.sequence but more general, because the left-hand-side (Ops) can be more than just a collection. It can be any type for which an instance of Sequencer type-function is defined. This includes all standard Scala collections and tuples. See Sequencer for more details.

    Example usage:

    import RedisApi.Batches.StringTyped._
    
    // tuple of batches -> single batch of a tuple
    val tupleBatch: RedisBatch[(Opt[String],Long)] =
      RedisBatch.sequence(get("key1"), incr("key2"))
    
    // collection of batches -> single batch of a collection
    val seqBatch: RedisBatch[Seq[Opt[String]]] =
      RedisBatch.sequence((1 to 10).map(i => get(s"key$$i")))
    
    // collection of tuples of batches -> single batch of collection of tuples
    val tupleCollectionBatch: RedisBatch[Seq[(Opt[String], Long)]] =
      RedisBatch.sequence((1 to 10).map(i => (get(s"stringKey$$i"), incr(s"numberKey$$i"))))
  8. def success[A](a: A): RedisBatch[A]
  9. def traverse[M[X] <: TraversableOnce[X], A, B, That](coll: M[A])(opFun: (A) ⇒ RedisBatch[B])(implicit cbf: CanBuildFrom[M[A], B, That]): RedisBatch[That]
  10. final val unit: RedisBatch[Unit]
  11. object Index