Class CPMExecutorService

  • All Implemented Interfaces:
    java.util.concurrent.Executor, java.util.concurrent.ExecutorService

    public class CPMExecutorService
    extends java.util.concurrent.ThreadPoolExecutor
    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 
      Modifier and Type Class Description
      private class  CPMExecutorService.CpmFutureTask<T>  
      • Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor

        java.util.concurrent.ThreadPoolExecutor.AbortPolicy, java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardPolicy
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void afterExecute​(java.lang.Runnable aThread, java.lang.Throwable aThrowable)  
      void cleanup()
      Cleanup.
      protected <T> java.util.concurrent.RunnableFuture<T> newTaskFor​(java.lang.Runnable aRunnable, T aValue)  
      protected <T> java.util.concurrent.RunnableFuture<T> newTaskFor​(java.util.concurrent.Callable<T> aCallable)  
      private void notifyListener​(BaseStatusCallbackListener aStatCL, java.lang.Throwable e)
      Notify listener.
      void setListeners​(java.util.List<BaseStatusCallbackListener> aListenerList)
      Sets listeners to be used in notifications.
      void setProcessTrace​(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
      • Methods inherited from class java.util.concurrent.AbstractExecutorService

        invokeAll, invokeAll, invokeAny, invokeAny, submit, submit, submit
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • CPMExecutorService

        public CPMExecutorService()
    • Method Detail

      • setListeners

        public void setListeners​(java.util.List<BaseStatusCallbackListener> aListenerList)
        Sets listeners to be used in notifications.
        Parameters:
        aListenerList - list of registered listeners
      • setProcessTrace

        public void setProcessTrace​(ProcessTrace aProcessTrace)
        Sets the process trace.
        Parameters:
        aProcessTrace - the new process trace
      • afterExecute

        protected void afterExecute​(java.lang.Runnable aThread,
                                    java.lang.Throwable aThrowable)
        Overrides:
        afterExecute in class java.util.concurrent.ThreadPoolExecutor
      • notifyListener

        private void notifyListener​(BaseStatusCallbackListener aStatCL,
                                    java.lang.Throwable e)
        Notify listener.
        Parameters:
        aStatCL - the a stat CL
        e - the e
      • cleanup

        public void cleanup()
        Cleanup.
      • newTaskFor

        protected <T> java.util.concurrent.RunnableFuture<T> newTaskFor​(java.util.concurrent.Callable<T> aCallable)
        Overrides:
        newTaskFor in class java.util.concurrent.AbstractExecutorService
      • newTaskFor

        protected <T> java.util.concurrent.RunnableFuture<T> newTaskFor​(java.lang.Runnable aRunnable,
                                                                        T aValue)
        Overrides:
        newTaskFor in class java.util.concurrent.AbstractExecutorService