Concurrent-Locks详解

2017-08-16  本文已影响0人  MangoDai

Locks

Class Description
AbstractOwnableSynchronizer A synchronizer that may be exclusively owned by a thread.
AbstractQueuedLongSynchronizer A version of AbstractQueuedSynchronizer in which synchronization state is maintained as a long.
AbstractQueuedSynchronizer Provides a framework for implementing blocking locks and related synchronizers (semaphores, events, etc) that rely on first-in-first-out (FIFO) wait queues.
LockSupport Basic thread blocking primitives for creating locks and other synchronization classes.
ReentrantLock A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor lock accessed using synchronized methods and statements, but with extended capabilities.
ReentrantReadWriteLock An implementation of ReadWriteLock supporting similar semantics to ReentrantLock.
ReentrantReadWriteLock.ReadLock The lock returned by method ReentrantReadWriteLock.readLock().
ReentrantReadWriteLock.WriteLock The lock returned by method ReentrantReadWriteLock.writeLock().
StampedLock A capability-based lock with three modes for controlling read/write access.

Jdk1.5版本以后,Java提供了一个新的锁的同步和监事工具,
使用了java.util.concurrent.locks
Interfaces and classes providing a framework for locking and waiting for conditions that is distinct from built-in synchronization and monitors.
类概述

Class Description
AbstractOwnableSynchronizer A synchronizer that may be exclusively owned by a thread.
AbstractQueuedLongSynchronizer A version of AbstractQueuedSynchronizer in which synchronization state is maintained as a long.
AbstractQueuedSynchronizer Provides a framework for implementing blocking locks and related synchronizers (semaphores, events, etc) that rely on first-in-first-out (FIFO) wait queues.
LockSupport Basic thread blocking primitives for creating locks and other synchronization classes.
ReentrantLock A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor lock accessed using synchronized methods and statements, but with extended capabilities.
ReentrantReadWriteLock An implementation of ReadWriteLock supporting similar semantics to ReentrantLock.
ReentrantReadWriteLock.ReadLock The lock returned by method ReentrantReadWriteLock.readLock().
ReentrantReadWriteLock.WriteLock The lock returned by method ReentrantReadWriteLock.writeLock().
StampedLock A capability-based lock with three modes for controlling read/write access.

描述

上一篇 下一篇

猜你喜欢

热点阅读