public final class AsyncFunctions extends Object
AsyncFunction.| Modifier and Type | Method and Description |
|---|---|
static <I,O> com.google.common.util.concurrent.AsyncFunction<I,O> |
asyncWrap(com.google.common.base.Function<I,O> function)
Converts a
Function into AsyncFunction by performing the operation in the same thread. |
static <I,O> com.google.common.util.concurrent.AsyncFunction<I,O> |
asyncWrap(com.google.common.base.Function<I,O> function,
Executor executor)
Converts a
Function into AsyncFunction by performing the operation in the given executor. |
public static <I,O> com.google.common.util.concurrent.AsyncFunction<I,O> asyncWrap(com.google.common.base.Function<I,O> function,
Executor executor)
Function into AsyncFunction by performing the operation in the given executor.I - Input typeO - Output typefunction - Function to applyexecutor - Executor for the function to execute inAsyncFunction that will call the function in the given executor.public static <I,O> com.google.common.util.concurrent.AsyncFunction<I,O> asyncWrap(com.google.common.base.Function<I,O> function)
Function into AsyncFunction by performing the operation in the same thread.I - Input typeO - Output typefunction - Function to applyAsyncFunction that will call the function in the same thread as the caller thread.Copyright © 2019 CDAP Licensed under the Apache License, Version 2.0.