Package com.vaadin.flow.signals.function
Interface SignalUpdater<T extends @Nullable Object>
- Type Parameters:
T- the signal value type
- All Superinterfaces:
Serializable
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public interface SignalUpdater<T extends @Nullable Object>
extends Serializable
Computes a new signal value based on the current value, enabling atomic
compare-and-swap updates with automatic retry on conflicts.
The updater function may be called multiple times if concurrent modifications occur. It should be side-effect free to ensure correctness during retries.
-
Method Summary
-
Method Details
-
update
Computes a new value based on the current value.- Parameters:
currentValue- the current signal value- Returns:
- the new value to set
-