protected static class HashedTimingWheel.MyTask
extends java.lang.Object
implements java.util.concurrent.Future, java.lang.Runnable
Modifier and Type | Field and Description |
---|---|
protected boolean |
cancelled |
protected boolean |
done |
protected HashedTimingWheel.MyTask |
next |
protected int |
round |
protected java.lang.Runnable |
task |
Constructor and Description |
---|
MyTask(java.lang.Runnable task,
int round) |
Modifier and Type | Method and Description |
---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
java.lang.Object |
get() |
java.lang.Object |
get(long timeout,
java.util.concurrent.TimeUnit unit) |
int |
getAndDecrementRound() |
int |
getRound() |
boolean |
isCancelled() |
boolean |
isDone() |
void |
run() |
void |
setRound(int round) |
java.lang.String |
toString() |
protected final java.lang.Runnable task
protected volatile boolean cancelled
protected volatile boolean done
protected HashedTimingWheel.MyTask next
protected int round
public int getRound()
public int getAndDecrementRound()
public void setRound(int round)
public boolean cancel(boolean mayInterruptIfRunning)
cancel
in interface java.util.concurrent.Future
public boolean isCancelled()
isCancelled
in interface java.util.concurrent.Future
public boolean isDone()
isDone
in interface java.util.concurrent.Future
public java.lang.Object get() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
get
in interface 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
in interface java.util.concurrent.Future
java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.util.concurrent.TimeoutException
public void run()
run
in interface java.lang.Runnable
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 1998-2020 Red Hat. All Rights Reserved.