java.lang.Object
org.ojalgo.concurrent.ExternalProcessExecutor
Execute submitted tasks/methods in external JVM processes with arbitrary
Serializable
arguments/return. Provides hard cancellation/timeout via process kill. Each executor thread owns a
persistent child process kept alive across tasks until the owner thread is interrupted or the process is
killed due to failure/timeout. This enables reusing JVM warm state for a sequence of tasks.-
Method Summary
Modifier and TypeMethodDescription<T,C extends Callable<T> & Serializable>
Future<T> call(C callable) <T,C extends Callable<T> & Serializable>
Future<T> call(C callable, ProcessOptions options) <T> Future<T> <T> Future<T> execute(Class<?> owner, String name, Class<?>[] parameters, ProcessOptions options, Object... arguments) <T> Future<T> <T> Future<T> execute(Method method, ProcessOptions options, Object... arguments) <T> Future<T> execute(MethodDescriptor method, Object... arguments) <T> Future<T> execute(MethodDescriptor method, ProcessOptions options, Object... arguments) static ExternalProcessExecutorstatic ExternalProcessExecutornewInstance(int nThreads) Create an executor backed by a fixed-size pool.<R extends Runnable & Serializable>
Future<Void> run(R runnable) <R extends Runnable & Serializable>
Future<Void> run(R runnable, ProcessOptions options)
-
Method Details
-
newInstance
-
newInstance
Create an executor backed by a fixed-size pool. The pool size effectively caps the number of persistent worker processes running concurrently. -
call
-
call
-
execute
-
execute
-
execute
-
execute
-
execute
-
execute
-
run
-
run
-