The nested class Task should be extended by users of this class to obtain call back notification of expiries.
| Modifier and Type | Class and Description |
|---|---|
| public static class | Timeout.Task
Task. |
| Modifier and Type | Field and Description |
|---|---|
| private long | |
| private Timeout. | |
| private Object | |
| private long |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public Timeout. | |
| public long | |
| public long | |
| public long | |
| public boolean | |
| public void | |
| public void | |
| public void | |
| public long | |
| public void | |
| public void | |
| public void | |
| public String |
| _duration | back to summary |
|---|---|
| private long _duration | |
| _head | back to summary |
|---|---|
| private Timeout. | |
| _lock | back to summary |
|---|---|
| private Object _lock | |
| _now | back to summary |
|---|---|
| private long _now | |
| Timeout | back to summary |
|---|---|
| public Timeout() | |
| Timeout | back to summary |
|---|---|
| public Timeout(Object lock) | |
| cancelAll | back to summary |
|---|---|
| public void cancelAll() | |
| expired | back to summary |
|---|---|
| public Timeout. Get an expired tasks.
This is called instead of | |
| getDuration | back to summary |
|---|---|
public long getDuration()
| |
| getNow | back to summary |
|---|---|
| public long getNow() | |
| getTimeToNext | back to summary |
|---|---|
| public long getTimeToNext() | |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() | |
| schedule | back to summary |
|---|---|
| public void schedule(Timeout. | |
| schedule | back to summary |
|---|---|
public void schedule(Timeout.
| |
| setDuration | back to summary |
|---|---|
public void setDuration(long duration)
| |
| setNow | back to summary |
|---|---|
| public long setNow() | |
| setNow | back to summary |
|---|---|
| public void setNow(long now) | |
| tick | back to summary |
|---|---|
| public void tick(long now) | |
| tick | back to summary |
|---|---|
| public void tick() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv long | |
| pack-priv boolean | |
| pack-priv Timeout. | |
| pack-priv Timeout. | |
| pack-priv Timeout | |
| pack-priv long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void | |
| public long | |
| public long | |
| public boolean | |
| public boolean | |
| private void | |
| public void | |
| public void | |
| public void | |
| private void |
| _delay | back to summary |
|---|---|
| pack-priv long _delay | |
| _expired | back to summary |
|---|---|
| pack-priv boolean _expired | |
| _next | back to summary |
|---|---|
| pack-priv Timeout. | |
| _prev | back to summary |
|---|---|
| pack-priv Timeout. | |
| _timeout | back to summary |
|---|---|
| pack-priv Timeout _timeout | |
| _timestamp | back to summary |
|---|---|
| pack-priv long _timestamp | |
| Task | back to summary |
|---|---|
| public Task() | |
| cancel | back to summary |
|---|---|
| public void cancel() Cancel the task. Remove the task from the timeout. | |
| expire | back to summary |
|---|---|
| public void expire() Expire task.
This method is called when the timeout expires. It is called
in the scope of the synchronize block (on this) that sets
the
| |
| expired | back to summary |
|---|---|
| public void expired() Expire task. This method is called when the timeout expires. It is called outside of any synchronization scope and may be delayed. | |
| getAge | back to summary |
|---|---|
| public long getAge() | |
| getTimestamp | back to summary |
|---|---|
| public long getTimestamp() | |
| isExpired | back to summary |
|---|---|
| public boolean isExpired() | |
| isScheduled | back to summary |
|---|---|
| public boolean isScheduled() | |
| link | back to summary |
|---|---|
| private void link(Timeout. | |
| reschedule | back to summary |
|---|---|
| public void reschedule() Reschedule the task on the current timeout. The task timeout is rescheduled as if it had been cancelled and scheduled on the current timeout. | |
| schedule | back to summary |
|---|---|
| public void schedule(Timeout timer) Schedule the task on the given timeout. The task exiry will be called after the timeout duration. | |
| schedule | back to summary |
|---|---|
| public void schedule(Timeout timer, long delay) Schedule the task on the given timeout. The task exiry will be called after the timeout duration. | |
| unlink | back to summary |
|---|---|
| private void unlink() | |