public static final class ZTicket.Ticket extends java.lang.Object implements java.lang.Comparable<ZTicket.Ticket>
Modifier and Type | Field and Description |
---|---|
private boolean |
alive |
private java.lang.Object[] |
args |
private long |
delay |
private TimerHandler |
handler |
private ZTicket |
parent |
private long |
start |
Modifier | Constructor and Description |
---|---|
private |
Ticket(ZTicket parent,
long now,
long delay,
TimerHandler handler,
java.lang.Object... args) |
Modifier and Type | Method and Description |
---|---|
boolean |
cancel()
Cancels a ticket.
|
int |
compareTo(ZTicket.Ticket other) |
void |
reset()
Resets the ticket.
|
void |
setDelay(long delay)
Changes the delay of the ticket.
|
private final ZTicket parent
private final TimerHandler handler
private final java.lang.Object[] args
private long start
private long delay
private boolean alive
private Ticket(ZTicket parent, long now, long delay, TimerHandler handler, java.lang.Object... args)
public void reset()
public boolean cancel()
public void setDelay(long delay)
delay
- the new delay of the ticket.public int compareTo(ZTicket.Ticket other)
compareTo
in interface java.lang.Comparable<ZTicket.Ticket>