Class ExecutorsHelper

java.lang.Object
velox.api.layer1.common.helper.ExecutorsHelper

public class ExecutorsHelper
extends java.lang.Object
  • Constructor Summary

    Constructors 
    Constructor Description
    ExecutorsHelper()  
  • Method Summary

    Modifier and Type Method Description
    static velox.api.layer1.common.helper.PriorityThreadPoolExecutor newOnDemandPriorityThreadPoolExecutor​(java.lang.String name)  
    static java.util.concurrent.ThreadPoolExecutor newOnDemandSingleThreadExecutor​(java.lang.String name)
    Similar to Executors.newSingleThreadExecutor(), but limits threads lifetime and sets a name
    static java.util.concurrent.ScheduledExecutorService newScheduledThreadPool​(int corePoolSize, java.lang.String name)  
    static java.util.concurrent.ThreadPoolExecutor newSingleThreadExecutor​(java.lang.String name)
    Similar to Executors.newSingleThreadExecutor(), but sets a name and isn't wrapped in FinalizableDelegatedExecutorService
    static java.util.concurrent.ThreadPoolExecutor newSingleThreadExecutor​(java.lang.String name, java.util.function.Consumer<java.lang.Boolean> queueEmptyCallback)
    Similar to Executors.newSingleThreadExecutor(), but sets a name and isn't wrapped in FinalizableDelegatedExecutorService
    static java.util.concurrent.ThreadPoolExecutor newThreadPoolExecutor​(int corePoolSize, int maximumPoolSize, java.lang.String name)  
    static java.util.concurrent.ThreadPoolExecutor newThreadPoolExecutor​(int corePoolSize, int maximumPoolSize, java.lang.String name, java.util.concurrent.BlockingQueue<java.lang.Runnable> queue)  
    static java.util.concurrent.ThreadPoolExecutor newThreadPoolExecutor​(int corePoolSize, int maximumPoolSize, java.lang.String name, java.util.function.Consumer<java.lang.Boolean> queueEmptyCallback)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • newOnDemandSingleThreadExecutor

      public static java.util.concurrent.ThreadPoolExecutor newOnDemandSingleThreadExecutor​(java.lang.String name)
      Similar to Executors.newSingleThreadExecutor(), but limits threads lifetime and sets a name
    • newSingleThreadExecutor

      public static java.util.concurrent.ThreadPoolExecutor newSingleThreadExecutor​(java.lang.String name)
      Similar to Executors.newSingleThreadExecutor(), but sets a name and isn't wrapped in FinalizableDelegatedExecutorService
    • newSingleThreadExecutor

      public static java.util.concurrent.ThreadPoolExecutor newSingleThreadExecutor​(java.lang.String name, java.util.function.Consumer<java.lang.Boolean> queueEmptyCallback)
      Similar to Executors.newSingleThreadExecutor(), but sets a name and isn't wrapped in FinalizableDelegatedExecutorService
    • newThreadPoolExecutor

      public static java.util.concurrent.ThreadPoolExecutor newThreadPoolExecutor​(int corePoolSize, int maximumPoolSize, java.lang.String name, java.util.function.Consumer<java.lang.Boolean> queueEmptyCallback)
    • newThreadPoolExecutor

      public static java.util.concurrent.ThreadPoolExecutor newThreadPoolExecutor​(int corePoolSize, int maximumPoolSize, java.lang.String name)
    • newThreadPoolExecutor

      public static java.util.concurrent.ThreadPoolExecutor newThreadPoolExecutor​(int corePoolSize, int maximumPoolSize, java.lang.String name, java.util.concurrent.BlockingQueue<java.lang.Runnable> queue)
    • newScheduledThreadPool

      public static java.util.concurrent.ScheduledExecutorService newScheduledThreadPool​(int corePoolSize, java.lang.String name)
    • newOnDemandPriorityThreadPoolExecutor

      public static velox.api.layer1.common.helper.PriorityThreadPoolExecutor newOnDemandPriorityThreadPoolExecutor​(java.lang.String name)