Package java.util.concurrent

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


        } catch (InterruptedException e) {
          throw new IOException(e);
        } catch (ExecutionException e) {
          throw new IOException(e.getCause());
        } finally {
          storeCloserThreadPool.shutdownNow();
        }
      }
      this.closed.set(true);

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


            p = executor;
            executor = null;
            classLoader = null;
        }
        if (p != null) {
            p.shutdownNow();
        }
    }

    public void doFail() {
        try {
View Full Code Here

      HiveInterruptCallback interrup = HiveInterruptUtils.add(new HiveInterruptCallback() {
        @Override
        public void interrupt() {
          if (executor != null) {
            executor.shutdownNow();
          }
        }
      });
      try {
        Configuration conf = ctx.getConf();
View Full Code Here

            executor.execute(w);
        }
       
        startSignal.countDown();
        doneSignal.await(60, TimeUnit.SECONDS);
        executor.shutdownNow();      
        assertEquals("Not all invocations have completed", 0, doneSignal.getCount());
        for (BookWorker w : workers) {
            w.checkError();
        }
    }
View Full Code Here

        executor.execute(new BookWorker("http://localhost:" + PORT + "/bookstore/" + pathSegment + "/1",
                                        "1",
                                        "CXF in Action1", startSignal, doneSignal));
        startSignal.countDown();
        doneSignal.await(60, TimeUnit.SECONDS);
        executor.shutdownNow();
        assertEquals("Not all invocations have completed", 0, doneSignal.getCount());
    }
   
    private void checkBook(String address, String id, String expected) throws Exception {
        GetMethod get = new GetMethod(address);
View Full Code Here

       
        addThreads(executor, pf, startSignal, doneSignal, 50);
       
        startSignal.countDown();
        doneSignal.await(60, TimeUnit.SECONDS);
        executor.shutdownNow();
        assertEquals("Not all invocations have completed", 0, doneSignal.getCount());
        checkJaxbProvider(pf);
    }
   
    private void addThreads(ThreadPoolExecutor executor, ProviderFactory pf,
View Full Code Here

                }
            }
        }
        finally
        {
            executor.shutdownNow();
        }

        assert splits.size() > 0;
        Collections.shuffle(splits, new Random(System.nanoTime()));
        return splits;
View Full Code Here

            p = executor;
            executor = null;
            classLoader = null;
        }
        if (p != null) {
            p.shutdownNow();
        }
    }

    public void doFail() {
        try {
View Full Code Here

      engine.shutdown();
    }
    finally
    {
      scheduledExecutorService.shutdownNow();
      executorService.shutdownNow();
    }
  }

  /**
   * A task that blocks forever when it is executed, tying up whatever thread
View Full Code Here

        } catch (ExecutionException e) {
          if (ioe == null) ioe = new IOException(e.getCause());
        }
      }
    } finally {
      storeFileOpenerThreadPool.shutdownNow();
    }
    if (ioe != null) {
      // close StoreFile readers
      for (StoreFile file : results) {
        try {
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.