Class BoundedExecutorService

  • All Implemented Interfaces:
    java.util.concurrent.Executor, java.util.concurrent.ExecutorService

    public final class BoundedExecutorService
    extends java.util.concurrent.AbstractExecutorService
    • Constructor Summary

      Constructors 
      Constructor Description
      BoundedExecutorService​(java.util.concurrent.ExecutorService inner, int blockBound)  
      BoundedExecutorService​(java.util.concurrent.ExecutorService inner, int blockBound, int restartBeneath)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean awaitTermination​(long timeout, java.util.concurrent.TimeUnit unit)  
      void execute​(java.lang.Runnable runnable)  
      com.mchange.v3.concurrent.BoundedExecutorService.State getState()  
      boolean isShutdown()  
      boolean isTerminated()  
      protected <V> java.util.concurrent.RunnableFuture<V> newTaskFor​(java.lang.Runnable runnable, V result)  
      protected <V> java.util.concurrent.RunnableFuture<V> newTaskFor​(java.util.concurrent.Callable<V> callable)  
      void shutdown()  
      java.util.List<java.lang.Runnable> shutdownNow()  
      • Methods inherited from class java.util.concurrent.AbstractExecutorService

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

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

      • BoundedExecutorService

        public BoundedExecutorService​(java.util.concurrent.ExecutorService inner,
                                      int blockBound,
                                      int restartBeneath)
      • BoundedExecutorService

        public BoundedExecutorService​(java.util.concurrent.ExecutorService inner,
                                      int blockBound)
    • Method Detail

      • getState

        public com.mchange.v3.concurrent.BoundedExecutorService.State getState()
      • isShutdown

        public boolean isShutdown()
      • isTerminated

        public boolean isTerminated()
      • shutdown

        public void shutdown()
      • shutdownNow

        public java.util.List<java.lang.Runnable> shutdownNow()
      • awaitTermination

        public boolean awaitTermination​(long timeout,
                                        java.util.concurrent.TimeUnit unit)
                                 throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException
      • execute

        public void execute​(java.lang.Runnable runnable)
      • newTaskFor

        protected <V> java.util.concurrent.RunnableFuture<V> newTaskFor​(java.util.concurrent.Callable<V> callable)
        Overrides:
        newTaskFor in class java.util.concurrent.AbstractExecutorService
      • newTaskFor

        protected <V> java.util.concurrent.RunnableFuture<V> newTaskFor​(java.lang.Runnable runnable,
                                                                        V result)
        Overrides:
        newTaskFor in class java.util.concurrent.AbstractExecutorService