Package java.util.concurrent

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


            session.executeAsync(insertStatement.bind(key)).addListener(progressReporter, progressReportExecutor);
        }

        // Wait for all inserts to happen and stop connections and progress tracking
        pendingInserts.await();
        openConnectionsWatcherExecutor.shutdownNow();
        progressReportExecutor.shutdownNow();

        if (negativeOpenConnectionCountSpotted.get()) {
            fail("Negative value spotted for open connection count");
        }
View Full Code Here


        // Generate the load
        for (int i = 0; i < 10000; i++)
            session.executeAsync("SELECT release_version FROM system.local");

        openConnectionsWatcherExecutor.shutdownNow();
        if (excessInflightQueriesSpotted.get()) {
            fail("Inflight queries exceeded the limit");
        }
    }
}
View Full Code Here

    public synchronized void cancel() {
        if (executor.isShutdown()) {
      throw new IllegalStateException(
          "Task is already cancelled");
        }
        executor.shutdownNow();
    }
      };
  }
    }
View Full Code Here

            context.error(e);
         }
      }
      try {
         sessionPingTask.cancel(true);
         executor.shutdownNow();
         config.save();
         console.stop();
      } catch (Exception e) {
      }
   }
View Full Code Here

        executor.shutdown();
        try {
            // Wait for all remaining background threads to terminate
            if (!executor.awaitTermination(10, TimeUnit.SECONDS)) {
                log.warn("Attempting to forcibly shutdown runaway threads");
                executor.shutdownNow();
            }
        } catch (InterruptedException e) {
            log.warn("Interrupted while waiting for background threads", e);
        }
View Full Code Here

                TimeUnit.MILLISECONDS );


        Thread.sleep( 10200 );

        executor.shutdownNow();
        ksession.halt();
        t.join();

        if (t.getError() != null) {
            fail(t.getError().getMessage());
View Full Code Here

    }
    finally
    {
      serviceScheduler.shutdownNow();
      engine.shutdown();
      scheduler.shutdownNow();
    }
  }
}
View Full Code Here

      doRunExample(engine);
    }
    finally
    {
      engine.shutdown();
      scheduler.shutdownNow();
      _serviceScheduler.shutdown();
      _serviceScheduler = null;
    }
  }
View Full Code Here

    }
    finally
    {
      engine.shutdown();
      engine.awaitTermination(1, TimeUnit.SECONDS);
      scheduler.shutdownNow();
    }
  }
}
View Full Code Here

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

  /**
 
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.