Class BaseFlux<T>
- java.lang.Object
-
- tech.cassandre.trading.bot.util.base.Base
-
- tech.cassandre.trading.bot.util.base.BaseFlux<T>
-
- Type Parameters:
T
- Event type
- Direct Known Subclasses:
AccountFlux
,OrderFlux
,TickerFlux
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 protected void
emitValue(T newValue)
Emit a new value.reactor.core.publisher.Flux<T>
getFlux()
Getter 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()
This method is called 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 send to the strategy.- Returns:
- list of new values
-
emitValue
protected void emitValue(T newValue)
Emit a new value.- Parameters:
newValue
- new value
-
update
public final void update()
This method is called when values must be updated (usually called by the Scheduler).
-
getFlux
public final reactor.core.publisher.Flux<T> getFlux()
Getter flux.- Returns:
- flux
-
-