java并发工具
JUC常用类
流程控制
Lock (lock 、unLock)
ReentrantLock (lock、unLock)
Semaphore (acquire、release)
CountDownLatch (countDown、await)
CyclicBarrier (await)
Condition (await、signal、signalAll) Object(wait、notify、notifyAll)
数据结构:
ArrayBlockingQueue (offer、take)
LinkedBlockingQueue (offer、take)
LinkedBlockDeque (offer、take、poll)
priorityQueue (offer、poll)
DelayQueue (offer、poll、take)
CopyOnWriteArrayList
CopyOnWriteSet
执行类:
ExecutorService (submit、shutdown、shutdownNow)
Executors (newFixedThreadPool、newSingleThreadExecutor、newCachedThreadPool、newScheduledThreadPool、newWorkStealingPool、ThreadPoolExecutor(int corePoolSize,int maximumPoolSize,long keepAliveTime,TimeUnit unit,BlockingQueue<Runnable> workQueue))
Runnable
RunnableFuture
Future
FutureTask
Callable