Package org.geotools.process
Interface ProcessExecutor
-
- All Superinterfaces:
Executor
,ExecutorService
- All Known Implementing Classes:
ThreadPoolProcessExecutor
public interface ProcessExecutor extends ExecutorService
AnExecutor
that provides methods to manage termination and methods that can produce aProgress
for tracking one or more asynchronous tasks.Method submit extends base method
ExecutorService.submit(java.util.concurrent.Callable<T>)
by creating and returning aProgress
that can be used to track how a process is doing in addition to cancelling execution and/or waiting for completion.- Author:
- Jody
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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.-
Methods inherited from interface ExecutorService
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNow, submit, submit, submit
-
-
-
-
Method Detail
-
submit
Progress submit(Process task, Map<String,Object> input)
Submits a process for execution and returns a Progress representing the pending results of the task.If 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
toProcess
form so they can be submitted.- Parameters:
task
- the task to submit- Returns:
- a Progress representing pending completion of the task
- Throws:
RejectedExecutionException
- if task cannot be scheduled for executionNullPointerException
- if task null
-
-