56 |
|
public Collection<Thread> getQueuedThreads() { |
57 |
|
return super.getQueuedThreads(); |
58 |
|
} |
59 |
< |
public WriterConditionObject newCondition() { |
59 |
> |
public PublicCondition newCondition() { |
60 |
|
return new PublicCondition(this); |
61 |
|
} |
62 |
|
|
63 |
< |
static class PublicCondition extends ReentrantReadWriteLock.WriterConditionObject { |
63 |
> |
static class PublicCondition extends AbstractReentrantLock.ConditionObject { |
64 |
|
PublicCondition(PublicReentrantReadWriteLock l) { super(l); } |
65 |
|
public Collection<Thread> getWaitingThreads() { |
66 |
|
return super.getWaitingThreads(); |
920 |
|
*/ |
921 |
|
public void testHasWaiters() { |
922 |
|
final ReentrantReadWriteLock lock = new ReentrantReadWriteLock(); |
923 |
< |
final ReentrantReadWriteLock.WriterConditionObject c = (ReentrantReadWriteLock.WriterConditionObject)(lock.writeLock().newCondition()); |
923 |
> |
final AbstractReentrantLock.ConditionObject c = (AbstractReentrantLock.ConditionObject)(lock.writeLock().newCondition()); |
924 |
|
Thread t = new Thread(new Runnable() { |
925 |
|
public void run() { |
926 |
|
try { |
962 |
|
*/ |
963 |
|
public void testGetWaitQueueLength() { |
964 |
|
final ReentrantReadWriteLock lock = new ReentrantReadWriteLock(); |
965 |
< |
final ReentrantReadWriteLock.WriterConditionObject c = (ReentrantReadWriteLock.WriterConditionObject)(lock.writeLock().newCondition()); |
965 |
> |
final AbstractReentrantLock.ConditionObject c = (AbstractReentrantLock.ConditionObject)(lock.writeLock().newCondition()); |
966 |
|
Thread t1 = new Thread(new Runnable() { |
967 |
|
public void run() { |
968 |
|
try { |