Save This Page
Home » xmlbeans-2.4.0-src » org.apache.xmlbeans.impl.common » [javadoc | source]
org.apache.xmlbeans.impl.common
public class: Mutex [javadoc | source]
java.lang.Object
   org.apache.xmlbeans.impl.common.Mutex
Method from org.apache.xmlbeans.impl.common.Mutex Summary:
acquire,   release,   tryToAcquire
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.xmlbeans.impl.common.Mutex Detail:
 public synchronized  void acquire() throws InterruptedException 
    Acquire the mutex. The mutex can be acquired multiple times by the same thread, provided that it is released as many times as it is acquired. The calling thread blocks until it has acquired the mutex. (There is no timeout).
 public synchronized  void release() 
    Release the mutex. The mutex has to be released as many times as it was acquired to actually unlock the resource. The mutex must be released by the thread that acquired it
 public synchronized boolean tryToAcquire() 
    Attempts to acquire the mutex. Returns false (and does not block) if it can't get it.