Class CPMExecutorService
java.lang.Object
java.util.concurrent.AbstractExecutorService
java.util.concurrent.ThreadPoolExecutor
org.apache.uima.collection.impl.cpm.engine.CPMExecutorService
- All Implemented Interfaces:
Executor,ExecutorService
This component catches uncaught errors in the CPM. All critical threads in the CPM are part of
this executor service. If OutOfMemory Error is thrown this component is notified by the JVM and
its job is to notify registered listeners.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidafterExecute(Runnable aThread, Throwable aThrowable) voidcleanup()Cleanup.protected <T> RunnableFuture<T>newTaskFor(Runnable aRunnable, T aValue) protected <T> RunnableFuture<T>newTaskFor(Callable<T> aCallable) voidsetListeners(List<BaseStatusCallbackListener> aListenerList) Sets listeners to be used in notifications.voidsetProcessTrace(ProcessTrace aProcessTrace) Sets the process trace.Methods inherited from class java.util.concurrent.ThreadPoolExecutor
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, toString
-
Constructor Details
-
CPMExecutorService
public CPMExecutorService()
-
-
Method Details
-
setListeners
Sets listeners to be used in notifications.- Parameters:
aListenerList- list of registered listeners
-
setProcessTrace
Sets the process trace.- Parameters:
aProcessTrace- the new process trace
-
afterExecute
- Overrides:
afterExecutein classThreadPoolExecutor
-
cleanup
public void cleanup()Cleanup. -
newTaskFor
- Overrides:
newTaskForin classAbstractExecutorService
-
newTaskFor
- Overrides:
newTaskForin classAbstractExecutorService
-