Class ManagedExecutorServiceImpl

java.lang.Object
java.util.concurrent.AbstractExecutorService
org.glassfish.enterprise.concurrent.AbstractManagedExecutorService
org.glassfish.enterprise.concurrent.ManagedExecutorServiceImpl
org.jboss.as.ee.concurrent.ManagedExecutorServiceImpl
All Implemented Interfaces:
jakarta.enterprise.concurrent.ManagedExecutorService, Executor, ExecutorService, ManagedExecutorWithHungThreads

public class ManagedExecutorServiceImpl extends org.glassfish.enterprise.concurrent.ManagedExecutorServiceImpl implements ManagedExecutorWithHungThreads
Author:
Stuart Douglas, emmartins
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.glassfish.enterprise.concurrent.AbstractManagedExecutorService

    org.glassfish.enterprise.concurrent.AbstractManagedExecutorService.RejectPolicy
  • Field Summary

    Fields inherited from class org.glassfish.enterprise.concurrent.ManagedExecutorServiceImpl

    adapter, threadPoolExecutor

    Fields inherited from class org.glassfish.enterprise.concurrent.AbstractManagedExecutorService

    contextService, contextSetupProvider, contextualCallback, longRunningTasks, managedThreadFactory, name, rejectPolicy
  • Constructor Summary

    Constructors
    Constructor
    Description
    ManagedExecutorServiceImpl(String name, org.glassfish.enterprise.concurrent.ManagedThreadFactoryImpl managedThreadFactory, long hungTaskThreshold, boolean longRunningTasks, int corePoolSize, int maxPoolSize, long keepAliveTime, TimeUnit keepAliveTimeUnit, long threadLifeTime, int queueCapacity, org.glassfish.enterprise.concurrent.ContextServiceImpl contextService, org.glassfish.enterprise.concurrent.AbstractManagedExecutorService.RejectPolicy rejectPolicy, org.wildfly.extension.requestcontroller.ControlPoint controlPoint)
     
    ManagedExecutorServiceImpl(String name, org.glassfish.enterprise.concurrent.ManagedThreadFactoryImpl managedThreadFactory, long hungTaskThreshold, boolean longRunningTasks, int corePoolSize, int maxPoolSize, long keepAliveTime, TimeUnit keepAliveTimeUnit, long threadLifeTime, org.glassfish.enterprise.concurrent.ContextServiceImpl contextService, org.glassfish.enterprise.concurrent.AbstractManagedExecutorService.RejectPolicy rejectPolicy, BlockingQueue<Runnable> queue, org.wildfly.extension.requestcontroller.ControlPoint controlPoint)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    execute(Runnable command)
     
     
     
     
    <T> Future<T>
    submit(Runnable task, T result)
     
    <T> Future<T>
    submit(Callable<T> task)
     

    Methods inherited from class org.glassfish.enterprise.concurrent.ManagedExecutorServiceImpl

    getAdapter, getCompletedTaskCount, getExecutorForTaskListener, getNewTaskFor, getNewTaskFor, getTaskCount

    Methods inherited from class org.glassfish.enterprise.concurrent.AbstractManagedExecutorService

    awaitTermination, completedFuture, completedStage, copy, copy, doInvokeAny, executeManagedFutureTask, failedFuture, failedStage, getContextService, getContextSetupProvider, getHungThreads, getManagedThreadFactory, getName, getObjectName, getRejectPolicy, getThreads, invokeAll, invokeAll, invokeAny, invokeAny, isContextualCallback, isEventProvider, isLongRunningTasks, isShutdown, isStateManageable, isStatisticsProvider, isTerminated, newIncompleteFuture, newTaskFor, newTaskFor, runAsync, shutdown, shutdownNow, supplyAsync

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.jboss.as.ee.concurrent.ManagedExecutorWithHungThreads

    getHungThreads, getName, terminateHungTasks
  • Constructor Details

    • ManagedExecutorServiceImpl

      public ManagedExecutorServiceImpl(String name, org.glassfish.enterprise.concurrent.ManagedThreadFactoryImpl managedThreadFactory, long hungTaskThreshold, boolean longRunningTasks, int corePoolSize, int maxPoolSize, long keepAliveTime, TimeUnit keepAliveTimeUnit, long threadLifeTime, org.glassfish.enterprise.concurrent.ContextServiceImpl contextService, org.glassfish.enterprise.concurrent.AbstractManagedExecutorService.RejectPolicy rejectPolicy, BlockingQueue<Runnable> queue, org.wildfly.extension.requestcontroller.ControlPoint controlPoint)
    • ManagedExecutorServiceImpl

      public ManagedExecutorServiceImpl(String name, org.glassfish.enterprise.concurrent.ManagedThreadFactoryImpl managedThreadFactory, long hungTaskThreshold, boolean longRunningTasks, int corePoolSize, int maxPoolSize, long keepAliveTime, TimeUnit keepAliveTimeUnit, long threadLifeTime, int queueCapacity, org.glassfish.enterprise.concurrent.ContextServiceImpl contextService, org.glassfish.enterprise.concurrent.AbstractManagedExecutorService.RejectPolicy rejectPolicy, org.wildfly.extension.requestcontroller.ControlPoint controlPoint)
  • Method Details

    • submit

      public <T> Future<T> submit(Callable<T> task)
      Specified by:
      submit in interface ExecutorService
      Overrides:
      submit in class org.glassfish.enterprise.concurrent.AbstractManagedExecutorService
    • submit

      public <T> Future<T> submit(Runnable task, T result)
      Specified by:
      submit in interface ExecutorService
      Overrides:
      submit in class org.glassfish.enterprise.concurrent.AbstractManagedExecutorService
    • submit

      public Future<?> submit(Runnable task)
      Specified by:
      submit in interface ExecutorService
      Overrides:
      submit in class org.glassfish.enterprise.concurrent.AbstractManagedExecutorService
    • execute

      public void execute(Runnable command)
      Specified by:
      execute in interface Executor
      Overrides:
      execute in class org.glassfish.enterprise.concurrent.ManagedExecutorServiceImpl
    • getThreadPoolExecutor

      protected ThreadPoolExecutor getThreadPoolExecutor()
      Overrides:
      getThreadPoolExecutor in class org.glassfish.enterprise.concurrent.ManagedExecutorServiceImpl
    • getRuntimeStats

      public ManagedExecutorRuntimeStats getRuntimeStats()
      Returns:
      the executor's runtime stats