Class Pollers
java.lang.Object
org.springframework.integration.dsl.Pollers
A utility class to provide
PollerSpec
s for
PollerMetadata
configuration
variants.- Since:
- 5.0
- Author:
- Artem Bilan, Gary Russell
-
Method Summary
Modifier and TypeMethodDescriptionstatic PollerSpec
Create aPollerSpec
based on the provided cron expression.static PollerSpec
Create aPollerSpec
based on the provided cron expression andTimeZone
.static PollerSpec
fixedDelay
(long period) Create aPollerSpec
based on the provided fixed delay period.static PollerSpec
fixedDelay
(long period, long initialDelay) Create aPollerSpec
based on the provided fixed delay period and initial delay.static PollerSpec
fixedDelay
(long period, TimeUnit timeUnit) Deprecated, for removal: This API element is subject to removal in a future version.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 offixedDelay(Duration, Duration)
static PollerSpec
fixedDelay
(Duration period) Create aPollerSpec
based on the provided fixed delay period.static PollerSpec
fixedDelay
(Duration period, Duration initialDelay) Create aPollerSpec
based on the provided fixed delay period and initial delay.static PollerSpec
fixedRate
(long period) Create aPollerSpec
based on the provided fixed rate period.static PollerSpec
fixedRate
(long period, long initialDelay) Create aPollerSpec
based on the provided fixed rate period and initial delay.static PollerSpec
Deprecated, for removal: This API element is subject to removal in a future version.since 6.0 in favor offixedRate(Duration)
static PollerSpec
Deprecated, for removal: This API element is subject to removal in a future version.since 6.0 in favor offixedRate(Duration, Duration)
static PollerSpec
Create aPollerSpec
based on the provided fixed rate period.static PollerSpec
Create aPollerSpec
based on the provided fixed rate period and initial delay.static PollerSpec
Create aPollerSpec
based on the providedTrigger
.
-
Method Details
-
fixedRate
Create aPollerSpec
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
Create aPollerSpec
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, for removal: This API element is subject to removal in a future version.since 6.0 in favor offixedRate(Duration)
Create aPollerSpec
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
- theTimeUnit
to use.- Returns:
- the
PollerSpec
- See Also:
-
fixedRate
Create aPollerSpec
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
Create aPollerSpec
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 offixedRate(Duration, Duration)
Create aPollerSpec
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
- theTimeUnit
to use.initialDelay
- the initial delay to use.- Returns:
- the
PollerSpec
- See Also:
-
fixedDelay
Create aPollerSpec
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
Create aPollerSpec
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
Create aPollerSpec
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, for removal: This API element is subject to removal in a future version.since 6.0 in favor offixedDelay(Duration)
Create aPollerSpec
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
- theTimeUnit
to use.- Returns:
- the
PollerSpec
- See Also:
-
fixedDelay
Create aPollerSpec
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 offixedDelay(Duration, Duration)
Create aPollerSpec
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
- theTimeUnit
to use.initialDelay
- the initial delay to use.- Returns:
- the
PollerSpec
- See Also:
-
cron
Create aPollerSpec
based on the provided cron expression.- Parameters:
cronExpression
- the cron to use.- Returns:
- the
PollerSpec
- See Also:
-
cron
Create aPollerSpec
based on the provided cron expression andTimeZone
.- Parameters:
cronExpression
- the cron to use.timeZone
- theTimeZone
to use.- Returns:
- the
PollerSpec
- See Also:
-
trigger
Create aPollerSpec
based on the providedTrigger
.- Parameters:
trigger
- theTrigger
to use.- Returns:
- the
PollerSpec
- See Also:
-
fixedDelay(Duration)