Examples of shutdownNow()


Examples of java.util.concurrent.ThreadPoolExecutor.shutdownNow()

        iie.initCause(e);
        throw iie;
      } catch (ExecutionException e) {
        throw new IOException(e.getCause());
      } finally {
        closeThreadPool.shutdownNow();
      }

      if (!thrown.isEmpty()) {
        throw MultipleIOException.createIOException(thrown);
      }
View Full Code Here

Examples of java.util.concurrent.ThreadPoolExecutor.shutdownNow()

        } catch (ExecutionException e) {
          if (ioe == null) ioe = new IOException(e.getCause());
        }
      }
    } finally {
      storeFileOpenerThreadPool.shutdownNow();
    }
    if (ioe != null) {
      // close StoreFile readers
      try {
        for (StoreFile file : results) {
View Full Code Here

Examples of org.apache.activemq.thread.TaskRunnerFactory.shutdownNow()

                try {
                    latch.await(1,TimeUnit.SECONDS);
                } catch (InterruptedException e) {
                    Thread.currentThread().interrupt();
                } finally {
                    taskRunnerFactory.shutdownNow();
                }

            } else {
                // close synchronously
                LOG.trace("Closing socket {}", socket);
View Full Code Here

Examples of org.apache.tomcat.util.threads.ThreadPoolExecutor.shutdownNow()

    public void shutdownExecutor() {
        if ( executor!=null && internalExecutor ) {
            if ( executor instanceof ThreadPoolExecutor ) {
                //this is our internal one, so we need to shut it down
                ThreadPoolExecutor tpe = (ThreadPoolExecutor) executor;
                tpe.shutdownNow();
                long timeout = getExecutorTerminationTimeoutMillis();
                if (timeout > 0) {
                    try {
                        tpe.awaitTermination(timeout, TimeUnit.MILLISECONDS);
                    } catch (InterruptedException e) {
View Full Code Here

Examples of org.elasticsearch.threadpool.ThreadPool.shutdownNow()

        stopWatch.stop();

        System.out.println("Ran [" + NUMBER_OF_CLIENTS + "], each with [" + NUMBER_OF_ITERATIONS + "] iterations, payload [" + payloadSize + "]: took [" + stopWatch.totalTime() + "], TPS: " + (NUMBER_OF_CLIENTS * NUMBER_OF_ITERATIONS) / stopWatch.totalTime().secondsFrac());

        clientTransportService.close();
        clientThreadPool.shutdownNow();

        serverTransportService.close();
        serverThreadPool.shutdownNow();
    }
}
View Full Code Here

Examples of org.glassfish.grizzly.http.server.HttpServer.shutdownNow()

        if (start) {
            try {
                // Start the server.
                server.start();
            } catch (final IOException ex) {
                server.shutdownNow();
                throw new ProcessingException(LocalizationMessages.FAILED_TO_START_SERVER(ex.getMessage()), ex);
            }
        }

        return server;
View Full Code Here

Examples of org.glassfish.grizzly.nio.NIOTransport.shutdownNow()

    public void stop() throws IOException {
        stopDelayedExecutor();
        final NIOTransport localTransport = transport;
        transport = null;
        if (localTransport != null) {
            localTransport.shutdownNow();
        }
       
        if (workerExecutorService != null) {
            final ExecutorService localExecutorService = workerExecutorService;
            workerExecutorService = null;
View Full Code Here

Examples of org.glassfish.grizzly.nio.transport.TCPNIOTransport.shutdownNow()

                countDownLatch.await();
                if (connection != null)
                    connection.close();

                try {
                    transport.shutdownNow();
                } catch (IOException e) {
                    LOGGER.debug("can't close connect", e);
                }

            } catch (InterruptedException e) {
View Full Code Here

Examples of org.infinispan.util.concurrent.BlockingTaskAwareExecutorService.shutdownNow()

            public boolean isSatisfied() throws Exception {
               return doSomething.isExecuted();
            }
         });
      } finally {
         executorService.shutdownNow();
      }
   }

   public void testMultipleExecutions() throws Exception {
      BlockingTaskAwareExecutorServiceImpl executorService = createExecutorService();
View Full Code Here

Examples of org.infinispan.util.concurrent.BlockingTaskAwareExecutorServiceImpl.shutdownNow()

               }
            });
         }

      } finally {
         executorService.shutdownNow();
      }
   }

   private BlockingTaskAwareExecutorServiceImpl createExecutorService() {
      return new BlockingTaskAwareExecutorServiceImpl(new ThreadPoolExecutor(1, 2, 60, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(1000), new DummyThreadFactory()));
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.