public class Caffeine2CollectionFactory
extends java.lang.Object
implements com.newrelic.agent.bridge.CollectionFactory
| Constructor and Description |
|---|
Caffeine2CollectionFactory() |
| Modifier and Type | Method and Description |
|---|---|
<K,V> java.util.function.Function<K,V> |
createAccessTimeBasedCache(long ageInSeconds,
int initialCapacity,
java.util.function.Function<K,V> loader) |
<K,V> java.util.function.Function<K,V> |
createAccessTimeBasedCacheWithMaxSize(long ageInSeconds,
int maxSize,
java.util.function.Function<K,V> loader) |
<K,V> com.newrelic.agent.bridge.CleanableMap<K,V> |
createCacheWithAccessExpirationAndRemovalListener(long age,
java.util.concurrent.TimeUnit unit,
int initialCapacity,
com.newrelic.agent.bridge.CacheRemovalListener<K,V> listener) |
<K,V> java.util.Map<K,V> |
createCacheWithInitialCapacity(int initialCapacity) |
<K,V> java.util.Map<K,V> |
createCacheWithWeakKeysAndSize(int maxSize) |
<K,V> java.util.Map<K,V> |
createCacheWithWeakKeysInitialCapacityAndSize(int initialCapacity,
int maxSize) |
<K,V> com.newrelic.agent.bridge.CleanableMap<K,V> |
createCacheWithWriteExpirationAndRemovalListener(long age,
java.util.concurrent.TimeUnit unit,
int initialCapacity,
com.newrelic.agent.bridge.CacheRemovalListener<K,V> listener) |
<K,V> java.util.Map<K,V> |
createConcurrentAccessTimeBasedEvictionMap(long ageInSeconds,
int initialCapacity)
Create a time based eviction cache in which an entry's age is determined on a last-access basis.
|
<K,V> java.util.Map<K,V> |
createConcurrentTimeBasedEvictionMap(long ageInSeconds)
Create a time based eviction cache in which an entry's age is determined on a last-write basis.
|
<K,V> java.util.Map<K,V> |
createConcurrentWeakKeyedMap() |
<K,V> java.util.function.Function<K,V> |
createLoadingCache(java.util.function.Function<K,V> loader) |
<K,V> java.util.Map<K,V> |
createWeakKeyedCacheWithInitialCapacity(int initialCapacity) |
<K,V> java.util.function.Function<K,V> |
createWeakKeyedLoadingCacheWithInitialCapacity(int initialCapacity,
java.util.function.Function<K,V> loader) |
<K,V> java.util.function.Function<K,V> |
memorize(java.util.function.Function<K,V> loader,
int maxSize) |
public <K,V> java.util.Map<K,V> createConcurrentWeakKeyedMap()
createConcurrentWeakKeyedMap in interface com.newrelic.agent.bridge.CollectionFactorypublic <K,V> java.util.Map<K,V> createConcurrentTimeBasedEvictionMap(long ageInSeconds)
createConcurrentTimeBasedEvictionMap in interface com.newrelic.agent.bridge.CollectionFactoryageInSeconds - how old, in seconds, a cache entry must be to be evicted after last writepublic <K,V> java.util.Map<K,V> createConcurrentAccessTimeBasedEvictionMap(long ageInSeconds,
int initialCapacity)
createConcurrentAccessTimeBasedEvictionMap in interface com.newrelic.agent.bridge.CollectionFactoryageInSeconds - how old, in seconds, a cache entry must be to be evicted after last accessinitialCapacity - initial capacity to pre-allocatepublic <K,V> java.util.function.Function<K,V> memorize(java.util.function.Function<K,V> loader,
int maxSize)
memorize in interface com.newrelic.agent.bridge.CollectionFactorypublic <K,V> java.util.function.Function<K,V> createAccessTimeBasedCache(long ageInSeconds,
int initialCapacity,
java.util.function.Function<K,V> loader)
createAccessTimeBasedCache in interface com.newrelic.agent.bridge.CollectionFactorypublic <K,V> java.util.function.Function<K,V> createAccessTimeBasedCacheWithMaxSize(long ageInSeconds,
int maxSize,
java.util.function.Function<K,V> loader)
createAccessTimeBasedCacheWithMaxSize in interface com.newrelic.agent.bridge.CollectionFactorypublic <K,V> java.util.function.Function<K,V> createLoadingCache(java.util.function.Function<K,V> loader)
createLoadingCache in interface com.newrelic.agent.bridge.CollectionFactorypublic <K,V> java.util.Map<K,V> createCacheWithWeakKeysAndSize(int maxSize)
createCacheWithWeakKeysAndSize in interface com.newrelic.agent.bridge.CollectionFactorypublic <K,V> java.util.Map<K,V> createWeakKeyedCacheWithInitialCapacity(int initialCapacity)
createWeakKeyedCacheWithInitialCapacity in interface com.newrelic.agent.bridge.CollectionFactorypublic <K,V> java.util.Map<K,V> createCacheWithWeakKeysInitialCapacityAndSize(int initialCapacity,
int maxSize)
createCacheWithWeakKeysInitialCapacityAndSize in interface com.newrelic.agent.bridge.CollectionFactorypublic <K,V> java.util.Map<K,V> createCacheWithInitialCapacity(int initialCapacity)
createCacheWithInitialCapacity in interface com.newrelic.agent.bridge.CollectionFactorypublic <K,V> java.util.function.Function<K,V> createWeakKeyedLoadingCacheWithInitialCapacity(int initialCapacity,
java.util.function.Function<K,V> loader)
createWeakKeyedLoadingCacheWithInitialCapacity in interface com.newrelic.agent.bridge.CollectionFactorypublic <K,V> com.newrelic.agent.bridge.CleanableMap<K,V> createCacheWithWriteExpirationAndRemovalListener(long age,
java.util.concurrent.TimeUnit unit,
int initialCapacity,
com.newrelic.agent.bridge.CacheRemovalListener<K,V> listener)
createCacheWithWriteExpirationAndRemovalListener in interface com.newrelic.agent.bridge.CollectionFactorypublic <K,V> com.newrelic.agent.bridge.CleanableMap<K,V> createCacheWithAccessExpirationAndRemovalListener(long age,
java.util.concurrent.TimeUnit unit,
int initialCapacity,
com.newrelic.agent.bridge.CacheRemovalListener<K,V> listener)
createCacheWithAccessExpirationAndRemovalListener in interface com.newrelic.agent.bridge.CollectionFactory