public class TimeTriggeredReloadable<T> extends Reloadable<T> implements Observer<java.time.Instant>
| Constructor and Description |
|---|
TimeTriggeredReloadable(T currentValue,
java.time.Duration checkInterval,
io.vavr.Function2<java.time.Instant,java.util.Optional<T>,TransformationResult<T>> transform) |
TimeTriggeredReloadable(T currentValue,
java.time.Instant currentTickValue,
java.time.Duration checkInterval,
io.vavr.Function2<java.time.Instant,java.util.Optional<T>,TransformationResult<T>> transform) |
| Modifier and Type | Method and Description |
|---|---|
void |
addParent(Observable<?> observable) |
protected void |
handleTimeTrigger(java.time.Instant now) |
void |
notifyChanged(java.time.Instant now) |
static TimeTriggeredReloadable<java.time.Instant> |
propagatingTicks(java.time.Instant currentTickValue,
java.time.Duration checkInterval) |
protected void |
updateCurrentValueWithTransformed(java.time.Instant now) |
compose, compose, compose, compose, compose, compose, compose, compose, currentValue, map, map, updateCurrentValueaddWeakObserver, notifyObserverspublic TimeTriggeredReloadable(T currentValue, java.time.Duration checkInterval, io.vavr.Function2<java.time.Instant,java.util.Optional<T>,TransformationResult<T>> transform)
public TimeTriggeredReloadable(T currentValue, java.time.Instant currentTickValue, java.time.Duration checkInterval, io.vavr.Function2<java.time.Instant,java.util.Optional<T>,TransformationResult<T>> transform)
public void addParent(Observable<?> observable)
public void notifyChanged(java.time.Instant now)
notifyChanged in interface Observer<java.time.Instant>protected void handleTimeTrigger(java.time.Instant now)
protected void updateCurrentValueWithTransformed(java.time.Instant now)
public static TimeTriggeredReloadable<java.time.Instant> propagatingTicks(java.time.Instant currentTickValue, java.time.Duration checkInterval)