Class RIO<R,A>
java.lang.Object
com.github.tonivade.purefun.effect.RIO<R,A>
- All Implemented Interfaces:
Applicable<RIO<R,,?>, A> Bindable<RIO<R,,?>, A> Effect<RIO<R,,?>, A> Mappable<RIO<R,,?>, A> Recoverable,RIOOf<R,,A> Kind<RIO<R,?>, A>
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.github.tonivade.purefun.core.Applicable
Applicable.Map2<F extends Applicable<F,?>, A, B>, Applicable.Map3<F extends Applicable<F, ?>, A, B, C>, Applicable.Map4<F extends Applicable<F, ?>, A, B, C, D>, Applicable.Map5<F extends Applicable<F, ?>, A, B, C, D, E> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <R,A> RIO <R, A> static <R,A> RIO <R, A> static <R,A> RIO <R, A> static <R,A> RIO <R, A> static <R,A extends AutoCloseable, B>
RIO<R, B> bracket(Kind<RIO<R, ?>, ? extends A> acquire, Function1<? super A, ? extends Kind<RIO<R, ?>, ? extends B>> use) static <R,A, B> RIO <R, B> bracket(Kind<RIO<R, ?>, ? extends A> acquire, Function1<? super A, ? extends Kind<RIO<R, ?>, ? extends B>> use, Consumer1<? super A> release) static <R,A, B> RIO <R, B> bracket(Kind<RIO<R, ?>, ? extends A> acquire, Function1<? super A, ? extends Kind<RIO<R, ?>, ? extends B>> use, Function1<? super A, ? extends Kind<RIO<R, ?>, Unit>> release) static <R,A> RIO <R, A> static <R,A> RIO <R, A> static <R> RIO<R, R> env()exec(CheckedRunnable task) foldM(Function1<? super Throwable, ? extends Kind<RIO<R, ?>, ? extends B>> mapError, Function1<? super A, ? extends Kind<RIO<R, ?>, ? extends B>> map) fork()static <R,A> RIO <R, A> fromEither(Producer<Either<Throwable, ? extends A>> task) static <R,A> RIO <R, A> fromEither(Either<Throwable, ? extends A> task) static <R,A> RIO <R, A> fromOption(Producer<Option<? extends A>> task) static <R,A> RIO <R, A> fromOption(Option<? extends A> task) static <R,A> RIO <R, A> static <R,A> RIO <R, A> liftEither(Function1<? super A, ? extends Either<Throwable, ? extends B>> function) liftOption(Function1<? super A, ? extends Option<? extends B>> function) static <R,A> RIO <R, A> never()static <R,A, B, C>
RIO<R, C> parMap2(Kind<RIO<R, ?>, ? extends A> za, Kind<RIO<R, ?>, ? extends B> zb, Function2<? super A, ? super B, ? extends C> mapper) static <R,A, B, C>
RIO<R, C> parMap2(Executor executor, Kind<RIO<R, ?>, ? extends A> za, Kind<RIO<R, ?>, ? extends B> zb, Function2<? super A, ? super B, ? extends C> mapper) static <R,A> RIO <R, A> pure(A value) static <R,A> RIO <R, A> raiseError(Throwable throwable) recoverWith(Class<X> type, Function1<? super X, ? extends A> function) repeat()repeat(int times) retry()retry(int maxRetries) voidsafeRunAsync(R env, Consumer1<? super Try<? extends A>> callback) safeRunSync(R env) static <R,A> RIO <R, A> timed()toEIO()toPureIO()toURIO()unit()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.github.tonivade.purefun.core.Recoverable
sneakyThrow
-
Field Details
-
UNIT
-
instance
-
-
Constructor Details
-
RIO
-
-
Method Details
-
safeRunSync
-
toPureIO
-
toEIO
-
toURIO
-
runAsync
-
runAsync
-
safeRunAsync
-
map
-
flatMap
-
andThen
-
ap
-
recover
-
recoverWith
-
fold
-
foldM
-
orElse
-
zip
-
zipLeft
-
zipRight
-
zipWith
-
fork
-
timeout
-
timeout
-
repeat
-
repeat
-
repeat
-
repeat
-
retry
-
retry
-
retry
-
retry
-
timed
-
forked
-
accessM
-
access
-
env
-
absorb
-
parMap2
-
parMap2
-
race
-
race
-
racePair
-
sleep
-
sleep
-
lift
-
liftOption
-
liftTry
-
liftEither
-
fromOption
-
fromOption
-
fromTry
-
fromTry
-
fromEither
-
fromEither
-
exec
-
pure
-
raiseError
-
defer
-
task
-
never
-
async
-
cancellable
-
traverse
-
traverse
-
bracket
-
bracket
-
bracket
-
unit
-