public class LockUtil extends Object
Constructor and Description |
---|
LockUtil() |
Modifier and Type | Method and Description |
---|---|
static ReentrantReadWriteLock |
createReadWriteLock(boolean fair)
|
static StampedLock |
createStampLock()
创建
StampedLock 锁 |
static NoLock |
getNoLock()
获取单例的无锁对象
|
public static StampedLock createStampLock()
StampedLock
锁StampedLock
锁public static ReentrantReadWriteLock createReadWriteLock(boolean fair)
fair
- 是否公平锁ReentrantReadWriteLock
锁Copyright © 2024. All rights reserved.