Class Timer

java.lang.Object
io.vertx.mutiny.core.Timer
All Implemented Interfaces:
MutinyDelegate

public class Timer extends Object implements MutinyDelegate
A timer task that can be used as a future. The future is completed when the timeout expires, when the task is cancelled the future is failed with a CancellationException.

NOTE: This class has been automatically generated from the original non Mutiny-ified interface.

Author:
Julien Viet
See Also:
  • Timer
  • Field Details

    • __TYPE_ARG

      public static final TypeArg<Timer> __TYPE_ARG
  • Constructor Details

    • Timer

      public Timer(io.vertx.core.Timer delegate)
      Create a new instance of Timer delegating to the given (non-null) instance of Timer.
    • Timer

      public Timer(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.core.Timer getDelegate()
      Get the delegate instance.

      This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.

      Specified by:
      getDelegate in interface MutinyDelegate
      Returns:
      the delegate instance
    • cancel

      public boolean cancel()
      Attempt to cancel the timer task, when the timer is cancelled, the timer is failed with a CancellationException.
      Returns:
      true when the future was cancelled and the timeout didn't fire.
    • getDelay

      public long getDelay(TimeUnit unit)
    • compareTo

      public int compareTo(Delayed o)
    • newInstance

      public static Timer newInstance(io.vertx.core.Timer delegate)
      Creates a new instance of the Timer.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object