Class FutureStreamCache
java.lang.Object
org.jdrupes.builder.core.FutureStreamCache
An implementation of a cache for
FutureStreams.-
Method Summary
Modifier and TypeMethodDescription<T extends Resource>
FutureStream<T> computeIfAbsent(ProviderInvocation<T> key, Function<ProviderInvocation<T>, FutureStream<T>> supplier) Compute if absent.voidpurge(ResourceProvider provider) Purge all values for the givenResourceProvider.
-
Method Details
-
computeIfAbsent
public <T extends Resource> FutureStream<T> computeIfAbsent(ProviderInvocation<T> key, Function<ProviderInvocation<T>, FutureStream<T>> supplier) Compute if absent.- Type Parameters:
T- the generic type- Parameters:
key- the keysupplier- the supplier- Returns:
- the future stream
-
purge
Purge all values for the givenResourceProvider.- Parameters:
provider- the provider
-