@Experimental(value="Memoization is an experimental feature at this stage") public class UniMemoize<T> extends Object
| Constructor and Description |
|---|
UniMemoize(AbstractUni<T> upstream) |
| Modifier and Type | Method and Description |
|---|---|
Uni<T> |
atLeast(Duration duration)
Memoize the received item or failure for a duration after the upstream subscription has been received.
|
Uni<T> |
indefinitely()
Memoize the received item or failure indefinitely.
|
Uni<T> |
until(BooleanSupplier invalidationGuard)
Memoize the received item or failure as long as the provided boolean supplier evaluates to
false. |
public UniMemoize(AbstractUni<T> upstream)
public Uni<T> until(BooleanSupplier invalidationGuard)
false.
New subscribers will receive the memoized item or failure.
When the boolean supplier evaluates to true then a new upstream subscription happens and the next
subscribers get a chance to observe new values.
invalidationGuard - the invalidation guard, which evaluates to false for as long as the item or failure must
be memoized, must not be nullUnipublic Uni<T> atLeast(Duration duration)
New subscribers will receive the memoized item or failure. When duration has elapsed then the first subscription causes a new upstream subscription, and the next subscribers get a chance to observe new values.
duration - the memoization duration after having received the subscription from upstream, must not be
null, must be strictly positiveUniCopyright © 2019–2020 SmallRye. All rights reserved.