前言
相关系列
- 《Java & Executor & 目录》
- 《Java & Executor & RunnableScheduledFuture & 源码》
- 《Java & Executor & RunnableScheduledFuture & 总结》
- 《Java & Executor & RunnableScheduledFuture & 问题》
涉及内容
- 《Java & Executor & 总结》
- 《Java & Executor & RunnableFuture & 总结》
- 《Java & Executor & ScheduledFuture & 总结》
源码
/*
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
/*
*
*
*
*
*
* Written by Doug Lea with assistance from members of JCP JSR-166
* Expert Group and released to the public domain, as explained at
* http://creativecommons.org/publicdomain/zero/1.0/
*/
package juc;
/**
* A {@link ScheduledFuture} that is {@link Runnable}. Successful execution of the {@code run} method causes completion
* of the {@code Future} and allows access to its results.
* 一一个是可运行的计划未来。run()方法的成功执行会导致未来完成并且允许访问它的结果。
*
* @param <V> The result type returned by this Future's {@code get} method 通过未来的get()方法返回的结果类型
* @author Doug Lea
* @see FutureTask
* @see Executor
* @since 1.6
*/
public interface RunnableScheduledFuture<V> extends RunnableFuture<V>, ScheduledFuture<V> {
/**
* Returns {@code true} if this task is periodic. A periodic task may re-run according to some schedule. A non-periodic
* task can be run only once.
* 如果当前任务是周期性的则返回true。一个周期性的任务可能根据某些计划重复运行。一个非周期性的任务执行运行一次。
*
* @return {@code true} if this task is periodic 如果当前任务是周期性的则返回true。
* @Description: ------------------------------------------------------------- 名称 -------------------------------------------------------------
* @Description: 是否周期
* @Description: ------------------------------------------------------------- 作用 -------------------------------------------------------------
* @Description: 判断当前可运行计划未来是否允许周期性执行,是则返回true;否则返回false。
* @Description: ------------------------------------------------------------- 逻辑 -------------------------------------------------------------
* @Description: ~
* @Description: ------------------------------------------------------------- 注意 -------------------------------------------------------------
* @Description: ~
* @Description: ------------------------------------------------------------- 疑问 -------------------------------------------------------------
* @Description: ~
*/
boolean isPeriodic();
}