Package VASSAL.tools.concurrent
Class CountingReadWriteLock
java.lang.Object
VASSAL.tools.concurrent.CountingReadWriteLock
- All Implemented Interfaces:
ReadWriteLock
public class CountingReadWriteLock extends Object implements ReadWriteLock
A
ReadWriteLock
which counts locks held.
Locks are not associated with particular threads as with
ReentrantReadWriteLock
, so can be released from threads other
than the the ones which acquired them.- Since:
- 3.2.0
- Author:
- Joel Uckelman
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
CountingReadWriteLock.BaseLock
protected class
CountingReadWriteLock.ReadLock
protected static class
CountingReadWriteLock.Sync
protected class
CountingReadWriteLock.WriteLock
-
Field Summary
Fields Modifier and Type Field Description protected CountingReadWriteLock.ReadLock
r
protected CountingReadWriteLock.Sync
sync
protected CountingReadWriteLock.WriteLock
w
-
Constructor Summary
Constructors Constructor Description CountingReadWriteLock()
-
Method Summary
-
Field Details
-
r
-
w
-
sync
-
-
Constructor Details
-
CountingReadWriteLock
public CountingReadWriteLock()
-
-
Method Details
-
readLock
- Specified by:
readLock
in interfaceReadWriteLock
-
writeLock
- Specified by:
writeLock
in interfaceReadWriteLock
-