Class ContextAwarePoolExecutor

java.lang.Object
org.springframework.util.CustomizableThreadCreator
org.springframework.scheduling.concurrent.CustomizableThreadFactory
org.springframework.scheduling.concurrent.ExecutorConfigurationSupport
org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor
com.almis.awe.executor.ContextAwarePoolExecutor
All Implemented Interfaces:
Serializable, Executor, ThreadFactory, EventListener, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener<org.springframework.context.event.ContextClosedEvent>, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle, org.springframework.core.task.AsyncListenableTaskExecutor, org.springframework.core.task.AsyncTaskExecutor, org.springframework.core.task.TaskExecutor, org.springframework.scheduling.SchedulingTaskExecutor

public class ContextAwarePoolExecutor extends org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor
Created by pgarcia on 07/04/2017.
See Also:
  • Field Summary

    Fields inherited from class org.springframework.scheduling.concurrent.ExecutorConfigurationSupport

    logger

    Fields inherited from interface org.springframework.core.task.AsyncTaskExecutor

    TIMEOUT_IMMEDIATE, TIMEOUT_INDEFINITE

    Fields inherited from interface org.springframework.context.SmartLifecycle

    DEFAULT_PHASE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> Future<T>
    submit(Callable<T> task)
     
    <T> org.springframework.util.concurrent.ListenableFuture<T>
     

    Methods inherited from class org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor

    cancelRemainingTask, createQueue, execute, getActiveCount, getCorePoolSize, getKeepAliveSeconds, getMaxPoolSize, getPoolSize, getQueueCapacity, getQueueSize, getThreadPoolExecutor, initializeExecutor, initiateEarlyShutdown, setAllowCoreThreadTimeOut, setCorePoolSize, setKeepAliveSeconds, setMaxPoolSize, setPrestartAllCoreThreads, setQueueCapacity, setStrictEarlyShutdown, setTaskDecorator, submit, submitListenable

    Methods inherited from class org.springframework.scheduling.concurrent.ExecutorConfigurationSupport

    afterExecute, afterPropertiesSet, beforeExecute, destroy, getPhase, initialize, initiateShutdown, isRunning, onApplicationEvent, setAcceptTasksAfterContextClose, setApplicationContext, setAwaitTerminationMillis, setAwaitTerminationSeconds, setBeanName, setPhase, setRejectedExecutionHandler, setThreadFactory, setThreadNamePrefix, setWaitForTasksToCompleteOnShutdown, shutdown, start, stop, stop

    Methods inherited from class org.springframework.scheduling.concurrent.CustomizableThreadFactory

    newThread

    Methods inherited from class org.springframework.util.CustomizableThreadCreator

    createThread, getDefaultThreadNamePrefix, getThreadGroup, getThreadNamePrefix, getThreadPriority, isDaemon, nextThreadName, setDaemon, setThreadGroup, setThreadGroupName, setThreadPriority

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface org.springframework.context.ApplicationListener

    supportsAsyncExecution

    Methods inherited from interface org.springframework.core.task.AsyncTaskExecutor

    execute, submitCompletable, submitCompletable

    Methods inherited from interface org.springframework.scheduling.SchedulingTaskExecutor

    prefersShortLivedTasks

    Methods inherited from interface org.springframework.context.SmartLifecycle

    isAutoStartup
  • Constructor Details

    • ContextAwarePoolExecutor

      public ContextAwarePoolExecutor()
  • Method Details

    • submit

      public <T> Future<T> submit(Callable<T> task)
      Specified by:
      submit in interface org.springframework.core.task.AsyncTaskExecutor
      Overrides:
      submit in class org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor
    • submitListenable

      public <T> org.springframework.util.concurrent.ListenableFuture<T> submitListenable(Callable<T> task)
      Specified by:
      submitListenable in interface org.springframework.core.task.AsyncListenableTaskExecutor
      Overrides:
      submitListenable in class org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor