Package org.hornetq.utils

Examples of org.hornetq.utils.Future


      blockOnExecutorFuture();
   }

   public boolean blockOnExecutorFuture()
   {
      Future future = new Future();

      executor.execute(future);

      boolean ok = future.await(10000);

      if (!ok)
      {
         log.warn("Couldn't finish waiting executors. Try increasing the thread pool size");
      }
View Full Code Here


   public synchronized void stop() throws Exception
   {
      active = false;

      Future future = new Future();

      executor.execute(future);

      boolean ok = future.await(10000);

      if (!ok)
      {
         Redistributor.log.warn("Timed out waiting for tasks to complete");
      }
View Full Code Here

      // noop
   }
  
   public synchronized void close()
   {
      Future future = new Future();

      executor.execute(future);

      boolean ok = future.await(10000);

      if (!ok)
      {
         throw new IllegalStateException("Timed out waiting for executor to complete");
      }
View Full Code Here

   public void flushExecutors()
   {
      cursorProvider.flushExecutors();

      Future future = new Future();

      executor.execute(future);

      if (!future.await(60000))
      {
         PagingStoreImpl.log.warn("Timed out on waiting PagingStore " + address + " to shutdown");
      }
   }
View Full Code Here

      return ok;
   }

   private boolean internalFlushExecutor(long timeout)
   {
      Future future = new Future();

      getExecutor().execute(future);

      boolean result = future.await(timeout);

      if (!result)
      {
         log.warn("Queue " + this.getName() + " was busy for more than " + timeout + " miliseconds. There are possibly consumers hanging on a network operation");
      }
View Full Code Here

   }

   public void flushExecutor()
   {
      // Wait for any create objects runnable to complete
      Future future = new Future();

      executor.execute(future);

      boolean ok = future.await(10000);

      if (!ok)
      {
         BridgeImpl.log.warn("Timed out waiting to stop");
      }
View Full Code Here

      {
         // And we must wait for any force delivery to be executed - this is executed async so we add a future to the
         // executor and
         // wait for it to complete

         Future future = new Future();

         messageQueue.getExecutor().execute(future);

         future.await(10000);
      }

      if (!transferring)
      {
         promptDelivery();
View Full Code Here

   public void flushExecutors()
   {
      cursorProvider.flushExecutors();

      Future future = new Future();

      executor.execute(future);

      if (!future.await(60000))
      {
         PagingStoreImpl.log.warn("Timed out on waiting PagingStore " + address + " to shutdown");
      }
   }
View Full Code Here

      clearClusterConnections();
   }

   public void flushExecutor()
   {
      Future future = new Future();
      executor.execute(future);
      if (!future.await(10000))
      {
         server.threadDump("Couldn't flush ClusterManager executor (" + this +
                           ") in 10 seconds, verify your thread pool size");
      }
   }
View Full Code Here

   }

   public void flushExecutor()
   {
      Future future = new Future();
      executor.execute(future);
      if (!future.await(10000))
      {
         server.threadDump("Couldn't finish executor on " + this);
      }
   }
View Full Code Here

TOP

Related Classes of org.hornetq.utils.Future

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.