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

Examples of EDU.oswego.cs.dl.util.concurrent.LinkedQueue


    public MsgQueue(String aName) {
        if ( null == aName ) {
            throw new IllegalArgumentException("Name is required.");
        }
        name = aName;
        queue = new LinkedQueue();
    }
View Full Code Here


     * one.
     *
     * @param maxSize Maximum size of the work executor pool.
     */
    public WorkExecutorPoolImpl(int maxSize) {
        pooledExecutor = new PooledExecutor(new LinkedQueue(), maxSize);
        pooledExecutor.setMinimumPoolSize(maxSize);
        pooledExecutor.waitWhenBlocked();
    }
View Full Code Here

    private int getNextWorkerID() {
        return nextWorkerID++;
    }

    public void doStart() throws WaitingException, Exception {
        PooledExecutor p = new PooledExecutor(new LinkedQueue(), poolSize);
        p.setKeepAliveTime(keepAliveTime);
        p.setMinimumPoolSize(poolSize);
        p.setThreadFactory(new ThreadFactory() {
            public Thread newThread(Runnable arg0) {
                return new Thread(arg0, poolName + " " + getNextWorkerID());
View Full Code Here

   {
      private LinkedQueue buffer;

      public SimpleFailoverListener()
      {
         buffer = new LinkedQueue();
      }
View Full Code Here

      Connection conn = null;

      try
      {
         final LinkedQueue buffer = new LinkedQueue();
         conn = createConnectionOnServer(theCF, 1);
         conn.start();

         conn.setExceptionListener(new ExceptionListener()
         {
            public void onException(JMSException e)
            {
               try
               {
                  buffer.put(e);
               }
               catch (InterruptedException e1)
               {
                  e1.printStackTrace();
               }
            }
         });
         waitForFailoverComplete(1, conn);
         assertNull(buffer.peek());
         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

   {
      private LinkedQueue buffer;

      public SimpleFailoverListener()
      {
         buffer = new LinkedQueue();
      }
View Full Code Here

   {
      private Channel callbackHistory;

      public SimpleCallbackHandler()
      {
         callbackHistory = new LinkedQueue();
      }
View Full Code Here

     *
     * @param minSize Minimum size of the work executor pool.
     * @param maxSize Maximum size of the work executor pool.
     */
    public StartWorkExecutorPool(int minSize, int maxSize) {
        super(new LinkedQueue(), minSize, maxSize);
    }
View Full Code Here

     *
     * @param minSize Minimum size of the work executor pool.
     * @param maxSize Maximum size of the work executor pool.
     */
    public ScheduleWorkExecutorPool(int minSize, int maxSize) {
        super(new LinkedQueue(), minSize, maxSize);
    }
View Full Code Here

     * one.
     *
     * @param maxSize Maximum size of the work executor pool.
     */
    public WorkExecutorPoolImpl(int maxSize) {
        pooledExecutor = new PooledExecutor(new LinkedQueue(), maxSize);
        pooledExecutor.setMinimumPoolSize(maxSize);
        pooledExecutor.waitWhenBlocked();
    }
View Full Code Here

TOP

Related Classes of EDU.oswego.cs.dl.util.concurrent.LinkedQueue

Copyright © 2018 www.massapicom. 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.