Class Pollers

java.lang.Object
org.springframework.integration.dsl.Pollers

public final class Pollers extends Object
A utility class to provide PollerSpecs for PollerMetadata configuration variants.
Since:
5.0
Author:
Artem Bilan, Gary Russell
  • Method Details

    • fixedRate

      public static PollerSpec fixedRate(long period)
      Create a PollerSpec based on the provided fixed rate period. The "fixed rate" means that periodic interval should be measured between the scheduled start times rather than between actual completion times.
      Parameters:
      period - the fixed rate period (in milliseconds) to use.
      Returns:
      the PollerSpec
      See Also:
    • fixedRate

      public static PollerSpec fixedRate(Duration period)
      Create a PollerSpec based on the provided fixed rate period. The "fixed rate" means that periodic interval should be measured between the scheduled start times rather than between actual completion times.
      Parameters:
      period - the fixed rate period to use.
      Returns:
      the PollerSpec
      See Also:
    • fixedRate

      @Deprecated(forRemoval=true) public static PollerSpec fixedRate(long period, TimeUnit timeUnit)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 6.0 in favor of fixedRate(Duration)
      Create a PollerSpec based on the provided fixed rate period. The "fixed rate" means that periodic interval should be measured between the scheduled start times rather than between actual completion times.
      Parameters:
      period - the fixed rate period to use.
      timeUnit - the TimeUnit to use.
      Returns:
      the PollerSpec
      See Also:
    • fixedRate

      public static PollerSpec fixedRate(Duration period, Duration initialDelay)
      Create a PollerSpec based on the provided fixed rate period and initial delay. The "fixed rate" means that periodic interval should be measured between the scheduled start times rather than between actual completion times.
      Parameters:
      period - the fixed rate period to use.
      initialDelay - the initial delay to use.
      Returns:
      the PollerSpec
      See Also:
    • fixedRate

      public static PollerSpec fixedRate(long period, long initialDelay)
      Create a PollerSpec based on the provided fixed rate period and initial delay. The "fixed rate" means that periodic interval should be measured between the scheduled start times rather than between actual completion times.
      Parameters:
      period - the fixed rate period to use.
      initialDelay - the initial delay to use.
      Returns:
      the PollerSpec
      See Also:
    • fixedRate

      @Deprecated(forRemoval=true) public static PollerSpec fixedRate(long period, TimeUnit timeUnit, long initialDelay)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 6.0 in favor of fixedRate(Duration, Duration)
      Create a PollerSpec based on the provided fixed rate period and initial delay. The "fixed rate" means that periodic interval should be measured between the scheduled start times rather than between actual completion times.
      Parameters:
      period - the fixed rate period to use.
      timeUnit - the TimeUnit to use.
      initialDelay - the initial delay to use.
      Returns:
      the PollerSpec
      See Also:
    • fixedDelay

      public static PollerSpec fixedDelay(Duration period)
      Create a PollerSpec based on the provided fixed delay period. The "fixed delay" means that periodic interval should be measured between the scheduled tasks actual completion times.
      Parameters:
      period - the fixed delay period to use.
      Returns:
      the PollerSpec
      See Also:
    • fixedDelay

      public static PollerSpec fixedDelay(long period)
      Create a PollerSpec based on the provided fixed delay period. The "fixed delay" means that periodic interval should be measured between the scheduled tasks actual completion times.
      Parameters:
      period - the fixed delay period to use.
      Returns:
      the PollerSpec
      See Also:
    • fixedDelay

      public static PollerSpec fixedDelay(Duration period, Duration initialDelay)
      Create a PollerSpec based on the provided fixed delay period and initial delay. The "fixed delay" means that periodic interval should be measured between the scheduled tasks actual completion times.
      Parameters:
      period - the fixed delay period to use.
      initialDelay - the initial delay to use.
      Returns:
      the PollerSpec
      See Also:
    • fixedDelay

      @Deprecated(forRemoval=true) public static PollerSpec fixedDelay(long period, TimeUnit timeUnit)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 6.0 in favor of fixedDelay(Duration)
      Create a PollerSpec based on the provided fixed delay period. The "fixed delay" means that periodic interval should be measured between the scheduled tasks actual completion times.
      Parameters:
      period - the fixed delay period to use.
      timeUnit - the TimeUnit to use.
      Returns:
      the PollerSpec
      See Also:
    • fixedDelay

      public static PollerSpec fixedDelay(long period, long initialDelay)
      Create a PollerSpec based on the provided fixed delay period and initial delay. The "fixed delay" means that periodic interval should be measured between the scheduled tasks actual completion times.
      Parameters:
      period - the fixed delay period to use.
      initialDelay - the initial delay to use.
      Returns:
      the PollerSpec
      See Also:
    • fixedDelay

      @Deprecated(forRemoval=true) public static PollerSpec fixedDelay(long period, TimeUnit timeUnit, long initialDelay)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 6.0 in favor of fixedDelay(Duration, Duration)
      Create a PollerSpec based on the provided fixed delay period and initial delay. The "fixed delay" means that periodic interval should be measured between the scheduled tasks actual completion times.
      Parameters:
      period - the fixed delay period to use.
      timeUnit - the TimeUnit to use.
      initialDelay - the initial delay to use.
      Returns:
      the PollerSpec
      See Also:
    • cron

      public static PollerSpec cron(String cronExpression)
      Create a PollerSpec based on the provided cron expression.
      Parameters:
      cronExpression - the cron to use.
      Returns:
      the PollerSpec
      See Also:
    • cron

      public static PollerSpec cron(String cronExpression, TimeZone timeZone)
      Create a PollerSpec based on the provided cron expression and TimeZone.
      Parameters:
      cronExpression - the cron to use.
      timeZone - the TimeZone to use.
      Returns:
      the PollerSpec
      See Also:
    • trigger

      public static PollerSpec trigger(Trigger trigger)
      Create a PollerSpec based on the provided Trigger.
      Parameters:
      trigger - the Trigger to use.
      Returns:
      the PollerSpec
      See Also: