Object/Class

zio

ZManaged

Related Docs: class ZManaged | package zio

Permalink

object ZManaged extends Serializable

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ZManaged
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def _1[R, E, A, B](implicit ev: <:<[R, (A, B)]): ZManaged[R, E, A]

    Permalink

    Returns an effectful function that extracts out the first element of a tuple.

  5. final def _2[R, E, A, B](implicit ev: <:<[R, (A, B)]): ZManaged[R, E, B]

    Permalink

    Returns an effectful function that extracts out the second element of a tuple.

  6. final def absolve[R, E, A](v: ZManaged[R, E, Either[E, A]]): ZManaged[R, E, A]

    Permalink

    Submerges the error case of an Either into the ZManaged.

    Submerges the error case of an Either into the ZManaged. The inverse operation of ZManaged.either.

  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def collectAll[R, E, A1, A2](ms: Iterable[ZManaged[R, E, A2]]): ZManaged[R, E, List[A2]]

    Permalink

    Evaluate each effect in the structure from left to right, and collect the results.

    Evaluate each effect in the structure from left to right, and collect the results. For a parallel version, see collectAllPar.

  10. final def collectAllPar[R, E, A](as: Iterable[ZManaged[R, E, A]]): ZManaged[R, E, List[A]]

    Permalink

    Evaluate each effect in the structure in parallel, and collect the results.

    Evaluate each effect in the structure in parallel, and collect the results. For a sequential version, see collectAll.

  11. final def collectAllParN[R, E, A](n: Int)(as: Iterable[ZManaged[R, E, A]]): ZManaged[R, E, List[A]]

    Permalink

    Evaluate each effect in the structure in parallel, and collect the results.

    Evaluate each effect in the structure in parallel, and collect the results. For a sequential version, see collectAll.

    Unlike CollectAllPar, this method will use at most n fibers.

  12. final def die(t: Throwable): ZManaged[Any, Nothing, Nothing]

    Permalink

    Returns an effect that dies with the specified Throwable.

    Returns an effect that dies with the specified Throwable. This method can be used for terminating a fiber because a defect has been detected in the code.

  13. final def dieMessage(message: String): ZManaged[Any, Nothing, Nothing]

    Permalink

    Returns an effect that dies with a java.lang.RuntimeException having the specified text message.

    Returns an effect that dies with a java.lang.RuntimeException having the specified text message. This method can be used for terminating a fiber because a defect has been detected in the code.

  14. final def done[E, A](r: Exit[E, A]): ZManaged[Any, E, A]

    Permalink

    Returns an effect from a zio.Exit value.

  15. final def effectTotal[R, A](r: ⇒ A): ZManaged[R, Nothing, A]

    Permalink

    Lifts a by-name, pure value into a Managed.

  16. final def environment[R]: ZManaged[R, Nothing, R]

    Permalink

    Accesses the whole environment of the effect.

  17. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  19. final def fail[E](error: E): ZManaged[Any, E, Nothing]

    Permalink

    Returns an effect that models failure with the specified error.

    Returns an effect that models failure with the specified error. The moral equivalent of throw for pure code.

  20. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  21. final def finalizer[R](f: ZIO[R, Nothing, _]): ZManaged[R, Nothing, Unit]

    Permalink

    Creates an effect that only executes the provided finalizer as its release action.

  22. final def finalizerExit[R](f: (Exit[_, _]) ⇒ ZIO[R, Nothing, Any]): ZManaged[R, Nothing, Unit]

    Permalink

    Creates an effect that only executes the provided function as its release action.

  23. final def finalizerRef[R](initial: (Exit[_, _]) ⇒ ZIO[R, Nothing, Any]): ZManaged[R, Nothing, Ref[(Exit[_, _]) ⇒ ZIO[R, Nothing, Any]]]

    Permalink

    Creates an effect that executes a finalizer stored in a Ref.

    Creates an effect that executes a finalizer stored in a Ref. The Ref is yielded as the result of the effect, allowing for control flows that require mutating finalizers.

  24. final def flatten[R, E, A](zManaged: ZManaged[R, E, ZManaged[R, E, A]]): ZManaged[R, E, A]

    Permalink

    Returns an effect that performs the outer effect first, followed by the inner effect, yielding the value of the inner effect.

    Returns an effect that performs the outer effect first, followed by the inner effect, yielding the value of the inner effect.

    This method can be used to "flatten" nested effects.

  25. final def foreach[R, E, A1, A2](as: Iterable[A1])(f: (A1) ⇒ ZManaged[R, E, A2]): ZManaged[R, E, List[A2]]

    Permalink

    Applies the function f to each element of the Iterable[A] and returns the results in a new List[B].

    Applies the function f to each element of the Iterable[A] and returns the results in a new List[B].

    For a parallel version of this method, see foreachPar.

  26. final def foreachPar[R, E, A1, A2](as: Iterable[A1])(f: (A1) ⇒ ZManaged[R, E, A2]): ZManaged[R, E, List[A2]]

    Permalink

    Applies the function f to each element of the Iterable[A] in parallel, and returns the results in a new List[B].

    Applies the function f to each element of the Iterable[A] in parallel, and returns the results in a new List[B].

    For a sequential version of this method, see foreach.

  27. final def foreachParN[R, E, A1, A2](n: Int)(as: Iterable[A1])(f: (A1) ⇒ ZManaged[R, E, A2]): ZManaged[R, E, List[A2]]

    Permalink

    Applies the function f to each element of the Iterable[A] in parallel, and returns the results in a new List[B].

    Applies the function f to each element of the Iterable[A] in parallel, and returns the results in a new List[B].

    Unlike foreachPar, this method will use at most up to n fibers.

  28. final def foreachParN_[R, E, A](n: Int)(as: Iterable[A])(f: (A) ⇒ ZManaged[R, E, Any]): ZManaged[R, E, Unit]

    Permalink

    Applies the function f to each element of the Iterable[A] and runs produced effects in parallel, discarding the results.

    Applies the function f to each element of the Iterable[A] and runs produced effects in parallel, discarding the results.

    Unlike foreachPar_, this method will use at most up to n fibers.

  29. final def foreachPar_[R, E, A](as: Iterable[A])(f: (A) ⇒ ZManaged[R, E, _]): ZManaged[R, E, Unit]

    Permalink

    Applies the function f to each element of the Iterable[A] and runs produced effects in parallel, discarding the results.

    Applies the function f to each element of the Iterable[A] and runs produced effects in parallel, discarding the results.

    For a sequential version of this method, see foreach_.

  30. final def foreach_[R, E, A](as: Iterable[A])(f: (A) ⇒ ZManaged[R, E, _]): ZManaged[R, E, Unit]

    Permalink

    Applies the function f to each element of the Iterable[A] and runs produced effects sequentially.

    Applies the function f to each element of the Iterable[A] and runs produced effects sequentially.

    Equivalent to foreach(as)(f).void, but without the cost of building the list of results.

  31. final def fromAutoCloseable[R, E, A <: AutoCloseable](fa: ZIO[R, E, A]): ZManaged[R, E, A]

    Permalink

    Creates a ZManaged from an AutoCloseable resource.

    Creates a ZManaged from an AutoCloseable resource. The resource's close method will be used as the release action.

  32. final def fromEffect[R, E, A](fa: ZIO[R, E, A]): ZManaged[R, E, A]

    Permalink

    Lifts a ZIO[R, E, A] into ZManaged[R, E, A] with no release action.

    Lifts a ZIO[R, E, A] into ZManaged[R, E, A] with no release action. Use with care.

  33. final def fromEither[E, A](v: ⇒ Either[E, A]): ZManaged[Any, E, A]

    Permalink

    Lifts an Either into a ZManaged value.

  34. final def fromFunction[R, A](f: (R) ⇒ A): ZManaged[R, Nothing, A]

    Permalink

    Lifts a function R => A into a ZManaged[R, Nothing, A].

  35. final def fromFunctionM[R, E, A](f: (R) ⇒ ZManaged[Any, E, A]): ZManaged[R, E, A]

    Permalink

    Lifts an effectful function whose effect requires no environment into an effect that requires the input to the function.

  36. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  37. final def halt[E](cause: Cause[E]): ZManaged[Any, E, Nothing]

    Permalink

    Returns an effect that models failure with the specified Cause.

  38. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  39. final def identity[R]: ZManaged[R, Nothing, R]

    Permalink

    Returns the identity effectful function, which performs no effects

  40. final val interrupt: ZManaged[Any, Nothing, Nothing]

    Permalink

    Returns an effect that is interrupted.

  41. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  42. final def make[R, E, A](acquire: ZIO[R, E, A])(release: (A) ⇒ ZIO[R, Nothing, _]): ZManaged[R, E, A]

    Permalink

    Lifts a ZIO[R, E, R] into ZManaged[R, E, R] with a release action.

  43. final def makeEffect[R, A](acquire: ⇒ A)(release: Function1[A, _]): ZManaged[R, Throwable, A]

    Permalink

    Lifts a synchronous effect into ZManaged[R, Throwable, R] with a release action.

  44. final def makeExit[R, E, A](acquire: ZIO[R, E, A])(release: (A, Exit[_, _]) ⇒ ZIO[R, Nothing, _]): ZManaged[R, E, A]

    Permalink

    Lifts a ZIO[R, E, R] into ZManaged[R, E, R] with a release action that handles Exit.

  45. final def mergeAll[R, E, A, B](in: Iterable[ZManaged[R, E, A]])(zero: B)(f: (B, A) ⇒ B): ZManaged[R, E, B]

    Permalink

    Merges an Iterable[IO] to a single IO, working sequentially.

  46. final def mergeAllPar[R, E, A, B](in: Iterable[ZManaged[R, E, A]])(zero: B)(f: (B, A) ⇒ B): ZManaged[R, E, B]

    Permalink

    Merges an Iterable[IO] to a single IO, working in parallel.

  47. final def mergeAllParN[R, E, A, B](n: Int)(in: Iterable[ZManaged[R, E, A]])(zero: B)(f: (B, A) ⇒ B): ZManaged[R, E, B]

    Permalink

    Merges an Iterable[IO] to a single IO, working in parallel.

    Merges an Iterable[IO] to a single IO, working in parallel.

    Unlike mergeAllPar, this method will use at most up to n fibers.

    This is not implemented in terms of ZIO.foreach / ZManaged.zipWithPar as otherwise all reservation phases would always run, causing unnecessary work

  48. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  49. val never: ZManaged[Any, Nothing, Nothing]

    Permalink

    Returns a ZManaged that never acquires a resource.

  50. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  51. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  52. final def reduceAll[R, E, A](a: ZManaged[R, E, A], as: Iterable[ZManaged[R, E, A]])(f: (A, A) ⇒ A): ZManaged[R, E, A]

    Permalink

    Reduces an Iterable[IO] to a single IO, working sequentially.

  53. final def reduceAllPar[R, E, A](a: ZManaged[R, E, A], as: Iterable[ZManaged[R, E, A]])(f: (A, A) ⇒ A): ZManaged[R, E, A]

    Permalink

    Reduces an Iterable[IO] to a single IO, working in parallel.

  54. final def reduceAllParN[R, E, A](n: Long)(a1: ZManaged[R, E, A], as: Iterable[ZManaged[R, E, A]])(f: (A, A) ⇒ A): ZManaged[R, E, A]

    Permalink

    Reduces an Iterable[IO] to a single IO, working in parallel.

    Reduces an Iterable[IO] to a single IO, working in parallel.

    Unlike mergeAllPar, this method will use at most up to n fibers.

    This is not implemented in terms of ZIO.foreach / ZManaged.zipWithPar as otherwise all reservation phases would always run, causing unnecessary work

  55. final def require[R, E, A](error: E): (ZManaged[R, E, Option[A]]) ⇒ ZManaged[R, E, A]

    Permalink

    Requires that the given ZManaged[E, Option[A]] contain a value.

    Requires that the given ZManaged[E, Option[A]] contain a value. If there is no value, then the specified error will be raised.

  56. final def reserve[R, E, A](reservation: Reservation[R, E, A]): ZManaged[R, E, A]

    Permalink

    Lifts a pure Reservation[R, E, A] into ZManaged[R, E, A]

  57. final def sandbox[R, E, A](v: ZManaged[R, E, A]): ZManaged[R, Cause[E], A]

    Permalink
  58. final def sequence[R, E, A1, A2](ms: Iterable[ZManaged[R, E, A2]]): ZManaged[R, E, List[A2]]

    Permalink

    Alias for ZManaged.collectAll

  59. final def sequencePar[R, E, A](as: Iterable[ZManaged[R, E, A]]): ZManaged[R, E, List[A]]

    Permalink

    Alias for ZManaged.collectAllPar

  60. final def sequenceParN[R, E, A](n: Int)(as: Iterable[ZManaged[R, E, A]]): ZManaged[R, E, List[A]]

    Permalink

    Alias for ZManaged.collectAllParN

  61. final def succeed[R, A](r: A): ZManaged[R, Nothing, A]

    Permalink

    Lifts a strict, pure value into a Managed.

  62. final def suspend[R, E, A](zManaged: ⇒ ZManaged[R, E, A]): ZManaged[R, E, A]

    Permalink

    Returns a lazily constructed Managed.

  63. final def swap[R, E, A, B](implicit ev: <:<[R, (A, B)]): ZManaged[R, E, (B, A)]

    Permalink

    Returns an effectful function that merely swaps the elements in a Tuple2.

  64. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  65. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  66. final def traverse[R, E, A1, A2](as: Iterable[A1])(f: (A1) ⇒ ZManaged[R, E, A2]): ZManaged[R, E, List[A2]]

    Permalink

    Alias for ZManaged.foreach

  67. final def traversePar[R, E, A1, A2](as: Iterable[A1])(f: (A1) ⇒ ZManaged[R, E, A2]): ZManaged[R, E, List[A2]]

    Permalink

    Alias for ZManaged.foreachPar

  68. final def traverseParN[R, E, A1, A2](n: Int)(as: Iterable[A1])(f: (A1) ⇒ ZManaged[R, E, A2]): ZManaged[R, E, List[A2]]

    Permalink

    Alias for ZManaged.foreachParN

  69. final def traverseParN_[R, E, A](n: Int)(as: Iterable[A])(f: (A) ⇒ ZManaged[R, E, Any]): ZManaged[R, E, Unit]

    Permalink

    Alias for ZManaged.foreachParN_

  70. final def traversePar_[R, E, A](as: Iterable[A])(f: (A) ⇒ ZManaged[R, E, _]): ZManaged[R, E, Unit]

    Permalink

    Alias for ZManaged.foreachPar_

  71. final def traverse_[R, E, A](as: Iterable[A])(f: (A) ⇒ ZManaged[R, E, _]): ZManaged[R, E, Unit]

    Permalink

    Alias for ZManaged.foreach_

  72. final val unit: ZManaged[Any, Nothing, Unit]

    Permalink

    Returns the effect resulting from mapping the success of this effect to unit.

  73. final def unsandbox[R, E, A](v: ZManaged[R, Cause[E], A]): ZManaged[R, E, A]

    Permalink

    The inverse operation to sandbox.

    The inverse operation to sandbox. Submerges the full cause of failure.

  74. final def unwrap[R, E, A](fa: ZIO[R, E, ZManaged[R, E, A]]): ZManaged[R, E, A]

    Permalink

    Unwraps a ZManaged that is inside a ZIO.

  75. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  78. final def when[R, E](b: Boolean)(zManaged: ZManaged[R, E, _]): ZManaged[R, E, Unit]

    Permalink

    The moral equivalent of if (p) exp

  79. final def whenCase[R, E, A](a: A)(pf: PartialFunction[A, ZManaged[R, E, _]]): ZManaged[R, E, Unit]

    Permalink

    Runs an effect when the supplied PartialFunction matches for the given value, otherwise does nothing.

  80. final def whenCaseM[R, E, A](a: ZManaged[R, E, A])(pf: PartialFunction[A, ZManaged[R, E, _]]): ZManaged[R, E, Unit]

    Permalink

    Runs an effect when the supplied PartialFunction matches for the given effectful value, otherwise does nothing.

  81. final def whenM[R, E](b: ZManaged[R, E, Boolean])(zManaged: ZManaged[R, E, _]): ZManaged[R, E, Unit]

    Permalink

    The moral equivalent of if (p) exp when p has side-effects

Deprecated Value Members

  1. final def succeedLazy[R, A](r: ⇒ A): ZManaged[R, Nothing, A]

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 1.0.0) use effectTotal

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped