Package tech.cassandre.trading.bot.batch
Class TradeFlux
- java.lang.Object
-
- tech.cassandre.trading.bot.util.base.Base
-
- tech.cassandre.trading.bot.util.base.BaseFlux<TradeDTO>
-
- tech.cassandre.trading.bot.batch.TradeFlux
-
-
Constructor Summary
Constructors Constructor Description TradeFlux(TradeService newTradeService, TradeRepository newTradeRepository)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
backupValue(TradeDTO newValue)
Implements this method to backup each update.protected Set<TradeDTO>
getNewValues()
Implements this method to return all the new values.void
restoreValues()
Implements this method to restore previous values.-
Methods inherited from class tech.cassandre.trading.bot.util.base.BaseFlux
emitValue, getFlux, getOverflowStrategy, update
-
-
-
-
Constructor Detail
-
TradeFlux
public TradeFlux(TradeService newTradeService, TradeRepository newTradeRepository)
Constructor.- Parameters:
newTradeService
- trade servicenewTradeRepository
- trade repository
-
-
Method Detail
-
getNewValues
protected final Set<TradeDTO> getNewValues()
Description copied from class:BaseFlux
Implements this method to return all the new values. Those values will be sent to the strategy.- Specified by:
getNewValues
in classBaseFlux<TradeDTO>
- Returns:
- list of new values
-
backupValue
public final void backupValue(TradeDTO newValue)
Description copied from class:BaseFlux
Implements this method to backup each update.- Overrides:
backupValue
in classBaseFlux<TradeDTO>
- Parameters:
newValue
- new value
-
restoreValues
public final void restoreValues()
Description copied from class:BaseFlux
Implements this method to restore previous values.- Overrides:
restoreValues
in classBaseFlux<TradeDTO>
-
-