Class Task<A>
java.lang.Object
com.github.tonivade.purefun.effect.Task<A>
- All Implemented Interfaces:
Applicable<Task<?>,,A> Bindable<Task<?>,,A> Effect<Task<?>,,A> Mappable<Task<?>,,A> Recoverable,TaskOf<A>,Kind<Task<?>,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 <A> Task<A> <B> Task<B> <B> Task<B> static <A> Task<A> static <A> Task<A> static <A extends AutoCloseable,B>
Task<B> bracket(Kind<Task<?>, ? extends A> acquire, Function1<? super A, ? extends Kind<Task<?>, ? extends B>> use) static <A,B> Task <B> bracket(Kind<Task<?>, ? extends A> acquire, Function1<? super A, ? extends Kind<Task<?>, ? extends B>> use, Consumer1<? super A> release) static <A,B> Task <B> bracket(Kind<Task<?>, ? extends A> acquire, Function1<? super A, ? extends Kind<Task<?>, ? extends B>> use, Function1<? super A, ? extends Kind<Task<?>, Unit>> release) static <A> Task<A> exec(CheckedRunnable task) <B> Task<B> <B> UIO<B> <B> Task<B> foldM(Function1<? super Throwable, ? extends Kind<Task<?>, ? extends B>> mapError, Function1<? super A, ? extends Kind<Task<?>, ? extends B>> map) fork()static <A> Task<A> fromEither(Producer<Either<Throwable, ? extends A>> task) static <A> Task<A> fromEither(Either<Throwable, ? extends A> task) static <A> Task<A> fromOption(Producer<Option<? extends A>> task) static <A> Task<A> fromOption(Option<? extends A> task) static <A> Task<A> static <A> Task<A> liftEither(Function1<? super A, ? extends Either<Throwable, ? extends B>> function) liftOption(Function1<? super A, ? extends Option<? extends B>> function) <B> Task<B> static <A> Task<A> never()static <A,B, C> Task <C> parMap2(Kind<Task<?>, ? extends A> za, Kind<Task<?>, ? extends B> zb, Function2<? super A, ? super B, ? extends C> mapper) static <A,B, C> Task <C> parMap2(Executor executor, Kind<Task<?>, ? extends A> za, Kind<Task<?>, ? extends B> zb, Function2<? super A, ? super B, ? extends C> mapper) static <A> Task<A> pure(A value) static <A> Task<A> raiseError(Throwable error) recoverWith(Class<X> type, Function1<? super X, ? extends A> function) repeat()repeat(int times) retry()retry(int maxRetries) runAsync()voidsafeRunAsync(Consumer1<? super Try<? extends A>> callback) static <A> Task<A> timed()toEIO()toPureIO()toUIO()toURIO()unit()<B> Task<B> <B,C> Task <C> 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
-
Task
-
-
Method Details
-
toPureIO
-
toEIO
-
toURIO
-
toUIO
-
safeRunSync
-
runAsync
-
runAsync
-
safeRunAsync
-
map
-
flatMap
-
andThen
-
ap
-
foldM
-
fold
-
recoverWith
-
recover
-
orElse
-
zip
-
zipLeft
-
zipRight
-
zipWith
-
fork
-
timeout
-
timeout
-
repeat
-
repeat
-
repeat
-
repeat
-
retry
-
retry
-
retry
-
retry
-
timed
-
forked
-
parMap2
-
parMap2
-
race
-
race
-
racePair
-
absorb
-
lift
-
liftOption
-
liftTry
-
liftEither
-
fromOption
-
fromOption
-
fromTry
-
fromTry
-
fromEither
-
fromEither
-
sleep
-
sleep
-
exec
-
pure
-
defer
-
task
-
never
-
async
-
asyncF
-
raiseError
-
traverse
-
traverse
-
bracket
-
bracket
-
bracket
-
unit
-