Package org.zeromq.timer
Class ZTicket.Ticket
java.lang.Object
org.zeromq.timer.ZTicket.Ticket
- All Implemented Interfaces:
Comparable<ZTicket.Ticket>
- Enclosing class:
ZTicket
Opaque representation of a ticket.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Ticket
(ZTicket parent, long now, long delay, TimerHandler handler, Object... args) -
Method Summary
Modifier and TypeMethodDescriptionboolean
cancel()
Cancels a ticket.int
compareTo
(ZTicket.Ticket other) void
reset()
Resets the ticket.void
setDelay
(long delay) Changes the delay of the ticket.
-
Field Details
-
parent
-
handler
-
args
-
start
private long start -
delay
private long delay -
alive
private boolean alive
-
-
Constructor Details
-
Ticket
-
-
Method Details
-
reset
public void reset()Resets the ticket. -
cancel
public boolean cancel()Cancels a ticket.- Returns:
- true if cancelled, false if already cancelled.
-
setDelay
public void setDelay(long delay) Changes the delay of the ticket.- Parameters:
delay
- the new delay of the ticket.
-
compareTo
- Specified by:
compareTo
in interfaceComparable<ZTicket.Ticket>
-