Package tech.cassandre.trading.bot.batch
Class TradeFlux
- java.lang.Object
-
- tech.cassandre.trading.bot.util.base.Base
-
- tech.cassandre.trading.bot.util.base.batch.BaseFlux<T>
-
- tech.cassandre.trading.bot.util.base.batch.BaseExternalFlux<TradeDTO>
-
- tech.cassandre.trading.bot.batch.TradeFlux
-
public class TradeFlux extends BaseExternalFlux<TradeDTO>
Trade flux - pushTradeDTO
.
-
-
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 TradeFlux(TradeService newTradeService, OrderRepository newOrderRepository, TradeRepository newTradeRepository)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Set<TradeDTO>
getNewValues()
Implements this method to return all the new values.Optional<TradeDTO>
saveValue(TradeDTO newValue)
Implements this method to backup each update.-
Methods inherited from class tech.cassandre.trading.bot.util.base.batch.BaseExternalFlux
update
-
Methods inherited from class tech.cassandre.trading.bot.util.base.batch.BaseFlux
emitValue, getFlux, getOverflowStrategy
-
-
-
-
Constructor Detail
-
TradeFlux
public TradeFlux(TradeService newTradeService, OrderRepository newOrderRepository, TradeRepository newTradeRepository)
Constructor.- Parameters:
newTradeService
- trade servicenewOrderRepository
- order repositorynewTradeRepository
- trade repository
-
-
Method Detail
-
getNewValues
protected final Set<TradeDTO> getNewValues()
Description copied from class:BaseExternalFlux
Implements this method to return all the new values. Those values will be sent to the strategy.- Specified by:
getNewValues
in classBaseExternalFlux<TradeDTO>
- Returns:
- list of new values
-
-