Class ScheduledPinnedThreadPoolExecutor

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, java.util.concurrent.Executor, java.util.concurrent.ExecutorService, java.util.concurrent.ScheduledExecutorService

    public final class ScheduledPinnedThreadPoolExecutor
    extends java.util.concurrent.ScheduledThreadPoolExecutor
    implements java.io.Closeable
    • Nested Class Summary

      • 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 Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      static java.util.concurrent.ScheduledExecutorService newScheduledPinnedThreadPool​(int size, PinnedThreadFactory factory)
      Static factory methods for affinity aware fixed-size ScheduledExecutorService inception.
      static java.util.concurrent.ScheduledExecutorService newSinglePinnedThreadScheduledExecutor​(PinnedThreadFactory factory)
      Static factory methods for affinity aware single-thread ScheduledExecutorService inception.
      • Methods inherited from class java.util.concurrent.ScheduledThreadPoolExecutor

        decorateTask, decorateTask, execute, getContinueExistingPeriodicTasksAfterShutdownPolicy, getExecuteExistingDelayedTasksAfterShutdownPolicy, getQueue, getRemoveOnCancelPolicy, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, setContinueExistingPeriodicTasksAfterShutdownPolicy, setExecuteExistingDelayedTasksAfterShutdownPolicy, setRemoveOnCancelPolicy, shutdown, shutdownNow, submit, submit, submit
      • Methods inherited from class java.util.concurrent.ThreadPoolExecutor

        afterExecute, allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, beforeExecute, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, terminated, toString
      • Methods inherited from class java.util.concurrent.AbstractExecutorService

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

        clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.concurrent.ExecutorService

        awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated
    • Constructor Detail

      • ScheduledPinnedThreadPoolExecutor

        public ScheduledPinnedThreadPoolExecutor​(int size,
                                                 @Nonnull
                                                 PinnedThreadFactory factory)
        Creates a new ScheduledPinnedThreadPoolExecutor with the given initial parameters.
        Parameters:
        size - the number of PinnedThread instances to keep in the pool
        factory - the factory to use when the executor creates a new thread
    • Method Detail

      • newSinglePinnedThreadScheduledExecutor

        public static java.util.concurrent.ScheduledExecutorService newSinglePinnedThreadScheduledExecutor​(@Nonnull
                                                                                                           PinnedThreadFactory factory)
        Static factory methods for affinity aware single-thread ScheduledExecutorService inception.
        Parameters:
        factory - the PinnedThreadFactory used create affinity aware PinnedThread instances
        Returns:
        the affinity aware ScheduledExecutorService
      • newScheduledPinnedThreadPool

        public static java.util.concurrent.ScheduledExecutorService newScheduledPinnedThreadPool​(int size,
                                                                                                 @Nonnull
                                                                                                 PinnedThreadFactory factory)
        Static factory methods for affinity aware fixed-size ScheduledExecutorService inception.
        Parameters:
        size - number of PinnedThread instances to maintain in the pool
        factory - the PinnedThreadFactory used create affinity aware PinnedThread instances
        Returns:
        the affinity aware ScheduledExecutorService
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable