Class BaseFlux<T>
- java.lang.Object
-
- tech.cassandre.trading.bot.util.base.Base
-
- tech.cassandre.trading.bot.util.base.batch.BaseFlux<T>
-
- Type Parameters:
T
- flux
- Direct Known Subclasses:
BaseExternalFlux
,BaseInternalFlux
public abstract class BaseFlux<T> extends Base
Base flux.
-
-
Field Summary
Fields Modifier and Type Field Description protected reactor.core.publisher.Flux<T>
flux
Flux.protected reactor.core.publisher.FluxSink<T>
fluxSink
Flux sink.-
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 BaseFlux()
Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
emitValue(T newValue)
Emit a new value.reactor.core.publisher.Flux<T>
getFlux()
Getter for flux.protected reactor.core.publisher.FluxSink.OverflowStrategy
getOverflowStrategy()
Set the default overflow strategy - override to change it.protected abstract Optional<T>
saveValue(T newValue)
Implements this method to backup each update.
-
-
-
Method Detail
-
getOverflowStrategy
protected reactor.core.publisher.FluxSink.OverflowStrategy getOverflowStrategy()
Set the default overflow strategy - override to change it.- Returns:
- overflow strategy
-
saveValue
protected abstract Optional<T> saveValue(T newValue)
Implements this method to backup each update.- Parameters:
newValue
- new value- Returns:
- the value saved
-
emitValue
public void emitValue(T newValue)
Emit a new value.- Parameters:
newValue
- new value
-
getFlux
public reactor.core.publisher.Flux<T> getFlux()
Getter for flux.- Returns:
- flux
-
-