public class ThreadPoolProcessExecutor extends ThreadPoolExecutor implements ProcessExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy| Constructor and Description |
|---|
ThreadPoolProcessExecutor(int nThreads,
ThreadFactory threadFactory) |
| Modifier and Type | Method and Description |
|---|---|
Progress |
submit(Process task,
Map<String,Object> input)
Submits a process for execution and returns a Progress representing the pending results of
the task.
|
afterExecute, allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, beforeExecute, execute, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getQueue, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, shutdown, shutdownNow, terminated, toStringinvokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submitclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitawaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNow, submit, submit, submitpublic ThreadPoolProcessExecutor(int nThreads,
ThreadFactory threadFactory)
public Progress submit(Process task, Map<String,Object> input)
ProcessExecutorIf you would like to immediately block waiting for a task, you can use constructions of the form result = exec.submit(aProcess).get();
Note: The Processors class includes a set of methods that can convert some other
common closure-like objects, for example, Callable to Process form so they
can be submitted.
submit in interface ProcessExecutortask - the task to submitCopyright © 1996–2019 Geotools. All rights reserved.