Package org.jgroups.util
Class TimeScheduler3.Task
- java.lang.Object
-
- org.jgroups.util.TimeScheduler3.Task
-
- All Implemented Interfaces:
java.lang.Comparable<java.util.concurrent.Delayed>
,java.lang.Runnable
,java.util.concurrent.Delayed
,java.util.concurrent.Future
- Direct Known Subclasses:
TimeScheduler3.RecurringTask
- Enclosing class:
- TimeScheduler3
public static class TimeScheduler3.Task extends java.lang.Object implements java.lang.Runnable, java.util.concurrent.Delayed, java.util.concurrent.Future
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canBlock()
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()
-
-
-
Method Detail
-
getRunnable
public java.lang.Runnable getRunnable()
-
canBlock
public boolean canBlock()
-
compareTo
public int compareTo(java.util.concurrent.Delayed o)
- Specified by:
compareTo
in interfacejava.lang.Comparable<java.util.concurrent.Delayed>
-
getDelay
public long getDelay(java.util.concurrent.TimeUnit unit)
- Specified by:
getDelay
in interfacejava.util.concurrent.Delayed
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
- Specified by:
cancel
in interfacejava.util.concurrent.Future
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelled
in interfacejava.util.concurrent.Future
-
isDone
public boolean isDone()
- Specified by:
isDone
in interfacejava.util.concurrent.Future
-
get
public java.lang.Object get() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
- Specified by:
get
in interfacejava.util.concurrent.Future
- Throws:
java.lang.InterruptedException
java.util.concurrent.ExecutionException
-
get
public java.lang.Object get(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException
- Specified by:
get
in interfacejava.util.concurrent.Future
- Throws:
java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.util.concurrent.TimeoutException
-
run
public void run()
- Specified by:
run
in interfacejava.lang.Runnable
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-