object ZManaged extends Serializable
- Alphabetic
- By Inheritance
- ZManaged
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def _1[R, E, A, B](implicit ev: <:<[R, (A, B)]): ZManaged[R, E, A]
Returns an effectful function that extracts out the first element of a tuple.
- final def _2[R, E, A, B](implicit ev: <:<[R, (A, B)]): ZManaged[R, E, B]
Returns an effectful function that extracts out the second element of a tuple.
- final def absolve[R, E, A](v: ZManaged[R, E, Either[E, A]]): ZManaged[R, E, A]
Submerges the error case of an
Eitherinto theZManaged.Submerges the error case of an
Eitherinto theZManaged. The inverse operation ofZManaged.either. - final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def collectAll[R, E, A1, A2](ms: Iterable[ZManaged[R, E, A2]]): ZManaged[R, E, List[A2]]
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. - final def collectAllPar[R, E, A](as: Iterable[ZManaged[R, E, A]]): ZManaged[R, E, List[A]]
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. - final def collectAllParN[R, E, A](n: Int)(as: Iterable[ZManaged[R, E, A]]): ZManaged[R, E, List[A]]
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 mostnfibers. - final def die(t: Throwable): ZManaged[Any, Nothing, Nothing]
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. - final def dieMessage(message: String): ZManaged[Any, Throwable, Nothing]
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.
- final def done[E, A](r: Exit[E, A]): ZManaged[Any, E, A]
Returns an effect from a zio.Exit value.
- final def environment[R]: ZManaged[R, Nothing, R]
Accesses the whole environment of the effect.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def fail[E](error: E): ZManaged[Any, E, Nothing]
Returns an effect that models failure with the specified error.
Returns an effect that models failure with the specified error. The moral equivalent of
throwfor pure code. - def finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def finalizer[R](f: ZIO[R, Nothing, _]): ZManaged[R, Nothing, Unit]
Creates an effect that only executes the
UIOvalue as its release action. - final def flatten[R, E, A](zManaged: ZManaged[R, E, ZManaged[R, E, A]]): ZManaged[R, E, A]
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.
- final def foreach[R, E, A1, A2](as: Iterable[A1])(f: (A1) => ZManaged[R, E, A2]): ZManaged[R, E, List[A2]]
Applies the function
fto each element of theIterable[A]and returns the results in a newList[B].Applies the function
fto each element of theIterable[A]and returns the results in a newList[B].For a parallel version of this method, see
foreachPar. - final def foreachPar[R, E, A1, A2](as: Iterable[A1])(f: (A1) => ZManaged[R, E, A2]): ZManaged[R, E, List[A2]]
Applies the function
fto each element of theIterable[A]in parallel, and returns the results in a newList[B].Applies the function
fto each element of theIterable[A]in parallel, and returns the results in a newList[B].For a sequential version of this method, see
foreach. - final def foreachParN[R, E, A1, A2](n: Int)(as: Iterable[A1])(f: (A1) => ZManaged[R, E, A2]): ZManaged[R, E, List[A2]]
Applies the function
fto each element of theIterable[A]in parallel, and returns the results in a newList[B].Applies the function
fto each element of theIterable[A]in parallel, and returns the results in a newList[B].Unlike
foreachPar, this method will use at most up tonfibers. - final def foreachParN_[R, E, A](n: Int)(as: Iterable[A])(f: (A) => ZManaged[R, E, Any]): ZManaged[R, E, Unit]
Applies the function
fto each element of theIterable[A]and runs produced effects in parallel, discarding the results.Applies the function
fto each element of theIterable[A]and runs produced effects in parallel, discarding the results.Unlike
foreachPar_, this method will use at most up tonfibers. - final def foreachPar_[R, E, A](as: Iterable[A])(f: (A) => ZManaged[R, E, _]): ZManaged[R, E, Unit]
Applies the function
fto each element of theIterable[A]and runs produced effects in parallel, discarding the results.Applies the function
fto each element of theIterable[A]and runs produced effects in parallel, discarding the results.For a sequential version of this method, see
foreach_. - final def foreach_[R, E, A](as: Iterable[A])(f: (A) => ZManaged[R, E, _]): ZManaged[R, E, Unit]
Applies the function
fto each element of theIterable[A]and runs produced effects sequentially.Applies the function
fto each element of theIterable[A]and runs produced effects sequentially.Equivalent to
foreach(as)(f).void, but without the cost of building the list of results. - final def fromAutoCloseable[R, E, A <: AutoCloseable](fa: ZIO[R, E, A]): ZManaged[R, E, A]
Creates a ZManaged from an
AutoCloseableresource.Creates a ZManaged from an
AutoCloseableresource. The resource'sclosemethod will be used as the release action. - final def fromEffect[R, E, A](fa: ZIO[R, E, A]): ZManaged[R, E, A]
Lifts a ZIO[R, E, R] into ZManaged[R, E, R] with no release action.
Lifts a ZIO[R, E, R] into ZManaged[R, E, R] with no release action. Use with care.
- final def fromEither[E, A](v: => Either[E, A]): ZManaged[Any, E, A]
Lifts an
Eitherinto aZManagedvalue. - final def fromFunction[R, A](f: (R) => A): ZManaged[R, Nothing, A]
Lifts a function
R => Ainto aZManaged[R, Nothing, A]. - final def fromFunctionM[R, E, A](f: (R) => ZManaged[Any, E, A]): ZManaged[R, E, A]
Lifts an effectful function whose effect requires no environment into an effect that requires the input to the function.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def halt[E](cause: Cause[E]): ZManaged[Any, E, Nothing]
Returns an effect that models failure with the specified
Cause. - def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def identity[R]: ZManaged[R, Nothing, R]
Returns the identity effectful function, which performs no effects
- final val interrupt: ZManaged[Any, Nothing, Nothing]
Returns an effect that is interrupted.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def make[R, E, A](acquire: ZIO[R, E, A])(release: (A) => ZIO[R, Nothing, _]): ZManaged[R, E, A]
Lifts a
ZIO[R, E, R]intoZManaged[R, E, R]with a release action. - final def makeExit[R, E, A](acquire: ZIO[R, E, A])(release: (A, Exit[_, _]) => ZIO[R, Nothing, _]): ZManaged[R, E, A]
Lifts a
ZIO[R, E, R]intoZManaged[R, E, R]with a release action that handlesExit. - final def mergeAll[R, E, A, B](in: Iterable[ZManaged[R, E, A]])(zero: B)(f: (B, A) => B): ZManaged[R, E, B]
Merges an
Iterable[IO]to a single IO, working sequentially. - final def mergeAllPar[R, E, A, B](in: Iterable[ZManaged[R, E, A]])(zero: B)(f: (B, A) => B): ZManaged[R, E, B]
Merges an
Iterable[IO]to a single IO, working in parallel. - 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]
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 tonfibers.This is not implemented in terms of ZIO.foreach / ZManaged.zipWithPar as otherwise all reservation phases would always run, causing unnecessary work
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val never: ZManaged[Any, Nothing, Nothing]
Returns a
ZManagedthat never acquires a resource. - final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- 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]
Reduces an
Iterable[IO]to a singleIO, working sequentially. - 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]
Reduces an
Iterable[IO]to a singleIO, working in parallel. - 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]
Reduces an
Iterable[IO]to a singleIO, working in parallel.Reduces an
Iterable[IO]to a singleIO, working in parallel.Unlike
mergeAllPar, this method will use at most up tonfibers.This is not implemented in terms of ZIO.foreach / ZManaged.zipWithPar as otherwise all reservation phases would always run, causing unnecessary work
- final def require[R, E, A](error: E): (ZManaged[R, E, Option[A]]) => ZManaged[R, E, A]
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. - final def reserve[R, E, A](reservation: Reservation[R, E, A]): ZManaged[R, E, A]
Lifts a pure
Reservation[R, E, A]intoZManaged[R, E, A] - final def sandbox[R, E, A](v: ZManaged[R, E, A]): ZManaged[R, Cause[E], A]
- final def sequence[R, E, A1, A2](ms: Iterable[ZManaged[R, E, A2]]): ZManaged[R, E, List[A2]]
Alias for ZManaged.collectAll
- final def sequencePar[R, E, A](as: Iterable[ZManaged[R, E, A]]): ZManaged[R, E, List[A]]
Alias for ZManaged.collectAllPar
- final def sequenceParN[R, E, A](n: Int)(as: Iterable[ZManaged[R, E, A]]): ZManaged[R, E, List[A]]
Alias for ZManaged.collectAllParN
- final def succeed[R, A](r: A): ZManaged[R, Nothing, A]
Lifts a strict, pure value into a Managed.
- final def succeedLazy[R, A](r: => A): ZManaged[R, Nothing, A]
Lifts a by-name, pure value into a Managed.
- final def suspend[R, E, A](zManaged: => ZManaged[R, E, A]): ZManaged[R, E, A]
Returns a lazily constructed Managed.
- final def swap[R, E, A, B](implicit ev: <:<[R, (A, B)]): ZManaged[R, E, (B, A)]
Returns an effectful function that merely swaps the elements in a
Tuple2. - final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def traverse[R, E, A1, A2](as: Iterable[A1])(f: (A1) => ZManaged[R, E, A2]): ZManaged[R, E, List[A2]]
Alias for ZManaged.foreach
- final def traversePar[R, E, A1, A2](as: Iterable[A1])(f: (A1) => ZManaged[R, E, A2]): ZManaged[R, E, List[A2]]
Alias for ZManaged.foreachPar
- final def traverseParN[R, E, A1, A2](n: Int)(as: Iterable[A1])(f: (A1) => ZManaged[R, E, A2]): ZManaged[R, E, List[A2]]
Alias for ZManaged.foreachParN
- final def traverseParN_[R, E, A](n: Int)(as: Iterable[A])(f: (A) => ZManaged[R, E, Any]): ZManaged[R, E, Unit]
Alias for ZManaged.foreachParN_
- final def traversePar_[R, E, A](as: Iterable[A])(f: (A) => ZManaged[R, E, _]): ZManaged[R, E, Unit]
Alias for ZManaged.foreachPar_
- final def traverse_[R, E, A](as: Iterable[A])(f: (A) => ZManaged[R, E, _]): ZManaged[R, E, Unit]
Alias for ZManaged.foreach_
- final val unit: ZManaged[Any, Nothing, Unit]
Returns the effect resulting from mapping the success of this effect to unit.
- final def unsandbox[R, E, A](v: ZManaged[R, Cause[E], A]): ZManaged[R, E, A]
The inverse operation to
sandbox.The inverse operation to
sandbox. Submerges the full cause of failure. - final def unwrap[R, E, A](fa: ZIO[R, E, ZManaged[R, E, A]]): ZManaged[R, E, A]
Unwraps a
ZManagedthat is inside aZIO. - final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def when[R, E](b: Boolean)(zManaged: ZManaged[R, E, _]): ZManaged[R, E, Unit]
The moral equivalent of
if (p) exp - final def whenCase[R, E, A](a: A)(pf: PartialFunction[A, ZManaged[R, E, _]]): ZManaged[R, E, Unit]
Runs an effect when the supplied
PartialFunctionmatches for the given value, otherwise does nothing. - final def whenCaseM[R, E, A](a: ZManaged[R, E, A])(pf: PartialFunction[A, ZManaged[R, E, _]]): ZManaged[R, E, Unit]
Runs an effect when the supplied
PartialFunctionmatches for the given effectful value, otherwise does nothing. - final def whenM[R, E](b: ZManaged[R, E, Boolean])(zManaged: ZManaged[R, E, _]): ZManaged[R, E, Unit]
The moral equivalent of
if (p) expwhenphas side-effects