Package org.drasyl.node.behaviour
Class Behaviors.EventScheduler
java.lang.Object
org.drasyl.node.behaviour.Behaviors.EventScheduler
- Enclosing class:
- Behaviors
-
Method Summary
Modifier and TypeMethodDescriptionio.netty.util.concurrent.Future<?>scheduleEvent(Event event) Schedules a self event.io.netty.util.concurrent.Future<?>scheduleEvent(Event event, Duration delay) Schedules a self event.io.netty.util.concurrent.Future<?>schedulePeriodicallyEvent(Event event, Duration initialDelay, Duration period) Schedules a self event.
-
Method Details
-
scheduleEvent
Schedules a self event.- Parameters:
event- event to scheduledelay- delay before emitting the event- Returns:
Futureallowing to cancel the scheduled event
-
scheduleEvent
Schedules a self event.- Parameters:
event- event to schedule- Returns:
Futureallowing 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 scheduleinitialDelay- the initial delay amount, non-positive values indicate non-delayed schedulingperiod- the period at which the event should be re-emitted- Returns:
Futureallowing to cancel the scheduled event
-