Lines Matching refs:Guard

156  * <p>This version adds some verbosity around the {@code Guard} objects, but removes that same
164 * private final Monitor.Guard valuePresent = new Monitor.Guard(monitor) {
169 * private final Monitor.Guard valueAbsent = new Monitor.Guard(monitor) {
206 // TODO(user): Change API to make it impossible to use a Guard with the "wrong" monitor,
243 // - getWaitingThreads(Guard) method
280 * A boolean condition for which a thread may wait. A {@code Guard} is associated with a single
285 * <p>If a {@code Guard} is passed into any method of a {@code Monitor} other than the one it is
291 public abstract static class Guard {
301 Guard next;
303 protected Guard(Monitor monitor) {
329 * A linked list threaded through the Guard.next field.
332 private Guard activeGuards = null;
419 public void enterWhen(Guard guard) throws InterruptedException {
443 public void enterWhenUninterruptibly(Guard guard) {
471 public boolean enterWhen(Guard guard, long time, TimeUnit unit) throws InterruptedException {
512 public boolean enterWhenUninterruptibly(Guard guard, long time, TimeUnit unit) {
567 public boolean enterIf(Guard guard) {
590 public boolean enterIfInterruptibly(Guard guard) throws InterruptedException {
613 public boolean enterIf(Guard guard, long time, TimeUnit unit) {
637 public boolean enterIfInterruptibly(Guard guard, long time, TimeUnit unit)
665 public boolean tryEnterIf(Guard guard) {
688 public void waitFor(Guard guard) throws InterruptedException {
701 public void waitForUninterruptibly(Guard guard) {
716 public boolean waitFor(Guard guard, long time, TimeUnit unit) throws InterruptedException {
730 public boolean waitForUninterruptibly(Guard guard, long time, TimeUnit unit) {
843 public boolean hasWaiters(Guard guard) {
853 public int getWaitQueueLength(Guard guard) {
891 for (Guard guard = activeGuards; guard != null; guard = guard.next) {
908 // private void signalNextWaiterSkipping(Guard guardToSkip) {
909 // for (Guard guard = activeGuards; guard != null; guard = guard.next) {
922 private boolean isSatisfied(Guard guard) {
936 for (Guard guard = activeGuards; guard != null; guard = guard.next) {
945 private void beginWaitingFor(Guard guard) {
958 private void endWaitingFor(Guard guard) {
962 for (Guard p = activeGuards, pred = null;; pred = p, p = p.next) {
983 private void await(Guard guard, boolean signalBeforeWaiting)
999 private void awaitUninterruptibly(Guard guard, boolean signalBeforeWaiting) {
1014 private boolean awaitNanos(Guard guard, long nanos, boolean signalBeforeWaiting)