Package java.util.concurrent

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


                }
                Thread.sleep(30);
                mk.merge(branchId, null);
            }
        } finally {
            gcExecutor.shutdown();
        }
    }
}
View Full Code Here


                assertTrue(
                        clock + " unexpected drift ater 100ms: " + drift + "ms " + diag,
                        Math.abs(drift) <= limit);
            }
        } finally {
            executor.shutdown();
        }
    }

    @Test
    public void testClockIncreasing() throws InterruptedException {
View Full Code Here

                    assertTrue(time[j] < now);
                    time[j] = now;
                }
            }
        } finally {
            executor.shutdown();
        }
    }

    /**
     * On some systems (for instance Windows), the granularity of {@link System.currentTimeMillis} depends
View Full Code Here

                    Debug.logInfo("Duplicate webapp mount; not loading : " + appInfo.getName() + " / " + appInfo.getLocation(), module);
                }
            }
            ExecutionPool.getAllFutures(futures);
        } finally {
            executor.shutdown();
        }
    }

    public void stop() throws ContainerException {
        try {
View Full Code Here

      public void run()
      {
        _shutdown.set(true);
        ScheduledExecutorService s = _default.get();
       
        if (s != null) s.shutdown();
      }
    });
  }

  public List<Runnable> shutdownNow()
View Full Code Here

  {
    ScheduledExecutorService s = _default.get();
    if (_current.compareAndSet(s, _tracked.getService())) {
      if (s != null) {
        if (_default.compareAndSet(s, null)) {
          s.shutdown();
        }
      }
    }
  }
View Full Code Here

        // wake up threads waiting on this instance's monitor (e.g. workspace janitor)
        notifyAll();

        // Shut down the executor service
        ScheduledExecutorService executor = context.getExecutor();
        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();
View Full Code Here

          assertTrue(true);
        }
      }
    }
   
    scheduler.shutdown();

  }
  /**
   * Tests fix for BUG#68763, ReplicationConnection.isMasterConnection() returns false always
   * 
View Full Code Here

            sr.unregister();

            eventAdmin.stop();

            executor.shutdown();
            scheduledExecutor.shutdown();
        }
    }

    @Test
    public void testRootWildcard() throws Exception
View Full Code Here

            sr.unregister();

            eventAdmin.stop();

            executor.shutdown();
            scheduledExecutor.shutdown();
        }
    }
}
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.