org.jgroups.util
Class HashedTimingWheel.MyTask
java.lang.Object
org.jgroups.util.HashedTimingWheel.MyTask
- All Implemented Interfaces:
- java.lang.Runnable, java.util.concurrent.Future
- Enclosing class:
- HashedTimingWheel
protected static class HashedTimingWheel.MyTask
- extends java.lang.Object
- implements java.util.concurrent.Future, java.lang.Runnable
Simple task wrapper, always executed by at most 1 thread.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
task
protected final java.lang.Runnable task
cancelled
protected volatile boolean cancelled
done
protected volatile boolean done
next
protected HashedTimingWheel.MyTask next
round
protected int round
HashedTimingWheel.MyTask
public HashedTimingWheel.MyTask(java.lang.Runnable task,
int round)
getRound
public int getRound()
getAndDecrementRound
public int getAndDecrementRound()
setRound
public void setRound(int round)
cancel
public boolean cancel(boolean mayInterruptIfRunning)
- Specified by:
cancel
in interface java.util.concurrent.Future
isCancelled
public boolean isCancelled()
- Specified by:
isCancelled
in interface java.util.concurrent.Future
isDone
public boolean isDone()
- Specified by:
isDone
in interface java.util.concurrent.Future
get
public java.lang.Object get()
throws java.lang.InterruptedException,
java.util.concurrent.ExecutionException
- Specified by:
get
in interface java.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 interface java.util.concurrent.Future
- Throws:
java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.util.concurrent.TimeoutException
run
public void run()
- Specified by:
run
in interface java.lang.Runnable
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 1998-2012 Bela Ban / Red Hat. All Rights Reserved.