@Deprecated public class Timeout extends Object
The nested class Task should be extended by users of this class to obtain call back notification of expires.
Modifier and Type | Class and Description |
---|---|
static class |
Timeout.Task
Deprecated.
Task.
|
Constructor and Description |
---|
Timeout()
Deprecated.
|
Timeout(Object lock)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
cancelAll()
Deprecated.
|
Timeout.Task |
expired()
Deprecated.
Get an expired tasks.
|
long |
getDuration()
Deprecated.
|
long |
getNow()
Deprecated.
|
long |
getTimeToNext()
Deprecated.
|
boolean |
isEmpty()
Deprecated.
|
void |
schedule(Timeout.Task task)
Deprecated.
|
void |
schedule(Timeout.Task task,
long delay)
Deprecated.
|
void |
setDuration(long duration)
Deprecated.
|
long |
setNow()
Deprecated.
|
void |
setNow(long now)
Deprecated.
|
void |
tick()
Deprecated.
|
void |
tick(long now)
Deprecated.
|
String |
toString()
Deprecated.
|
public Timeout()
public Timeout(Object lock)
public long getDuration()
public void setDuration(long duration)
duration
- The duration to set.public long setNow()
public long getNow()
public void setNow(long now)
public Timeout.Task expired()
tick()
to obtain the next
expired Task, but without calling it's Timeout.Task.expire()
or
Timeout.Task.expired()
methods.public void tick()
public void tick(long now)
public void schedule(Timeout.Task task)
public void schedule(Timeout.Task task, long delay)
task
- delay
- A delay in addition to the default duration of the timeoutpublic void cancelAll()
public boolean isEmpty()
public long getTimeToNext()
Copyright © 1995-2013 Mort Bay Consulting. All Rights Reserved.