object MonadUtil

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MonadUtil
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def batchedSequentialTraverse[X, M[_], S](parallelism: PositiveInt, chunkSize: PositiveInt)(xs: Seq[X])(processChunk: (Seq[X]) => M[Seq[S]])(implicit M: Parallel[M]): M[Seq[S]]

    Batched version of sequential traverse

    Batched version of sequential traverse

    Can be used to avoid overloading the database queue. Use e.g. maxDbConnections * 2 as parameter for parallelism to not overload the database queue but to make sufficient use of the existing resources.

  6. def batchedSequentialTraverse_[X, M[_]](parallelism: PositiveInt, chunkSize: PositiveInt)(xs: Seq[X])(processChunk: (Seq[X]) => M[Unit])(implicit M: Parallel[M]): M[Unit]
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. def foldLeftM[M[_], S, A](initialState: S, xs: Iterable[A])(step: (S, A) => M[S])(implicit monad: Monad[M]): M[S]
  11. def foldLeftM[M[_], S, A](initialState: S, iter: Iterator[A])(step: (S, A) => M[S])(implicit monad: Monad[M]): M[S]

    The caller must ensure that the underlying data structure of the iterator is immutable

  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  18. def parTraverseWithLimit[X, M[_], S](parallelism: Int)(xs: Seq[X])(processElement: (X) => M[S])(implicit M: Parallel[M]): M[Seq[S]]

    Parallel traverse with limited parallelism

  19. def parTraverseWithLimit_[X, M[_], S](parallelism: Int)(xs: Seq[X])(processElement: (X) => M[S])(implicit M: Parallel[M]): M[Unit]
  20. def repeatFlatmap[M[_], A](m: M[A], f: (A) => M[A], counter: Int)(implicit monad: Monad[M]): M[A]

    Repeatedly apply the same function to a monadic value m.

    Repeatedly apply the same function to a monadic value m. This can be used to retry until the limit counter is reached or the monad m aborts.

    Annotations
    @tailrec()
  21. def sequentialTraverse[X, M[_], S](xs: Seq[X])(f: (X) => M[S])(implicit monad: Monad[M]): M[Seq[S]]
  22. def sequentialTraverseMonoid[M[_], A, B](xs: Iterator[A])(step: (A) => M[B])(implicit monad: Monad[M], monoid: Monoid[B]): M[B]

    Conceptually equivalent to sequentialTraverse(xs)(step).map(monoid.combineAll).

  23. def sequentialTraverseMonoid[M[_], A, B](xs: Iterable[A])(step: (A) => M[B])(implicit monad: Monad[M], monoid: Monoid[B]): M[B]

    Conceptually equivalent to sequentialTraverse(xs)(step).map(monoid.combineAll).

  24. def sequentialTraverse_[M[_], A](xs: Iterator[A])(step: (A) => M[_])(implicit monad: Monad[M]): M[Unit]

    The caller must ensure that the underlying data structure of the iterator is immutable

    The caller must ensure that the underlying data structure of the iterator is immutable

    Do not use Cats' .traverse_ methods as Cats does not specify whether the step runs sequentially or in parallel for future-like monads. In fact, this behaviour differs for different versions of Cats.

  25. def sequentialTraverse_[M[_], A](xs: Iterable[A])(step: (A) => M[_])(implicit monad: Monad[M]): M[Unit]

    The implementation of traverse in cats is parallel, so this provides a sequential alternative.

    The implementation of traverse in cats is parallel, so this provides a sequential alternative. The caller must ensure that the Iterable is immutable

    Do not use Cats' .traverse_ methods as Cats does not specify whether the step runs sequentially or in parallel for future-like monads. In fact, this behaviour differs for different versions of Cats.

  26. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  27. def toString(): String
    Definition Classes
    AnyRef → Any
  28. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  29. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  30. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped