Demos and Usage of java.util.concurrent.locks.ReentrantLock.isLocked()


   1: 
   2: import java.util.concurrent.locks.ReentrantLock;
   3: import com.hp.hpl.jena.graph.Node;
   4:         ...
   5: 
   6:     protected ReentrantLock        lock    = new ReentrantLock();
   7: 
   8:         ...
   9:     public boolean isInTransaction() {
  10:         return lock.isLocked();
  11:     }
  12:         ...
  13:         synchronized (lock) {
  14:             if (lock.isLocked()) {

View Full Code Here
   1: import java.util.List;
   2: import java.util.concurrent.locks.ReentrantLock;
   3: import javax.imageio.IIOException;
   4:         ...
   5:     private MTimer scaleTimer;
   6:     private ReentrantLock canvasLock = new ReentrantLock();
   7:     private UndoManager undoManager;
   8:         ...
   9:     public synchronized boolean isLocked() {
  10:         return canvasLock.isLocked();
  11:     }

View Full Code Here