Class PriorityThreadPoolExecutor
- java.lang.Object
-
- java.util.concurrent.AbstractExecutorService
-
- java.util.concurrent.ThreadPoolExecutor
-
- jetbrains.buildServer.util.executors.PriorityThreadPoolExecutor
-
- All Implemented Interfaces:
Executor
,ExecutorService
public class PriorityThreadPoolExecutor extends ThreadPoolExecutor
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy
-
-
Constructor Summary
Constructors Constructor Description PriorityThreadPoolExecutor(int corePoolSize, int maxPoolSize)
PriorityThreadPoolExecutor(int corePoolSize, int maxPoolSize, int keepAliveTimeMillis)
PriorityThreadPoolExecutor(int corePoolSize, int maxPoolSize, int keepAliveTimeMillis, ThreadFactory tf)
PriorityThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, PriorityBlockingQueue<Runnable> workQueue)
PriorityThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, PriorityBlockingQueue<Runnable> workQueue, ThreadFactory tf)
PriorityThreadPoolExecutor(int corePoolSize, int maxPoolSize, ThreadFactory tf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
afterExecute(Runnable r, Throwable t)
protected void
beforeExecute(Thread t, Runnable r)
<T> Stream<T>
getOriginalStream(Class<T> cls)
long
getQueueSize()
boolean
isPaused()
protected <T> RunnableFuture<T>
newTaskFor(Runnable runnable, T value)
protected <T> RunnableFuture<T>
newTaskFor(Callable<T> callable)
void
pause()
void
resume()
void
shutdown(int shutdownAwaitTimeoutSeconds, int shutdownNowAwaitTimeoutSeconds, String identifier)
void
waitFor(Supplier<Collection<Future<?>>> supplier)
-
Methods inherited from class java.util.concurrent.ThreadPoolExecutor
allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, execute, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getQueue, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, shutdown, shutdownNow, terminated, toString
-
-
-
-
Constructor Detail
-
PriorityThreadPoolExecutor
public PriorityThreadPoolExecutor(int corePoolSize, int maxPoolSize)
-
PriorityThreadPoolExecutor
public PriorityThreadPoolExecutor(int corePoolSize, int maxPoolSize, ThreadFactory tf)
-
PriorityThreadPoolExecutor
public PriorityThreadPoolExecutor(int corePoolSize, int maxPoolSize, int keepAliveTimeMillis)
-
PriorityThreadPoolExecutor
public PriorityThreadPoolExecutor(int corePoolSize, int maxPoolSize, int keepAliveTimeMillis, ThreadFactory tf)
-
PriorityThreadPoolExecutor
public PriorityThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, @NotNull TimeUnit unit, @NotNull PriorityBlockingQueue<Runnable> workQueue)
-
PriorityThreadPoolExecutor
public PriorityThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, @NotNull TimeUnit unit, @NotNull PriorityBlockingQueue<Runnable> workQueue, ThreadFactory tf)
-
-
Method Detail
-
beforeExecute
protected void beforeExecute(Thread t, Runnable r)
- Overrides:
beforeExecute
in classThreadPoolExecutor
-
afterExecute
protected void afterExecute(Runnable r, Throwable t)
- Overrides:
afterExecute
in classThreadPoolExecutor
-
newTaskFor
protected <T> RunnableFuture<T> newTaskFor(Runnable runnable, T value)
- Overrides:
newTaskFor
in classAbstractExecutorService
-
newTaskFor
protected <T> RunnableFuture<T> newTaskFor(Callable<T> callable)
- Overrides:
newTaskFor
in classAbstractExecutorService
-
pause
public void pause()
-
resume
public void resume()
-
isPaused
public boolean isPaused()
-
getQueueSize
public long getQueueSize()
-
shutdown
public void shutdown(int shutdownAwaitTimeoutSeconds, int shutdownNowAwaitTimeoutSeconds, String identifier)
-
waitFor
@TestOnly public void waitFor(Supplier<Collection<Future<?>>> supplier)
-
-