Class CacheBuilder
- java.lang.Object
-
- io.opentelemetry.instrumentation.api.caching.CacheBuilder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <K,V>
Cache<K,V>build()Returns a newCachewith the settings of thisCacheBuilder.CacheBuildersetMaximumSize(long maximumSize)Sets the maximum size of the cache.CacheBuildersetWeakKeys()Sets that keys should be referenced weakly.CacheBuildersetWeakValues()Sets that values should be referenced weakly.
-
-
-
Method Detail
-
setMaximumSize
public CacheBuilder setMaximumSize(long maximumSize)
Sets the maximum size of the cache.
-
setWeakKeys
public CacheBuilder setWeakKeys()
Sets that keys should be referenced weakly. If used, keys will use identity comparison, notObject.equals(Object).
-
setWeakValues
public CacheBuilder setWeakValues()
Sets that values should be referenced weakly.
-
build
public <K,V> Cache<K,V> build()
Returns a newCachewith the settings of thisCacheBuilder.
-
-