|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.plumtree.openfoundation.util.XPLock
public class XPLock
Example of usage: XPLock lock = new XPLock(); try { lock.Acquire(); // your processing here } finally { lock.Release(); } Relies on internal class XPMutex, stolen from Doug Lea's concurrent library.
Constructor Summary | |
---|---|
XPLock()
|
Method Summary | |
---|---|
void |
Acquire()
Attempts to acquire the lock (possibly forever). |
void |
Attempt(long msecs)
Attempts to acquire the lock for approximately msecs milliseconds. |
void |
Release()
Releases the Mutex aquired by XPLock. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XPLock()
Method Detail |
---|
public void Acquire()
public void Attempt(long msecs)
msecs
- Attempt time in milli seconds.public void Release()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |