|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.wimpi.telnetd.util.ReentrantLock
public class ReentrantLock
| Field Summary | |
|---|---|
protected long |
m_Holds
|
protected java.lang.Thread |
m_Owner
|
| Constructor Summary | |
|---|---|
ReentrantLock()
|
|
| Method Summary | |
|---|---|
void |
acquire()
|
boolean |
attempt(long msecs)
|
long |
holds()
Return the number of unreleased acquires performed by the current thread. |
void |
release()
Release the lock. |
void |
release(long n)
Release the lock N times. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.Thread m_Owner
protected long m_Holds
| Constructor Detail |
|---|
public ReentrantLock()
| Method Detail |
|---|
public void acquire()
throws java.lang.InterruptedException
java.lang.InterruptedException
public boolean attempt(long msecs)
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void release()
java.lang.Error - thrown if not current owner of lockpublic void release(long n)
release(n) is
equivalent in effect to:
for (int i = 0; i < n; ++i) release();
java.lang.Error - thrown if not current owner of lock
or has fewer than N holds on the lockpublic long holds()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||