Class ZTicket.Ticket

java.lang.Object
org.zeromq.timer.ZTicket.Ticket
All Implemented Interfaces:
Comparable<ZTicket.Ticket>
Enclosing class:
ZTicket

public static final class ZTicket.Ticket extends Object implements Comparable<ZTicket.Ticket>
Opaque representation of a ticket.
  • Field Details

    • parent

      private final ZTicket parent
    • handler

      private final TimerHandler handler
    • args

      private final Object[] args
    • start

      private long start
    • delay

      private long delay
    • alive

      private boolean alive
  • Constructor Details

  • 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

      public int compareTo(ZTicket.Ticket other)
      Specified by:
      compareTo in interface Comparable<ZTicket.Ticket>