Class ExternalProcessExecutor
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.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classInter-Process Communication(package private) static final class(package private) static final classprivate static final classprivate static final classRing buffer OutputStream that retains only the last N bytes written.private static final classA per-thread, persistent channel to a child JVM. -
Field Summary
Fields -
Constructor Summary
Constructors -
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)
-
Field Details
-
myExecutorService
-
-
Constructor Details
-
ExternalProcessExecutor
ExternalProcessExecutor(ExecutorService executor)
-
-
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
-