Package edu.emory.mathcs.backport.java.util.concurrent

Examples of edu.emory.mathcs.backport.java.util.concurrent.BlockingQueue.offer()


      }
      try {
         if (this.asyncSendQueueBlockOnOverflow)
            queue.put(emailData);
         else {
            boolean added = queue.offer(emailData);
            if (!added) {
               throw new XmlBlasterException(glob,
                     ErrorCode.RESOURCE_CONFIGURATION_CONNECT, "SmtpClient",
                     "Can't send email, queueu overflow of asyncSendQueueSizeMax="+this.asyncSendQueueSizeMax+", there may be a problem with your Smtp server, the mail is lost: " + emailData.toXml(true));
            }
View Full Code Here


        }
        if (Thread.currentThread() == worker) {
            dispatcher.dispatch(session, event);
        } else {
            BlockingQueue queue = worker.queue;
            if (!queue.offer(event)) {
                // flow control
                if (elapsedTime.getElapsedTime() >= 10000) {
                    elapsedTime.reset();
                    log.warn("dispatcher flow control");
                }
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.