protected static class TimeScheduler3.Task
extends java.lang.Object
implements java.lang.Runnable, java.util.concurrent.Delayed, java.util.concurrent.Future
限定符和类型 | 字段和说明 |
---|---|
protected boolean |
cancelled |
protected boolean |
done |
protected long |
execution_time |
protected java.lang.Runnable |
runnable |
构造器和说明 |
---|
TimeScheduler3.Task(java.lang.Runnable runnable) |
TimeScheduler3.Task(java.lang.Runnable runnable,
long initial_delay,
java.util.concurrent.TimeUnit unit) |
限定符和类型 | 方法和说明 |
---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
int |
compareTo(java.util.concurrent.Delayed o) |
java.lang.Object |
get() |
java.lang.Object |
get(long timeout,
java.util.concurrent.TimeUnit unit) |
long |
getDelay(java.util.concurrent.TimeUnit unit) |
java.lang.Runnable |
getRunnable() |
boolean |
isCancelled() |
boolean |
isDone() |
void |
run() |
java.lang.String |
toString() |
protected final java.lang.Runnable runnable
protected long execution_time
protected volatile boolean cancelled
protected volatile boolean done
public TimeScheduler3.Task(java.lang.Runnable runnable)
public TimeScheduler3.Task(java.lang.Runnable runnable, long initial_delay, java.util.concurrent.TimeUnit unit)
public java.lang.Runnable getRunnable()
public int compareTo(java.util.concurrent.Delayed o)
compareTo
在接口中 java.lang.Comparable<java.util.concurrent.Delayed>
public long getDelay(java.util.concurrent.TimeUnit unit)
getDelay
在接口中 java.util.concurrent.Delayed
public boolean cancel(boolean mayInterruptIfRunning)
cancel
在接口中 java.util.concurrent.Future
public boolean isCancelled()
isCancelled
在接口中 java.util.concurrent.Future
public boolean isDone()
isDone
在接口中 java.util.concurrent.Future
public java.lang.Object get() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
get
在接口中 java.util.concurrent.Future
java.lang.InterruptedException
java.util.concurrent.ExecutionException
public java.lang.Object get(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException
get
在接口中 java.util.concurrent.Future
java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.util.concurrent.TimeoutException
public void run()
run
在接口中 java.lang.Runnable
public java.lang.String toString()
toString
在类中 java.lang.Object