use of com.linkedin.parseq.promise.PromiseResolvedException in project rest.li by linkedin.
the class TestAsyncMethodInvocationPlanClass method engine.
private Engine engine(SettablePromise<Trace> traceHolder) {
ExecutorService taskScheduler = Executors.newFixedThreadPool(1);
ScheduledExecutorService timerScheduler = Executors.newSingleThreadScheduledExecutor();
return new EngineBuilder().setTaskExecutor(taskScheduler).setTimerScheduler(timerScheduler).setPlanCompletionListener(planCtx -> {
try {
traceHolder.done(planCtx.getRootTask().getTrace());
} catch (PromiseResolvedException e) {
}
}).build();
}
Aggregations