Examples of wait()


Examples of java.util.ArrayList.wait()

                }
            }).start();
        }
        synchronized (results) {
            while (results.size() < threadCount) {
                results.wait();
            }
        }
        for (Iterator it = results.iterator(); it.hasNext(); ) {
            Throwable result = (Throwable)it.next();
            if (result != null) {

Examples of java.util.Calendar.wait()

                logger.warn("submission to BLAH failed [jobId=" + job.getId() + "; reason=" + failureReason + "; retry count=" + i + "/3]");

                synchronized(now) {
                    try {
                        logger.debug("sleeping 10 sec...");
                        now.wait(10000);
                        logger.debug("sleeping 10 sec... done");
                    } catch (InterruptedException e) {
                        logger.warn(e.getMessage());
                    }
                }

Examples of java.util.EventObject.wait()

    final EventObject event = new KillEvent();
    synchronized (event) {
      dispatchEvent(event);
      if (wait) {
        try {
          event.wait();
        } catch (final InterruptedException e) {
          log.info("wait for kill event interrupted!");
        }
      }
    }

Examples of java.util.Hashtable.wait()

          if (t == null)
            elements.put(CIRCULARITY_TOKEN, Thread.currentThread());
          else if (t != Thread.currentThread()) {
            //System.out.println("waiting for other thread...");
            try { elements.wait(1000); } catch (InterruptedException ie) {}
            //System.out.println("waiting done.");
            return;
          } else {
            if (listenerName != null) {
              System.err.println("Infinite recursion encountered while " +

Examples of java.util.List.wait()

                }
            }).start();
        }
        synchronized (results) {
            while (results.size() < threadCount) {
                results.wait();
            }
        }
        for (Iterator it = results.iterator(); it.hasNext(); ) {
            Throwable result = (Throwable)it.next();
            if (result != null) {

Examples of java.util.Map.wait()

        // proxy class already generated: return it
        return proxyClass;
    } else if (value == pendingGenerationMarker) {
        // proxy class being generated: wait for it
        try {
      cache.wait();
        } catch (InterruptedException e) {
      /*
       * The class generation that we are waiting for should
       * take a small, bounded time, so we can safely ignore
       * thread interrupts here.

Examples of java.util.Set.wait()

         {
            if (sockets.isEmpty())
            {
               try
               {
                  sockets.wait(timeout);
               }
               catch (InterruptedException ignored)
               {
                  log.warn("unexpected interrupt");
                  throw new InterruptedIOException("Attempt to create control socket interrupted");

Examples of java.util.Vector.wait()

            long startTime = System.currentTimeMillis();
            long maxwait = MAX_PULL_BLOCK_PERIOD;

            while (pullQ.isEmpty() && (linkTableState == RUNNING)) {
                try {
                    pullQ.wait(maxwait);
                } catch (Exception e) {
                }

                maxwait -= (System.currentTimeMillis() - startTime);

Examples of java.util.concurrent.ConcurrentHashMap.wait()

            try {
              synchronized (map) {
                ++ counter[0];
                map.notifyAll();
                while (exception[0] == null && step[0] == 0) {
                  map.wait();
                }
              }

              for (int i = 0; i < IterationCount; ++i) {
                populateCommon(map);

Examples of java.util.concurrent.atomic.AtomicBoolean.wait()

                    }
                });
               
                synchronized (active) {
                    while (active.get() == true)
                        active.wait();
                }
               
            } else {
                dialog.setVisible(true);
            }
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.