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 to the account flux.void
orderAndTradeFluxUpdate()
Recurrent calls to the order and trade flux.void
shutdown()
This method is called before the application shutdown.org.springframework.scheduling.TaskScheduler
taskScheduler()
Configure the task scheduler.void
tickerFluxUpdate()
Recurrent calls to the ticker 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 to the account flux.
-
tickerFluxUpdate
@Scheduled(initialDelay=1000L, fixedDelay=1L) public void tickerFluxUpdate()
Recurrent calls to the ticker flux.
-
orderAndTradeFluxUpdate
@Scheduled(initialDelay=1000L, fixedDelay=1L) public void orderAndTradeFluxUpdate()
Recurrent calls to the order and trade flux.
-
shutdown
@PreDestroy public void shutdown()
This method is called before the application shutdown. We stop the flux.
-
-