Class ScheduleAutoConfiguration
- java.lang.Object
-
- tech.cassandre.trading.bot.util.base.Base
-
- tech.cassandre.trading.bot.util.base.configuration.BaseConfiguration
-
- tech.cassandre.trading.bot.configuration.ScheduleAutoConfiguration
-
@Configuration @Profile("!schedule-disabled") @EnableScheduling public class ScheduleAutoConfiguration extends BaseConfiguration
ScheduleAutoConfiguration configures the flux calls.
-
-
Field Summary
-
Fields inherited from class tech.cassandre.trading.bot.util.base.Base
accountMapper, currencyMapper, logger, orderMapper, positionMapper, strategyMapper, tickerMapper, tradeMapper, utilMapper
-
-
Constructor Summary
Constructors Constructor Description ScheduleAutoConfiguration(AccountFlux accountFlux, TickerFlux tickerFlux, OrderFlux orderFlux, TradeFlux tradeFlux)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accountFluxUpdate()
Recurrent calls the account flux.void
shutdown()
This method is called before the application shutdown.org.springframework.scheduling.TaskScheduler
taskScheduler()
Configure the task scheduler.void
tickerFluxUpdate()
Recurrent calls the ticker flux.void
tradeFluxUpdate()
Recurrent calls the order/trade flux.
-
-
-
Constructor Detail
-
ScheduleAutoConfiguration
public ScheduleAutoConfiguration(AccountFlux accountFlux, TickerFlux tickerFlux, OrderFlux orderFlux, TradeFlux tradeFlux)
-
-
Method Detail
-
taskScheduler
@Bean public org.springframework.scheduling.TaskScheduler taskScheduler()
Configure the task scheduler.- Returns:
- task scheduler
-
accountFluxUpdate
@Scheduled(initialDelay=1000L, fixedDelay=1L) public void accountFluxUpdate()
Recurrent calls the account flux.
-
tickerFluxUpdate
@Scheduled(initialDelay=1000L, fixedDelay=1L) public void tickerFluxUpdate()
Recurrent calls the ticker flux.
-
tradeFluxUpdate
@Scheduled(initialDelay=1000L, fixedDelay=1L) public void tradeFluxUpdate()
Recurrent calls the order/trade flux.
-
shutdown
@PreDestroy public void shutdown()
This method is called before the application shutdown. We stop the flux.
-
-