Package java.util.concurrent

Examples of java.util.concurrent.ScheduledThreadPoolExecutor.awaitTermination()


      ep.submit(new SubscriptionGenerator(numSubscriptions/numThreads));
    }
    logger.info("event=started");
    try {
      ep.shutdown();
      ep.awaitTermination(60, TimeUnit.MINUTES);
    } catch (InterruptedException ex) {
      logger.error("event=failure", ex);
    }
    long end = System.currentTimeMillis();
    logger.info("event=done duration=" + (end-start));
View Full Code Here


    logger.warn("ALL TEST LAUNCHED");

    try {
      ep.shutdown();
      ep.awaitTermination(60, TimeUnit.MINUTES);
      //Thread.sleep(5000);
    } catch (InterruptedException ex) {
      logger.error("fail", ex);
      fail(ex.getMessage());
    }
View Full Code Here

      logger.info("event=launching_sender");
      ep.submit(new MessageSender());
    }
    try {
      ep.shutdown();
      ep.awaitTermination(100, TimeUnit.DAYS);
    } catch (InterruptedException ex) {
      logger.error("event=endurance_failure queue_url=" + queueUrl, ex);
    }
    logger.info("event=done");
  }
View Full Code Here

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.