Package | Description |
---|---|
ratpack.exec |
The execution management.
|
ratpack.exec.util | |
ratpack.test.exec |
Modifier and Type | Method and Description |
---|---|
static <T> ExecResult<T> |
ExecResult.complete()
Returns a complete exec result.
|
static <T> ExecResult<T> |
ExecResult.of(Result<T> result)
Wraps the given result as an exec result.
|
Modifier and Type | Method and Description |
---|---|
default Promise<Pair<ExecResult<T>,java.time.Duration>> |
Promise.timeResult() |
Modifier and Type | Method and Description |
---|---|
default void |
Downstream.accept(ExecResult<? extends T> result)
Signals this downstream, based on the given result.
|
Modifier and Type | Method and Description |
---|---|
default <B,A> Promise<A> |
Promise.around(Factory<? extends B> before,
BiFunction<? super B,? super ExecResult<T>,? extends ExecResult<A>> after)
Facilitates capturing a value before the the promise is subscribed and using it to later augment the result.
|
default <B,A> Promise<A> |
Promise.around(Factory<? extends B> before,
BiFunction<? super B,? super ExecResult<T>,? extends ExecResult<A>> after)
Facilitates capturing a value before the the promise is subscribed and using it to later augment the result.
|
default Promise<T> |
Promise.cacheResultFor(Function<? super ExecResult<T>,java.time.Duration> cacheFor)
Caches the promise result for a calculated amount of time.
|
default Promise<T> |
Promise.cacheResultIf(Predicate<? super ExecResult<T>> shouldCache)
Caches the promise result eternally and provide it to all future subscribers, if it satisfies the predicate.
|
default void |
Promise.result(Action<? super ExecResult<T>> resultHandler)
Consume the promised value as a
Result . |
default Promise<T> |
Promise.timeResult(BiAction<? super ExecResult<T>,? super java.time.Duration> action)
Emits the time taken from when the promise is subscribed to to when the result is available.
|
Modifier and Type | Method and Description |
---|---|
Promise<java.util.List<? extends ExecResult<T>>> |
ParallelBatch.yieldAll()
Processes all the promises of the batch, collecting any errors.
|
Promise<java.util.List<? extends ExecResult<T>>> |
Batch.yieldAll()
Processes all the promises of the batch, collecting any errors.
|
Promise<java.util.List<? extends ExecResult<T>>> |
SerialBatch.yieldAll()
Processes all the promises of the batch, collecting any errors.
|
Modifier and Type | Method and Description |
---|---|
void |
Promised.accept(ExecResult<? extends T> result)
Signals this downstream, based on the given result.
|
Modifier and Type | Method and Description |
---|---|
<T> ExecResult<T> |
ExecHarness.yield(Action<? super RegistrySpec> registry,
Function<? super Execution,? extends Promise<T>> func)
Synchronously returns a promised value.
|
default <T> ExecResult<T> |
ExecHarness.yield(Function<? super Execution,? extends Promise<T>> func)
Synchronously returns a promised value.
|
static <T> ExecResult<T> |
ExecHarness.yieldSingle(Action<? super RegistrySpec> registry,
Function<? super Execution,? extends Promise<T>> func)
Creates an exec harness,
executes the given function with it before closing it, then returning execution result. |
static <T> ExecResult<T> |
ExecHarness.yieldSingle(Function<? super Execution,? extends Promise<T>> func)
Creates an exec harness,
executes the given function with it before closing it, then returning execution result. |