Class GuavaWeakCache<K,​V>

  • All Implemented Interfaces:
    io.opentelemetry.javaagent.bootstrap.WeakCache<K,​V>

    public final class GuavaWeakCache<K,​V>
    extends java.lang.Object
    implements io.opentelemetry.javaagent.bootstrap.WeakCache<K,​V>
    No null keys nor null values are permitted.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      V get​(K key, java.util.concurrent.Callable<? extends V> loader)  
      V getIfPresent​(K key)
      Returns null if key is not present.
      V getIfPresentOrCompute​(K key, java.util.concurrent.Callable<? extends V> loader)  
      void put​(K key, V value)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getIfPresent

        public V getIfPresent​(K key)
        Returns null if key is not present.
        Specified by:
        getIfPresent in interface io.opentelemetry.javaagent.bootstrap.WeakCache<K,​V>
      • getIfPresentOrCompute

        public V getIfPresentOrCompute​(K key,
                                       java.util.concurrent.Callable<? extends V> loader)
        Specified by:
        getIfPresentOrCompute in interface io.opentelemetry.javaagent.bootstrap.WeakCache<K,​V>
      • get

        public V get​(K key,
                     java.util.concurrent.Callable<? extends V> loader)
        Specified by:
        get in interface io.opentelemetry.javaagent.bootstrap.WeakCache<K,​V>
      • put

        public void put​(K key,
                        V value)
        Specified by:
        put in interface io.opentelemetry.javaagent.bootstrap.WeakCache<K,​V>