Java & Executor & RunnableScheduledFuture & 源码

前言


 相关系列

 涉及内容

源码


/*
 * 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();

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

说淑人

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值