Interface ProducerCacheProvider
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
ConcurrentHashMapProducerCacheProvider
Cache provider interface used by the
ReactiveMessageSender to cache the
underlying Producers it uses.-
Method Summary
Modifier and TypeMethodDescription<K,V> CompletableFuture<V> getOrCreateCachedEntry(K key, Function<K, CompletableFuture<V>> createEntryFunction) Gets or create an entry in the cache.Methods inherited from interface java.lang.AutoCloseable
close
-
Method Details
-
getOrCreateCachedEntry
<K,V> CompletableFuture<V> getOrCreateCachedEntry(K key, Function<K, CompletableFuture<V>> createEntryFunction) Gets or create an entry in the cache.- Type Parameters:
K- the type of the cache keyV- the type of the cache entry value- Parameters:
key- the cache keycreateEntryFunction- a function called to create the entry in the cache if it's not present.- Returns:
- the cache entry value
-