T - the supplied typepublic final class Cache<T> extends Object implements Supplier<T>
The delegate supplier is only called on executions of get() if the
result is not cached. Subsequent calls will block until the value is calculated.
| Modifier and Type | Method and Description |
|---|---|
T |
get() |
Optional<T> |
getIfPresent() |
void |
invalidate() |
static <T> Cache<T> |
suppliedBy(Supplier<T> supplier) |
Copyright © 2022. All rights reserved.