Package io.trino.util
Class Executors
java.lang.Object
io.trino.util.Executors
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.common.util.concurrent.ListeningExecutorServicedecorateWithVersion(com.google.common.util.concurrent.ListeningExecutorService executorService, VersionEmbedder versionEmbedder) static com.google.common.util.concurrent.ListeningExecutorServicedecorateWithVersion(ExecutorService executorService, VersionEmbedder versionEmbedder) static <T> voidexecuteUntilFailure(Executor executor, Collection<Callable<T>> tasks) Run all tasks on executor returning as soon as all complete or any task fails.
-
Method Details
-
executeUntilFailure
Run all tasks on executor returning as soon as all complete or any task fails. Upon task execution failure, other tasks are cancelled and interrupted, but not waited for. -
decorateWithVersion
public static com.google.common.util.concurrent.ListeningExecutorService decorateWithVersion(ExecutorService executorService, VersionEmbedder versionEmbedder) -
decorateWithVersion
public static com.google.common.util.concurrent.ListeningExecutorService decorateWithVersion(com.google.common.util.concurrent.ListeningExecutorService executorService, VersionEmbedder versionEmbedder)
-