java.util.concurrent.ScheduledThreadPoolExecutor.onShutdown()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(12.1k)|赞(0)|评价(0)|浏览(90)

本文整理了Java中java.util.concurrent.ScheduledThreadPoolExecutor.onShutdown()方法的一些代码示例,展示了ScheduledThreadPoolExecutor.onShutdown()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ScheduledThreadPoolExecutor.onShutdown()方法的具体详情如下:
包路径:java.util.concurrent.ScheduledThreadPoolExecutor
类名称:ScheduledThreadPoolExecutor
方法名:onShutdown

ScheduledThreadPoolExecutor.onShutdown介绍

[英]Cancels and clears the queue of all tasks that should not be run due to shutdown policy. Invoked within super.shutdown.
[中]取消并清除由于关闭策略而不应运行的所有任务的队列。在超级内存中调用。关机。

代码示例

代码示例来源:origin: robovm/robovm

/**
 * Sets the policy on whether to execute existing delayed
 * tasks even when this executor has been {@code shutdown}.
 * In this case, these tasks will only terminate upon
 * {@code shutdownNow}, or after setting the policy to
 * {@code false} when already shutdown.
 * This value is by default {@code true}.
 *
 * @param value if {@code true}, execute after shutdown, else don't
 * @see #getExecuteExistingDelayedTasksAfterShutdownPolicy
 */
public void setExecuteExistingDelayedTasksAfterShutdownPolicy(boolean value) {
  executeExistingDelayedTasksAfterShutdown = value;
  if (!value && isShutdown())
    onShutdown();
}

代码示例来源:origin: robovm/robovm

/**
 * Sets the policy on whether to continue executing existing
 * periodic tasks even when this executor has been {@code shutdown}.
 * In this case, these tasks will only terminate upon
 * {@code shutdownNow} or after setting the policy to
 * {@code false} when already shutdown.
 * This value is by default {@code false}.
 *
 * @param value if {@code true}, continue after shutdown, else don't
 * @see #getContinueExistingPeriodicTasksAfterShutdownPolicy
 */
