public class StripedCompositeReadWriteLock extends Object implements ReadWriteLock
ReentrantReadWriteLock it has slightly improved performance of ReadWriteLock.readLock()
operations at the cost of ReadWriteLock.writeLock() operations and memory consumption.
It also supports reentrancy semantics like ReentrantReadWriteLock.| Constructor and Description |
|---|
StripedCompositeReadWriteLock(int concurrencyLvl)
Creates a new instance with given concurrency level.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isWriteLockedByCurrentThread()
Queries if the write lock is held by the current thread.
|
Lock |
readLock() |
Lock |
writeLock() |
public StripedCompositeReadWriteLock(int concurrencyLvl)
concurrencyLvl - Number of internal read locks.@NotNull public Lock readLock()
readLock in interface ReadWriteLock@NotNull public Lock writeLock()
writeLock in interface ReadWriteLockpublic boolean isWriteLockedByCurrentThread()
true if the current thread holds the write lock and
false otherwise
Follow @ApacheIgnite
Ignite Fabric : ver. 1.6.0 Release Date : May 18 2016