Class SynchronyScheduledExecutorServiceProvider

  • All Implemented Interfaces:
    org.springframework.beans.factory.DisposableBean

    @Component
    public class SynchronyScheduledExecutorServiceProvider
    extends Object
    implements org.springframework.beans.factory.DisposableBean
    • Constructor Detail

      • SynchronyScheduledExecutorServiceProvider

        public SynchronyScheduledExecutorServiceProvider()
    • Method Detail

      • getExecutorService

        public ScheduledExecutorService getExecutorService()
        Returns scheduled executor service. NOTE: This executor shouldn't be used in cases when you expect to have many threads running simultaneously or when locking is used. ScheduledThreadPoolExecutor ignores maximumPoolSize value and never creates new threads if corePoolSize is reached and all threads are busy. It should only be used in cases when you need to schedule task with some delay or some repeatable task. Use SynchronyExecutorServiceProvider.getExecutorService() for all other cases. See https://jira.atlassian.com/browse/CONFSRVDEV-21049 for more details.
        Returns:
        Scheduled executor service
      • destroy

        public void destroy()
                     throws Exception
        Specified by:
        destroy in interface org.springframework.beans.factory.DisposableBean
        Throws:
        Exception