Package EDU.oswego.cs.dl.util.concurrent

Examples of EDU.oswego.cs.dl.util.concurrent.LinkedQueue.poll()


            try {
               while (true) {
                  LinkedQueue updQueue = cb.getUpdateQueue();
                  if (updQueue == null)
                     throw new XmlBlasterException(glob, ErrorCode.COMMUNICATION_NOCONNECTION_CALLBACKSERVER_NOTAVAILABLE, ME, "The callback is shutdown");
                  UpdateEvent ue = (UpdateEvent)updQueue.poll(this.waitTime);
                  if (ue != null) {
                     String methodName = ue.getMethod();
                     long refId = ue.getUniqueId();
                     ret[0] = methodName;
                     ret[1] = "" + refId;
View Full Code Here


         waitForFailoverComplete(2, conn);
         assertNull(buffer.peek());
         waitForFailoverComplete(3, conn);
         assertNull(buffer.peek());
         ServerManagement.kill(0);
         Exception e = (Exception) buffer.poll(120000);
         System.out.println("e = " + e);
         assertNotNull(e);
      }
      finally
      {
View Full Code Here

         waitForFailoverComplete(2, conn);
         assertNull(buffer.peek());
         waitForFailoverComplete(3, conn);
         assertNull(buffer.peek());
         ServerManagement.kill(0);
         Exception e = (Exception) buffer.poll(120000);
         System.out.println("e = " + e);
         assertNotNull(e);
      }
      finally
      {
View Full Code Here

      int numberOfProducers = NUMBER_OF_PRODUCERS +1;
      int numberOfConsumers = NUMBER_OF_CONSUMERS +1;

      while (threads.size()>0)
      {
         SeveralClientsStressTest.InternalMessage msg = (SeveralClientsStressTest.InternalMessage)testChannel.poll(2000);

         log.info("Produced:" + producedMessages.get() + " and Consumed:" + readMessages.get() + " messages");

         if (msg!=null)
         {
View Full Code Here

      int numberOfProducers = NUMBER_OF_PRODUCERS;
      int numberOfConsumers = NUMBER_OF_CONSUMERS;

      while (threads.size()>0)
      {
         SeveralClientsStressTest.InternalMessage msg = (SeveralClientsStressTest.InternalMessage)testChannel.poll(2000);

         log.info("Produced:" + producedMessages.get() + " and Consumed:" + readMessages.get() + " messages");

         if (msg!=null)
         {
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.