Delayed
public interface Delayed
implements Comparable<Delayed>
java.util.concurrent.Delayed |
Known Indirect Subclasses
|
混合式界面用于标记在给定延迟后应该执行的对象。
该接口的实现必须定义一个 compareTo
方法,该方法提供与其 getDelay
方法一致的排序。
摘要(Summary)
公共方法(Public methods) |
abstract long |
getDelay(TimeUnit unit) 以给定的时间单位返回与此对象关联的剩余延迟。 |
公共方法(Public methods)
getDelay
long getDelay (TimeUnit unit)
以给定的时间单位返回与此对象关联的剩余延迟。
参数(Parameters) |
unit |
TimeUnit : the time unit |
返回(Returns) |
long |
the remaining delay; zero or negative values indicate that the delay has already elapsed |