de.schlichtherle.io
Class ReentrantReadWriteLock.AbstractLock
java.lang.Object
java.lang.ThreadLocal
de.schlichtherle.util.ThreadLocalCounter
de.schlichtherle.io.ReentrantReadWriteLock.AbstractLock
- All Implemented Interfaces:
- ReentrantLock
- Direct Known Subclasses:
- ReentrantReadWriteLock.ReadLock, ReentrantReadWriteLock.WriteLock
- Enclosing class:
- ReentrantReadWriteLock
private abstract static class ReentrantReadWriteLock.AbstractLock
- extends ThreadLocalCounter
- implements ReentrantLock
|
Method Summary |
boolean |
isLocked()
Returns true if and only if the current thread has
acquired this lock. |
void |
lock()
Acquires this lock by the current thread, eventually blocking. |
int |
lockCount()
Returns the number of times the current thread has successfully
acquired this lock. |
void |
unlock()
Releases this lock. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReentrantReadWriteLock.AbstractLock
private ReentrantReadWriteLock.AbstractLock()
isLocked
public final boolean isLocked()
- Description copied from interface:
ReentrantLock
- Returns
true if and only if the current thread has
acquired this lock.
- Specified by:
isLocked in interface ReentrantLock
lockCount
public final int lockCount()
- Description copied from interface:
ReentrantLock
- Returns the number of times the current thread has successfully
acquired this lock.
- Specified by:
lockCount in interface ReentrantLock
lock
public void lock()
- Description copied from interface:
ReentrantLock
- Acquires this lock by the current thread, eventually blocking.
- Specified by:
lock in interface ReentrantLock
unlock
public void unlock()
- Description copied from interface:
ReentrantLock
- Releases this lock.
- Specified by:
unlock in interface ReentrantLock
Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.