Package java.util.concurrent

Examples of java.util.concurrent.ScheduledExecutorService.shutdown()


      }
    } finally {
      if (result != null) result.cancel(false);
      monkey.stop("Stopping the test");
      monkey.waitForStop();
      executorService.shutdown();
    }
  }

  @Override
  protected String[] getArgsForLoadTestTool(String mode, String modeSpecificArg, long startKey,
View Full Code Here


    }

    public void stop() {
        final ScheduledExecutorService scheduler = this.scheduler.get();
        if (scheduler != null && this.scheduler.compareAndSet(scheduler, null)) {
            scheduler.shutdown();
            try {
                if (!scheduler.awaitTermination(10000, MILLISECONDS)) {
                    Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "Pool scheduler termination timeout expired");
                }
            } catch (final InterruptedException e) {
View Full Code Here

          }
         
          @Override
          public void failed(IOException e) {
            if (shouldCloseQueue) {
              re.shutdown();
              q.close();
            }
            if (readyFactoryToClose != null) {
              readyFactoryToClose.close();
            }
View Full Code Here

                }
               
                write.close();

                if (shouldCloseQueue) {
                  re.shutdown();
                  q.close();
                }
                if (readyFactoryToClose != null) {
                  readyFactoryToClose.close();
                }
View Full Code Here

          }
         
          @Override
          public void close() {
            if (shouldCloseQueue) {
              re.shutdown();
              q.close();
            }
            if (readyFactoryToClose != null) {
              readyFactoryToClose.close();
            }
View Full Code Here

          }
         
          @Override
          public void failed(IOException e) {
            if (shouldCloseQueue) {
              re.shutdown();
              q.close();
            }
            if (instanceMappers.remove(instanceMapper)) {
              clientHandler.failed(e);
            }
View Full Code Here

                }
               
                write.close();

                if (shouldCloseQueue) {
                  re.shutdown();
                  q.close();
                }
              }
              @Override
              public void get(Oid oid, GetCallback callback) {
View Full Code Here

          }
         
          @Override
          public void close() {
            if (shouldCloseQueue) {
              re.shutdown();
              q.close();
            }
            if (instanceMappers.remove(instanceMapper)) {
              instanceMapper.closedByPeer();
            }
View Full Code Here

    default_endpoint.setExecutor(executor);
    default_endpoint.addObserver(new EndpointObserver() {
      public void started(Endpoint endpoint) { }
      public void stopped(Endpoint endpoint) { }
      public void destroyed(Endpoint endpoint) {
        executor.shutdown();
      }
    });
    try {
      default_endpoint.start();
      LOGGER.log(Level.INFO, "Created default endpoint " + default_endpoint.getAddress());
View Full Code Here

                mk.commit("/a/b/c/d/e", "+\"f\" : {}", mk.getHeadRevision(), null);
                Thread.sleep(30);
                mk.commit("/a/b/c/d", "-\"e\"", mk.getHeadRevision(), null);
            }
        } finally {
            gcExecutor.shutdown();
        }
    }

    /**
     * Verify garbage collection can run concurrently with branch & merge.
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.