Class BaseFlux<T>
- java.lang.Object
-
- tech.cassandre.trading.bot.util.base.Base
-
- tech.cassandre.trading.bot.util.base.BaseFlux<T>
-
- Type Parameters:
T
- flux type
- Direct Known Subclasses:
AccountFlux
,OrderFlux
,PositionFlux
,TickerFlux
,TradeFlux
public abstract class BaseFlux<T> extends Base
Base flux.
-
-
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 abstract Set<T>
getNewValues()
Implements this method to return all the new values.protected reactor.core.publisher.FluxSink.OverflowStrategy
getOverflowStrategy()
Set the default overflow strategy - override to change it.void
update()
Method executed when values must be updated (usually called by the Scheduler).
-
-
-
Method Detail
-
getOverflowStrategy
protected reactor.core.publisher.FluxSink.OverflowStrategy getOverflowStrategy()
Set the default overflow strategy - override to change it.- Returns:
- overflow strategy
-
getNewValues
protected abstract Set<T> getNewValues()
Implements this method to return all the new values. Those values will be sent to the strategy.- Returns:
- list of new values
-
emitValue
public void emitValue(T newValue)
Emit a new value.- Parameters:
newValue
- new value
-
update
public final void update()
Method executed when values must be updated (usually called by the Scheduler).
-
getFlux
public final reactor.core.publisher.Flux<T> getFlux()
Getter for flux.- Returns:
- flux
-
-