Examples of shutdownNow()


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 java.util.concurrent.ThreadPoolExecutor.shutdownNow()

            } catch (ExecutionException e) {
              if (ioe == null) ioe = new IOException(e.getCause());
            }
          }
        } finally {
          storeFileCloserThreadPool.shutdownNow();
        }
        if (ioe != null) throw ioe;
      }
      LOG.info("Closed " + this);
      return result;
View Full Code Here

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

      } catch (InterruptedException e) {
        throw new IOException(e);
      } catch (ExecutionException e) {
        throw new IOException(e.getCause());
      } finally {
        storeOpenerThreadPool.shutdownNow();
      }
    }
    mvcc.initialize(maxMemstoreTS + 1);
    // Recover any edits if available.
    maxSeqId = Math.max(maxSeqId, replayRecoveredEditsIfAny(
View Full Code Here

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

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

      } catch (InterruptedException e) {
        throw new IOException(e);
      } catch (ExecutionException e) {
        throw new IOException(e.getCause());
      } finally {
        storeOpenerThreadPool.shutdownNow();
      }
    }
    mvcc.initialize(maxMemstoreTS + 1);
    // Recover any edits if available.
    maxSeqId = Math.max(maxSeqId, replayRecoveredEditsIfAny(
View Full Code Here

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

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

        System.out.println("End of channel group");
        channelGroup.close().awaitUninterruptibly();
        comGroup.close().awaitUninterruptibly();
        // Close the executor for Pipeline
        System.out.println("End of pipeline executor");
        pipelineExecutor.shutdownNow();
        // Now release resources
        System.out.println("End of resources");
        factory.releaseExternalResources();
        comFactory.releaseExternalResources();
    }
View Full Code Here

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

    // Wait for all the tasks to finish
    try {
      boolean stillRunning = !threadPool.awaitTermination(
          this.fileSplitTimeout, TimeUnit.MILLISECONDS);
      if (stillRunning) {
        threadPool.shutdownNow();
        // wait for the thread to shutdown completely.
        while (!threadPool.isTerminated()) {
          Thread.sleep(50);
        }
        throw new IOException("Took too long to split the" +
View Full Code Here

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

       
        startSignal.countDown();
       
        controlDoneSignal.await(10, TimeUnit.SECONDS);
        helloDoneSignal.await(10, TimeUnit.SECONDS);
        executor.shutdownNow();
        assertEquals("Not all invocations have been resumed", 0, controlDoneSignal.getCount());
        assertEquals("Not all invocations have completed", 0, helloDoneSignal.getCount());
       
        helloPort.sayHi("Dan1", "to:100");
        helloPort.sayHi("Dan2", "to:100");
View Full Code Here

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

            executor.execute(new WebClientWorker(wc, bookName, bookHeader,
                             startSignal, doneSignal, stateCanBeChanged));
        }
        startSignal.countDown();
        doneSignal.await(60, TimeUnit.SECONDS);
        executor.shutdownNow();
        assertEquals("Not all invocations have completed", 0, doneSignal.getCount());
    }
   
    private void runProxies(BookStore proxy, int numberOfClients,
                            boolean threadSafe, boolean stateCanBeChanged) throws Exception {
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.