use of org.springframework.scheduling.support.PeriodicTrigger in project tutorials by eugenp.
the class ThreadPoolTaskSchedulerConfig method periodicFixedDelayTrigger.
@Bean
public PeriodicTrigger periodicFixedDelayTrigger() {
PeriodicTrigger periodicTrigger = new PeriodicTrigger(2000, TimeUnit.MICROSECONDS);
periodicTrigger.setFixedRate(true);
periodicTrigger.setInitialDelay(1000);
return periodicTrigger;
}
use of org.springframework.scheduling.support.PeriodicTrigger in project paascloud-master by paascloud.
the class CustomPollerConfiguration method customPoller.
/**
* Custom poller poller metadata.
*
* @return the poller metadata
*/
@Bean(name = StreamSpanReporter.POLLER)
PollerMetadata customPoller() {
PollerMetadata poller = new PollerMetadata();
poller.setMaxMessagesPerPoll(500);
poller.setTrigger(new PeriodicTrigger(5000L));
return poller;
}
Aggregations