TrueZIP 6.8.2

de.schlichtherle.io
Class ReentrantReadWriteLock.AbstractLock

java.lang.Object
  extended by java.lang.ThreadLocal
      extended by de.schlichtherle.util.ThreadLocalCounter
          extended by 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


Constructor Summary
private ReentrantReadWriteLock.AbstractLock()
           
 
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 de.schlichtherle.util.ThreadLocalCounter
decrement, getCounter, increment, initialValue, setCounter
 
Methods inherited from class java.lang.ThreadLocal
get, remove, set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.schlichtherle.io.ReentrantLock
lockInterruptibly, tryLock
 

Constructor Detail

ReentrantReadWriteLock.AbstractLock

private ReentrantReadWriteLock.AbstractLock()
Method Detail

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

TrueZIP 6.8.2

Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.