ThreadPoolExecutor
線程池滿拒絕執行策略,默認abortpolicy,不執行並拋出異常
AbortPolicy默認拒絕策略implements RejectExecutionHandler
實現rejectExecution(){//拋出異常throw new RejectExecutionException("task"..runnable reject from executor)}
blockingqueue-->在ThreaPoolExecutor中使用
retrantlock鎖在jdk LinkedBlockingQueue內大量使用場景
LinkedBlockingQueue中存取操作隊列元素數據大量使用retrantlock鎖,控制線程安全,AtomicInteger原子類
當put和take存取node元素,put隊列滿或get隊列空,condition await阻塞等待