|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.co.mmscomputing.concurrent.Semaphore
uk.co.mmscomputing.concurrent.Timer
public class Timer
| Field Summary | |
|---|---|
protected int |
delay
|
protected TimerListener |
listener
|
protected int |
timeout
|
| Constructor Summary | |
|---|---|
Timer(int timeout)
|
|
| Method Summary | |
|---|---|
void |
acquire()
|
void |
setDelay(int td)
|
void |
setListener(TimerListener listener)
|
boolean |
tryAcquire(long timeout,
TimeUnit unit)
|
| Methods inherited from class uk.co.mmscomputing.concurrent.Semaphore |
|---|
availablePermits, isFair, release, release |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int timeout
protected int delay
protected TimerListener listener
| Constructor Detail |
|---|
public Timer(int timeout)
| Method Detail |
|---|
public void setDelay(int td)
public void setListener(TimerListener listener)
public void acquire()
throws java.lang.InterruptedException
acquire in class Semaphorejava.lang.InterruptedException
public boolean tryAcquire(long timeout,
TimeUnit unit)
throws java.lang.InterruptedException
tryAcquire in class Semaphorejava.lang.InterruptedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||