public class BlockPolicy extends Object implements RejectedExecutionHandler
InterruptedException
异常Constructor and Description |
---|
BlockPolicy()
构造
|
BlockPolicy(Consumer<Runnable> handlerwhenshutdown)
构造
|
Modifier and Type | Method and Description |
---|---|
void |
rejectedExecution(Runnable r,
ThreadPoolExecutor e) |
public BlockPolicy(Consumer<Runnable> handlerwhenshutdown)
handlerwhenshutdown
- 线程池关闭后的执行策略public BlockPolicy()
public void rejectedExecution(Runnable r, ThreadPoolExecutor e)
rejectedExecution
in interface RejectedExecutionHandler
Copyright © 2024. All rights reserved.