Package com.helix.core.executor
Class AsyncExecutor
java.lang.Object
com.helix.core.executor.AsyncExecutor
- All Implemented Interfaces:
AutoCloseable
Asynchronous rule executor using
CompletableFuture backed by a configurable ThreadPoolExecutor.-
Constructor Summary
ConstructorsConstructorDescriptionAsyncExecutor(ExecutorConfiguration config) AsyncExecutor(SyncExecutor syncExecutor, ExecutorService executorService) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()executeAsync(CompiledRule compiledRule, ExecutionContext context) executeAsync(CompiledRule compiledRule, ExecutionContext context, long timeout, TimeUnit unit)
-
Constructor Details
-
AsyncExecutor
public AsyncExecutor() -
AsyncExecutor
-
AsyncExecutor
-
-
Method Details
-
executeAsync
public CompletableFuture<ExecutionResult> executeAsync(CompiledRule compiledRule, ExecutionContext context) -
executeAsync
public CompletableFuture<ExecutionResult> executeAsync(CompiledRule compiledRule, ExecutionContext context, long timeout, TimeUnit unit) -
getMetrics
-
getExecutorService
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-