Class Behaviors.EventScheduler

java.lang.Object
org.drasyl.node.behaviour.Behaviors.EventScheduler
Enclosing class:
Behaviors

public static class Behaviors.EventScheduler extends Object
  • Method Details

    • scheduleEvent

      public io.netty.util.concurrent.Future<?> scheduleEvent(Event event, Duration delay)
      Schedules a self event.
      Parameters:
      event - event to schedule
      delay - delay before emitting the event
      Returns:
      Future allowing to cancel the scheduled event
    • scheduleEvent

      public io.netty.util.concurrent.Future<?> scheduleEvent(Event event)
      Schedules a self event.
      Parameters:
      event - event to schedule
      Returns:
      Future allowing to cancel the scheduled event
    • schedulePeriodicallyEvent

      public io.netty.util.concurrent.Future<?> schedulePeriodicallyEvent(Event event, Duration initialDelay, Duration period)
      Schedules a self event.
      Parameters:
      event - event to schedule
      initialDelay - the initial delay amount, non-positive values indicate non-delayed scheduling
      period - the period at which the event should be re-emitted
      Returns:
      Future allowing to cancel the scheduled event