org.neodatis.tool.mutex
Class Mutex
- java.lang.Object
-
- org.neodatis.tool.mutex.Mutex
-
public class Mutex extends java.lang.ObjectA Simple Mutex for lock operations
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description Mutexacquire(java.lang.String who)booleanattempt(long msecs)java.lang.StringgetName()intgetNbOwners()booleanisInUse()voidrelease(java.lang.String who)voidsetDebug(boolean debug)
-
-
-
Method Detail
-
acquire
public Mutex acquire(java.lang.String who) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
release
public void release(java.lang.String who)
-
attempt
public boolean attempt(long msecs) throws java.lang.InterruptedException- Throws:
java.lang.InterruptedException
-
getName
public java.lang.String getName()
-
setDebug
public void setDebug(boolean debug)
-
isInUse
public boolean isInUse()
-
getNbOwners
public int getNbOwners()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG