Class URIO<R,A>
java.lang.Object
com.github.tonivade.purefun.effect.URIO<R,A>
- All Implemented Interfaces:
Applicable<URIO<R,,?>, A> Bindable<URIO<R,,?>, A> Effect<URIO<R,,?>, A> Mappable<URIO<R,,?>, A> Recoverable,URIOOf<R,,A> Kind<URIO<R,?>, A>
public final class URIO<R,A>
extends Object
implements URIOOf<R,A>, Effect<URIO<R,?>,A>, Recoverable
-
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> URIO <R, A> static <R,A> URIO <R, A> static <R,A> URIO <R, A> static <R,A extends AutoCloseable, B>
URIO<R, B> bracket(Kind<URIO<R, ?>, ? extends A> acquire, Function1<? super A, ? extends Kind<URIO<R, ?>, ? extends B>> use) static <R,A, B> URIO <R, B> bracket(Kind<URIO<R, ?>, ? extends A> acquire, Function1<? super A, ? extends Kind<URIO<R, ?>, ? extends B>> use, Consumer1<? super A> release) static <R,A, B> URIO <R, B> bracket(Kind<URIO<R, ?>, ? extends A> acquire, Function1<? super A, ? extends Kind<URIO<R, ?>, ? extends B>> use, Function1<? super A, ? extends Kind<URIO<R, ?>, Unit>> release) static <R,A> URIO <R, A> static <R,A> URIO <R, A> static <R> URIO<R, R> env()exec(CheckedRunnable task) private static <R,A> URIO <R, A> fork()static <R,T> URIO <R, T> fromEither(Either<Throwable, ? extends T> task) static <R,T> URIO <R, T> fromOption(Option<? extends T> task) static <R,T> URIO <R, T> liftEither(Function1<? super A, ? extends Either<Throwable, ? extends B>> function) liftOption(Function1<? super A, ? extends Option<? extends B>> function) static <R,A> URIO <R, A> never()static <R,A, B, C>
URIO<R, C> parMap2(Kind<URIO<R, ?>, ? extends A> za, Kind<URIO<R, ?>, ? extends B> zb, Function2<? super A, ? super B, ? extends C> mapper) static <R,A, B, C>
URIO<R, C> parMap2(Executor executor, Kind<URIO<R, ?>, ? extends A> za, Kind<URIO<R, ?>, ? extends B> zb, Function2<? super A, ? super B, ? extends C> mapper) static <R,A> URIO <R, A> pure(A value) static <R,A> URIO <R, A> raiseError(Throwable throwable) recoverWith(Class<X> type, Function1<? super X, ? extends A> function) redeemWith(Function1<? super Throwable, ? extends Kind<URIO<R, ?>, ? extends B>> mapError, Function1<? super A, ? extends Kind<URIO<R, ?>, ? extends B>> map) repeat()repeat(int times) private static <R,A> URIO <R, A> retry()retry(int maxRetries) private static <R,A> URIO <R, A> voidsafeRunAsync(R env, Consumer1<? super Try<? extends A>> callback) safeRunSync(R env) static <R,A> URIO <R, A> timed()toEIO()toPureIO()toRIO()unit()unsafeRunSync(R env) 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
-
URIO
-
-
Method Details
-
unsafeRunSync
-
safeRunSync
-
toPureIO
-
toEIO
-
toRIO
-
runAsync
-
runAsync
-
safeRunAsync
-
map
-
flatMap
-
andThen
-
ap
-
recover
-
recoverWith
-
redeem
-
redeemWith
-
zip
-
zipLeft
-
zipRight
-
zipWith
-
fork
-
timeout
-
timeout
-
repeat
-
repeat
-
repeat
-
repeat
-
retry
-
retry
-
retry
-
retry
-
timed
-
forked
-
accessM
-
access
-
env
-
parMap2
-
parMap2
-
race
-
race
-
racePair
-
lift
-
liftOption
-
liftTry
-
liftEither
-
sleep
-
sleep
-
exec
-
pure
-
raiseError
-
defer
-
task
-
fromOption
-
fromTry
-
fromEither
-
never
-
async
-
cancellable
-
traverse
-
traverse
-
bracket
-
bracket
-
bracket
-
unit
-
fold
-
repeat
-
retry
-