Class OnlyOnceTrigger

java.lang.Object
org.springframework.integration.test.util.OnlyOnceTrigger
All Implemented Interfaces:
org.springframework.scheduling.Trigger

public class OnlyOnceTrigger extends Object implements org.springframework.scheduling.Trigger
The Trigger implementation which returns the current time to schedule the task immediately and does that only once.

The reset() method can be called to reuse this trigger from scratch.

The await() method can be used for synchronization barriers.

Since:
2.2
  • Constructor Details

    • OnlyOnceTrigger

      public OnlyOnceTrigger()
  • Method Details

    • nextExecution

      public Instant nextExecution(org.springframework.scheduling.TriggerContext triggerContext)
      Specified by:
      nextExecution in interface org.springframework.scheduling.Trigger
    • hashCode

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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • reset

      public void reset()
    • await

      public void await()