public class SemaphoreReadWriteLock extends Object implements ReadWriteLock
ReadWriteLock implementation that uses a semaphore.
A read lock requires 1 permit, while a write lock requires all the permits.
Lock upgrading and downgrading is not supported; nor are conditions.| Constructor and Description |
|---|
SemaphoreReadWriteLock(Semaphore semaphore) |
public SemaphoreReadWriteLock(Semaphore semaphore)
public Lock readLock()
readLock in interface ReadWriteLockReadWriteLock.readLock()public Lock writeLock()
writeLock in interface ReadWriteLockReadWriteLock.writeLock()Copyright © 2004–2014 Paul Ferraro. All rights reserved.