/** * Converts the execution context to an executor, preparing it first. * @param ec the execution context. * @return the Java Executor. */ private static Executor toExecutor(ExecutionContext ec) { ExecutionContext prepared = ec.prepare(); if (prepared instanceof Executor) { return (Executor) prepared; } else { return prepared::execute; } }
/** * Converts the execution context to an executor, preparing it first. * @param ec the execution context. * @return the Java Executor. */ private static Executor toExecutor(ExecutionContext ec) { ExecutionContext prepared = ec.prepare(); if (prepared instanceof Executor) { return (Executor) prepared; } else { return prepared::execute; } }
@Override public ExecutionContext prepare() { return executionContext.prepare(); }
@Override public ExecutionContext prepare() { return executionContext.prepare(); }
/** * Converts the execution context to an executor, preparing it first. * @param ec the execution context. * @return the Java Executor. */ private static Executor toExecutor(ExecutionContext ec) { ExecutionContext prepared = ec.prepare(); if (prepared instanceof Executor) { return (Executor) prepared; } else { return prepared::execute; } }
@Override public ExecutionContext prepare() { return executionContext.prepare(); }
public static Executor toExecutor(ExecutionContext ec) { ExecutionContext prepared = ec.prepare(); if (prepared instanceof Executor) { return (Executor) prepared; } else { return prepared::execute; } }
/** * Converts the execution context to an executor, preparing it first. */ private static Executor toExecutor(ExecutionContext ec) { ExecutionContext prepared = ec.prepare(); if (prepared instanceof Executor) { return (Executor) prepared; } else { return prepared::execute; } }