public synchronized boolean recheck(WaitQueue.WaitNode w) { Node node = (Node)w; boolean pass = (permits_ >= node.requests); if (pass) permits_ -= node.requests; else wq_.insert(w); return pass; }
/** * Returns current nanosecond time. */ final long now() { return Utils.nanoTime(); }
public Object[] toArray(Object[] a) { return Utils.collectionToArray(this, a); } }
public synchronized void takeOver(WaitQueue.WaitNode node) { // assert (holds_ == 1 && owner_ == Thread.currentThread() owner_ = node.getOwner(); }
public synchronized boolean hasQueuedThreads() { return wq_.hasNodes(); }
public synchronized Collection getQueuedThreads() { return wq_.getWaitingThreads(); }
public Object[] toArray(Object[] a) { return Utils.collectionToArray(this, a); } }
/** * Returns current nanosecond time. */ final long now() { return Utils.nanoTime(); }
public synchronized boolean recheck(WaitQueue.WaitNode w) { Node node = (Node)w; boolean pass = (permits_ >= node.requests); if (pass) permits_ -= node.requests; else wq_.insert(w); return pass; }
public synchronized void takeOver(WaitQueue.WaitNode node) { // assert (holds_ == 1 && owner_ == Thread.currentThread() owner_ = node.getOwner(); }
public Object[] toArray(Object[] a) { return Utils.collectionToArray(this, a); } }
/** * Returns current nanosecond time. */ final long now() { return Utils.nanoTime(); }
public synchronized boolean recheck(WaitQueue.WaitNode w) { Node node = (Node)w; boolean pass = (permits_ >= node.requests); if (pass) permits_ -= node.requests; else wq_.insert(w); return pass; }
public synchronized void takeOver(WaitQueue.WaitNode node) { // assert (holds_ == 1 && owner_ == Thread.currentThread() owner_ = node.getOwner(); }
public Object[] toArray(Object[] a) { return Utils.collectionToArray(this, a); } }
public Object[] toArray(Object[] a) { return Utils.collectionToArray(this, a); } }
public Object[] toArray() { return Utils.collectionToArray(this); }
public Object[] toArray(Object[] a) { return Utils.collectionToArray(this, a); } }
public Object[] toArray(Object[] a) { return Utils.collectionToArray(this, a); } }
public Object[] toArray(Object[] a) { return Utils.collectionToArray(this, a); } }