| Modifier and Type | Method and Description |
|---|---|
FlowFuture<Void> |
FlowFuture.acceptEither(FlowFuture<? extends T> alt,
Flows.SerConsumer<T> fn)
Run an action when the first of two futures completes successfully.
|
FlowFuture<Void> |
Flow.allOf(FlowFuture<?>... flowFutures)
Wait for all a list of tasks to complete
|
FlowFuture<Object> |
Flow.anyOf(FlowFuture<?>... flowFutures)
Wait for any of a list of tasks to complete
|
<U> FlowFuture<U> |
FlowFuture.applyToEither(FlowFuture<? extends T> alt,
Flows.SerFunction<T,U> fn)
Transform the outcome of the first of two futures to complete successfully.
|
<T> FlowFuture<T> |
Flow.completedValue(T value)
Create a completed future for a specified value.
|
<T> FlowFuture<T> |
Flow.createFlowFuture()
Create an uncompleted future
|
FlowFuture<Void> |
Flow.delay(long i,
TimeUnit tu)
Create a future that completes successfully after a specified delay
|
FlowFuture<T> |
FlowFuture.exceptionally(Flows.SerFunction<Throwable,? extends T> fn)
Handle exceptional completion of this future and convert exceptions to the original type of this future.
|
FlowFuture<T> |
FlowFuture.exceptionallyCompose(Flows.SerFunction<Throwable,FlowFuture<T>> fn)
Compose a new computation on to the completion of this future to handle errors,
|
<T> FlowFuture<T> |
Flow.failedFuture(Throwable ex)
Create a completed future that propagates a failed value
|
<X> FlowFuture<X> |
FlowFuture.handle(Flows.SerBiFunction<? super T,Throwable,? extends X> fn)
Invoke a handler when a computation is complete, regardless of whether it completed successfully or with an error -
optionally transforming the resulting value or error to a new value.
|
default FlowFuture<HttpResponse> |
Flow.invokeFunction(String functionId,
HttpMethod method)
Invoke a function by ID with no headers
|
default FlowFuture<HttpResponse> |
Flow.invokeFunction(String functionId,
HttpMethod method,
com.fnproject.fn.api.Headers headers)
Invoke a function by ID with headers and an empty body
|
FlowFuture<HttpResponse> |
Flow.invokeFunction(String functionId,
HttpMethod method,
com.fnproject.fn.api.Headers headers,
byte[] data)
Invoke a fn function and yield the result
|
<U> FlowFuture<HttpResponse> |
Flow.invokeFunction(String functionId,
HttpMethod method,
com.fnproject.fn.api.Headers headers,
U input)
Invoke a function by ID using input and output coercion and a specified method and headers
|
<T extends Serializable,U> |
Flow.invokeFunction(String functionId,
HttpMethod method,
com.fnproject.fn.api.Headers headers,
U input,
Class<T> responseType)
Invoke a function by ID using input and output coercion and a specified method and headers
|
default <U> FlowFuture<HttpResponse> |
Flow.invokeFunction(String functionId,
U input)
Invoke a function by ID using input and output coercion, default method (POST) and no response type
|
default <T extends Serializable,U> |
Flow.invokeFunction(String functionId,
U input,
Class<T> responseType)
Invoke a function by ID using input and output coercion
|
<T> FlowFuture<T> |
Flow.supply(Flows.SerCallable<T> c)
Invoke an asynchronous task that yields a value
|
FlowFuture<Void> |
Flow.supply(Flows.SerRunnable runnable)
Invoke an asynchronous task that does not yield a value
|
FlowFuture<Void> |
FlowFuture.thenAccept(Flows.SerConsumer<T> fn)
Perform an action when this future completes successfully.
|
<U> FlowFuture<Void> |
FlowFuture.thenAcceptBoth(FlowFuture<U> other,
Flows.SerBiConsumer<T,U> fn)
Perform an action when this and another future have both completed normally:
|
<X> FlowFuture<X> |
FlowFuture.thenApply(Flows.SerFunction<T,X> fn)
Applies a transformation to the successfully completed value of this future.
|
<U,X> FlowFuture<X> |
FlowFuture.thenCombine(FlowFuture<? extends U> other,
Flows.SerBiFunction<? super T,? super U,? extends X> fn)
Combine the result of this future and another future into a single value when both have completed normally:
|
<X> FlowFuture<X> |
FlowFuture.thenCompose(Flows.SerFunction<T,FlowFuture<X>> fn)
Compose a new computation on to the completion of this future
|
FlowFuture<Void> |
FlowFuture.thenRun(Flows.SerRunnable fn)
Run an action when this future has completed normally.
|
FlowFuture<T> |
FlowFuture.whenComplete(Flows.SerBiConsumer<T,Throwable> fn)
Perform an action when a computation is complete, regardless of whether it completed successfully or with an error.
|
| Modifier and Type | Method and Description |
|---|---|
FlowFuture<Void> |
FlowFuture.acceptEither(FlowFuture<? extends T> alt,
Flows.SerConsumer<T> fn)
Run an action when the first of two futures completes successfully.
|
FlowFuture<Void> |
Flow.allOf(FlowFuture<?>... flowFutures)
Wait for all a list of tasks to complete
|
FlowFuture<Object> |
Flow.anyOf(FlowFuture<?>... flowFutures)
Wait for any of a list of tasks to complete
|
<U> FlowFuture<U> |
FlowFuture.applyToEither(FlowFuture<? extends T> alt,
Flows.SerFunction<T,U> fn)
Transform the outcome of the first of two futures to complete successfully.
|
<U> FlowFuture<Void> |
FlowFuture.thenAcceptBoth(FlowFuture<U> other,
Flows.SerBiConsumer<T,U> fn)
Perform an action when this and another future have both completed normally:
|
<U,X> FlowFuture<X> |
FlowFuture.thenCombine(FlowFuture<? extends U> other,
Flows.SerBiFunction<? super T,? super U,? extends X> fn)
Combine the result of this future and another future into a single value when both have completed normally:
|
| Modifier and Type | Method and Description |
|---|---|
FlowFuture<T> |
FlowFuture.exceptionallyCompose(Flows.SerFunction<Throwable,FlowFuture<T>> fn)
Compose a new computation on to the completion of this future to handle errors,
|
<X> FlowFuture<X> |
FlowFuture.thenCompose(Flows.SerFunction<T,FlowFuture<X>> fn)
Compose a new computation on to the completion of this future
|
Copyright © 2021. All rights reserved.