Class FutureStreamCache
java.lang.Object
org.jdrupes.builder.core.FutureStreamCache
An implementation of a cache for
FutureStreams.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordFutureStreamCache.Key<T extends Resource>Provided resources are identified by theResourceProviderand the requestedResource. -
Method Summary
Modifier and TypeMethodDescription<T extends Resource>
FutureStream<T> computeIfAbsent(FutureStreamCache.Key<T> key, Function<FutureStreamCache.Key<T>, FutureStream<T>> supplier) Compute if absent.
-
Method Details
-
computeIfAbsent
public <T extends Resource> FutureStream<T> computeIfAbsent(FutureStreamCache.Key<T> key, Function<FutureStreamCache.Key<T>, FutureStream<T>> supplier) Compute if absent.- Type Parameters:
T- the generic type- Parameters:
key- the keysupplier- the supplier- Returns:
- the future stream
-