public void setContinueExistingPeriodicTasksAfterShutdownPolicy(boolean value) {
  continueExistingPeriodicTasksAfterShutdown = value;
  if (!value && isShutdown())
    onShutdown();
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

/**
 * Sets the policy on whether to continue executing existing
 * periodic tasks even when this executor has been {@code shutdown}.
 * In this case, these tasks will only terminate upon
 * {@code shutdownNow} or after setting the policy to
 * {@code false} when already shutdown.
 * This value is by default {@code false}.
 *
 * @param value if {@code true}, continue after shutdown, else don't
 * @see #getContinueExistingPeriodicTasksAfterShutdownPolicy
 */
public void setContinueExistingPeriodicTasksAfterShutdownPolicy(boolean value) {
  continueExistingPeriodicTasksAfterShutdown = value;
  if (!value && isShutdown())
    onShutdown();
}

代码示例来源:origin: com.gluonhq/robovm-rt

/**
 * Sets the policy on whether to continue executing existing
 * periodic tasks even when this executor has been {@code shutdown}.
 * In this case, these tasks will only terminate upon
 * {@code shutdownNow} or after setting the policy to
 * {@code false} when already shutdown.
 * This value is by default {@code false}.
 *
 * @param value if {@code true}, continue after shutdown, else don't
 * @see #getContinueExistingPeriodicTasksAfterShutdownPolicy
 */
public void setContinueExistingPeriodicTasksAfterShutdownPolicy(boolean value) {
  continueExistingPeriodicTasksAfterShutdown = value;
  if (!value && isShutdown())
    onShutdown();
}

代码示例来源:origin: ibinti/bugvm

/**
 * Sets the policy on whether to execute existing delayed
 * tasks even when this executor has been {@code shutdown}.
 * In this case, these tasks will only terminate upon
 * {@code shutdownNow}, or after setting the policy to
 * {@code false} when already shutdown.
 * This value is by default {@code true}.
 *
 * @param value if {@code true}, execute after shutdown, else don't
 * @see #getExecuteExistingDelayedTasksAfterShutdownPolicy
 */
public void setExecuteExistingDelayedTasksAfterShutdownPolicy(boolean value) {
  executeExistingDelayedTasksAfterShutdown = value;
  if (!value && isShutdown())
    onShutdown();
}

代码示例来源:origin: FlexoVM/flexovm

/**
 * Sets the policy on whether to continue executing existing
 * periodic tasks even when this executor has been {@code shutdown}.
 * In this case, these tasks will only terminate upon
 * {@code shutdownNow} or after setting the policy to
 * {@code false} when already shutdown.
 * This value is by default {@code false}.
 *
 * @param value if {@code true}, continue after shutdown, else don't
 * @see #getContinueExistingPeriodicTasksAfterShutdownPolicy
 */
public void setContinueExistingPeriodicTasksAfterShutdownPolicy(boolean value) {
  continueExistingPeriodicTasksAfterShutdown = value;
  if (!value && isShutdown())
    onShutdown();
}

代码示例来源:origin: FlexoVM/flexovm

/**
 * Sets the policy on whether to execute existing delayed
 * tasks even when this executor has been {@code shutdown}.
 * In this case, these tasks will only terminate upon
 * {@code shutdownNow}, or after setting the policy to
 * {@code false} when already shutdown.
 * This value is by default {@code true}.
 *
 * @param value if {@code true}, execute after shutdown, else don't
 * @see #getExecuteExistingDelayedTasksAfterShutdownPolicy
 */
public void setExecuteExistingDelayedTasksAfterShutdownPolicy(boolean value) {
  executeExistingDelayedTasksAfterShutdown = value;
  if (!value && isShutdown())
    onShutdown();
}

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * Sets the policy on whether to execute existing delayed
 * tasks even when this executor has been {@code shutdown}.
 * In this case, these tasks will only terminate upon
 * {@code shutdownNow}, or after setting the policy to
 * {@code false} when already shutdown.
 * This value is by default {@code true}.
 *
 * @param value if {@code true}, execute after shutdown, else don't
 * @see #getExecuteExistingDelayedTasksAfterShutdownPolicy
 */
public void setExecuteExistingDelayedTasksAfterShutdownPolicy(boolean value) {
  executeExistingDelayedTasksAfterShutdown = value;
  if (!value && isShutdown())
    onShutdown();
}

代码示例来源:origin: com.gluonhq/robovm-rt

/**
 * Sets the policy on whether to execute existing delayed
 * tasks even when this executor has been {@code shutdown}.
 * In this case, these tasks will only terminate upon
 * {@code shutdownNow}, or after setting the policy to
 * {@code false} when already shutdown.
 * This value is by default {@code true}.
 *
 * @param value if {@code true}, execute after shutdown, else don't
 * @see #getExecuteExistingDelayedTasksAfterShutdownPolicy
 */
public void setExecuteExistingDelayedTasksAfterShutdownPolicy(boolean value) {
  executeExistingDelayedTasksAfterShutdown = value;
  if (!value && isShutdown())
    onShutdown();
}

代码示例来源:origin: MobiVM/robovm

/**
 * Sets the policy on whether to continue executing existing
 * periodic tasks even when this executor has been {@code shutdown}.
 * In this case, these tasks will only terminate upon
 * {@code shutdownNow} or after setting the policy to
 * {@code false} when already shutdown.
 * This value is by default {@code false}.
 *
 * @param value if {@code true}, continue after shutdown, else don't
 * @see #getContinueExistingPeriodicTasksAfterShutdownPolicy
 */
public void setContinueExistingPeriodicTasksAfterShutdownPolicy(boolean value) {
  continueExistingPeriodicTasksAfterShutdown = value;
  if (!value && isShutdown())
    onShutdown();
}

代码示例来源:origin: MobiVM/robovm

/**
 * Sets the policy on whether to execute existing delayed
 * tasks even when this executor has been {@code shutdown}.
 * In this case, these tasks will only terminate upon
 * {@code shutdownNow}, or after setting the policy to
 * {@code false} when already shutdown.
 * This value is by default {@code true}.
 *
 * @param value if {@code true}, execute after shutdown, else don't
 * @see #getExecuteExistingDelayedTasksAfterShutdownPolicy
 */
public void setExecuteExistingDelayedTasksAfterShutdownPolicy(boolean value) {
  executeExistingDelayedTasksAfterShutdown = value;
  if (!value && isShutdown())
    onShutdown();
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

/**
 * Sets the policy on whether to execute existing delayed
 * tasks even when this executor has been {@code shutdown}.
 * In this case, these tasks will only terminate upon
 * {@code shutdownNow}, or after setting the policy to
 * {@code false} when already shutdown.
 * This value is by default {@code true}.
 *
 * @param value if {@code true}, execute after shutdown, else don't
 * @see #getExecuteExistingDelayedTasksAfterShutdownPolicy
 */
public void setExecuteExistingDelayedTasksAfterShutdownPolicy(boolean value) {
  executeExistingDelayedTasksAfterShutdown = value;
  if (!value && isShutdown())
    onShutdown();
}

代码示例来源:origin: org.apidesign.bck2brwsr/emul

/**
 * Sets the policy on whether to continue executing existing
 * periodic tasks even when this executor has been {@code shutdown}.
 * In this case, these tasks will only terminate upon
 * {@code shutdownNow} or after setting the policy to
 * {@code false} when already shutdown.
 * This value is by default {@code false}.
 *
 * @param value if {@code true}, continue after shutdown, else don't.
 * @see #getContinueExistingPeriodicTasksAfterShutdownPolicy
 */
public void setContinueExistingPeriodicTasksAfterShutdownPolicy(boolean value) {
  continueExistingPeriodicTasksAfterShutdown = value;
  if (!value && isShutdown())
    onShutdown();
}

代码示例来源:origin: ibinti/bugvm

/**
 * Sets the policy on whether to continue executing existing
 * periodic tasks even when this executor has been {@code shutdown}.
 * In this case, these tasks will only terminate upon
 * {@code shutdownNow} or after setting the policy to
 * {@code false} when already shutdown.
 * This value is by default {@code false}.
 *
 * @param value if {@code true}, continue after shutdown, else don't
 * @see #getContinueExistingPeriodicTasksAfterShutdownPolicy
 */
public void setContinueExistingPeriodicTasksAfterShutdownPolicy(boolean value) {
  continueExistingPeriodicTasksAfterShutdown = value;
  if (!value && isShutdown())
    onShutdown();
}

代码示例来源:origin: jtulach/bck2brwsr

/**
 * Sets the policy on whether to execute existing delayed
 * tasks even when this executor has been {@code shutdown}.
 * In this case, these tasks will only terminate upon
 * {@code shutdownNow}, or after setting the policy to
 * {@code false} when already shutdown.
 * This value is by default {@code true}.
 *
 * @param value if {@code true}, execute after shutdown, else don't.
 * @see #getExecuteExistingDelayedTasksAfterShutdownPolicy
 */
public void setExecuteExistingDelayedTasksAfterShutdownPolicy(boolean value) {
  executeExistingDelayedTasksAfterShutdown = value;
  if (!value && isShutdown())
    onShutdown();
}

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * Sets the policy on whether to continue executing existing
 * periodic tasks even when this executor has been {@code shutdown}.
 * In this case, these tasks will only terminate upon
 * {@code shutdownNow} or after setting the policy to
 * {@code false} when already shutdown.
 * This value is by default {@code false}.
 *
 * @param value if {@code true}, continue after shutdown, else don't
 * @see #getContinueExistingPeriodicTasksAfterShutdownPolicy
 */
public void setContinueExistingPeriodicTasksAfterShutdownPolicy(boolean value) {
  continueExistingPeriodicTasksAfterShutdown = value;
  if (!value && isShutdown())
    onShutdown();
}

代码示例来源:origin: org.apidesign.bck2brwsr/emul

/**
 * Sets the policy on whether to execute existing delayed
 * tasks even when this executor has been {@code shutdown}.
 * In this case, these tasks will only terminate upon
 * {@code shutdownNow}, or after setting the policy to
 * {@code false} when already shutdown.
 * This value is by default {@code true}.
 *
 * @param value if {@code true}, execute after shutdown, else don't.
 * @see #getExecuteExistingDelayedTasksAfterShutdownPolicy
 */
public void setExecuteExistingDelayedTasksAfterShutdownPolicy(boolean value) {
  executeExistingDelayedTasksAfterShutdown = value;
  if (!value && isShutdown())
    onShutdown();
}

代码示例来源:origin: org.codehaus.jsr166-mirror/jsr166

/**
 * Sets the policy on whether to continue executing existing
 * periodic tasks even when this executor has been {@code shutdown}.
 * In this case, these tasks will only terminate upon
 * {@code shutdownNow} or after setting the policy to
 * {@code false} when already shutdown.
 * This value is by default {@code false}.
 *
 * @param value if {@code true}, continue after shutdown, else don't.
 * @see #getContinueExistingPeriodicTasksAfterShutdownPolicy
 */
public void setContinueExistingPeriodicTasksAfterShutdownPolicy(boolean value) {
  continueExistingPeriodicTasksAfterShutdown = value;
  if (!value && isShutdown())
    onShutdown();
}

代码示例来源:origin: org.codehaus.jsr166-mirror/jsr166

/**
 * Sets the policy on whether to execute existing delayed
 * tasks even when this executor has been {@code shutdown}.
 * In this case, these tasks will only terminate upon
 * {@code shutdownNow}, or after setting the policy to
 * {@code false} when already shutdown.
 * This value is by default {@code true}.
 *
 * @param value if {@code true}, execute after shutdown, else don't.
 * @see #getExecuteExistingDelayedTasksAfterShutdownPolicy
 */
public void setExecuteExistingDelayedTasksAfterShutdownPolicy(boolean value) {
  executeExistingDelayedTasksAfterShutdown = value;
  if (!value && isShutdown())
    onShutdown();
}

代码示例来源:origin: jtulach/bck2brwsr

/**
 * Sets the policy on whether to continue executing existing
 * periodic tasks even when this executor has been {@code shutdown}.
 * In this case, these tasks will only terminate upon
 * {@code shutdownNow} or after setting the policy to
 * {@code false} when already shutdown.
 * This value is by default {@code false}.
 *
 * @param value if {@code true}, continue after shutdown, else don't.
 * @see #getContinueExistingPeriodicTasksAfterShutdownPolicy
 */
public void setContinueExistingPeriodicTasksAfterShutdownPolicy(boolean value) {
  continueExistingPeriodicTasksAfterShutdown = value;
  if (!value && isShutdown())
    onShutdown();
}

相关文章

微信公众号

最新文章

更多

ScheduledThreadPoolExecutor类方法