Class CaffeineLRUCacheFactory


  • @Deprecated
    @JdkService("lru-cache-factory")
    public final class CaffeineLRUCacheFactory
    extends org.apache.camel.support.LRUCacheFactory
    Deprecated.
    Factory to create CaffeineLRUCache instances.
    • Field Summary

      • Fields inherited from class org.apache.camel.support.LRUCacheFactory

        FACTORY
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      <K,​V>
      Map<K,​V>
      createLRUCache​(int maximumCacheSize)
      Deprecated.
      Constructs an empty LRUCache instance with the specified maximumCacheSize, and will stop on eviction.
      <K,​V>
      Map<K,​V>
      createLRUCache​(int initialCapacity, int maximumCacheSize)
      Deprecated.
      Constructs an empty LRUCache instance with the specified initial capacity, maximumCacheSize, and will stop on eviction.
      <K,​V>
      Map<K,​V>
      createLRUCache​(int initialCapacity, int maximumCacheSize, boolean stopOnEviction)
      Deprecated.
      Constructs an empty LRUCache instance with the specified initial capacity, maximumCacheSize,load factor and ordering mode.
      <K,​V>
      Map<K,​V>
      createLRUCache​(int maximumCacheSize, Consumer<V> onEvict)
      Deprecated.
      Constructs an empty LRUCache instance with the specified maximumCacheSize, and will stop on eviction.
      <K,​V>
      Map<K,​V>
      createLRUSoftCache​(int maximumCacheSize)
      Deprecated.
      Constructs an empty LRUSoftCache instance with the specified maximumCacheSize, and will stop on eviction.
      <K,​V>
      Map<K,​V>
      createLRUSoftCache​(int initialCapacity, int maximumCacheSize)
      Deprecated.
      Constructs an empty LRUSoftCache instance with the specified maximumCacheSize, and will stop on eviction.
      <K,​V>
      Map<K,​V>
      createLRUSoftCache​(int initialCapacity, int maximumCacheSize, boolean stopOnEviction)
      Deprecated.
      Constructs an empty LRUSoftCache instance with the specified maximumCacheSize, and will stop on eviction.
      <K,​V>
      Map<K,​V>
      createLRUWeakCache​(int maximumCacheSize)
      Deprecated.
      Constructs an empty LRUWeakCache instance with the specified maximumCacheSize, and will stop on eviction.
      <K,​V>
      Map<K,​V>
      createLRUWeakCache​(int initialCapacity, int maximumCacheSize)
      Deprecated.
      Constructs an empty LRUWeakCache instance with the specified maximumCacheSize, and will stop on eviction.
      <K,​V>
      Map<K,​V>
      createLRUWeakCache​(int initialCapacity, int maximumCacheSize, boolean stopOnEviction)
      Deprecated.
      Constructs an empty LRUWeakCache instance with the specified maximumCacheSize, and will stop on eviction.
      String toString()
      Deprecated.
       
      static void warmUp()
      Deprecated.
      Warm-up the LRUCache to startup Apache Camel faster.
      • Methods inherited from class org.apache.camel.support.LRUCacheFactory

        getInstance, init, newLRUCache, newLRUCache, newLRUCache, newLRUCache, newLRUSoftCache, newLRUSoftCache, newLRUSoftCache, newLRUWeakCache, newLRUWeakCache, newLRUWeakCache, setLRUCacheFactory
    • Constructor Detail

      • CaffeineLRUCacheFactory

        public CaffeineLRUCacheFactory()
        Deprecated.
    • Method Detail

      • warmUp

        public static void warmUp()
        Deprecated.
        Warm-up the LRUCache to startup Apache Camel faster.
      • createLRUCache

        public <K,​V> Map<K,​V> createLRUCache​(int maximumCacheSize)
        Deprecated.
        Constructs an empty LRUCache instance with the specified maximumCacheSize, and will stop on eviction.
        Specified by:
        createLRUCache in class org.apache.camel.support.LRUCacheFactory
        Parameters:
        maximumCacheSize - the max capacity.
        Throws:
        IllegalArgumentException - if the initial capacity is negative
      • createLRUCache

        public <K,​V> Map<K,​V> createLRUCache​(int maximumCacheSize,
                                                         Consumer<V> onEvict)
        Deprecated.
        Constructs an empty LRUCache instance with the specified maximumCacheSize, and will stop on eviction.
        Specified by:
        createLRUCache in class org.apache.camel.support.LRUCacheFactory
        Parameters:
        maximumCacheSize - the max capacity.
        Throws:
        IllegalArgumentException - if the initial capacity is negative
      • createLRUCache

        public <K,​V> Map<K,​V> createLRUCache​(int initialCapacity,
                                                         int maximumCacheSize)
        Deprecated.
        Constructs an empty LRUCache instance with the specified initial capacity, maximumCacheSize, and will stop on eviction.
        Specified by:
        createLRUCache in class org.apache.camel.support.LRUCacheFactory
        Parameters:
        initialCapacity - the initial capacity.
        maximumCacheSize - the max capacity.
        Throws:
        IllegalArgumentException - if the initial capacity is negative
      • createLRUCache

        public <K,​V> Map<K,​V> createLRUCache​(int initialCapacity,
                                                         int maximumCacheSize,
                                                         boolean stopOnEviction)
        Deprecated.
        Constructs an empty LRUCache instance with the specified initial capacity, maximumCacheSize,load factor and ordering mode.
        Specified by:
        createLRUCache in class org.apache.camel.support.LRUCacheFactory
        Parameters:
        initialCapacity - the initial capacity.
        maximumCacheSize - the max capacity.
        stopOnEviction - whether to stop service on eviction.
        Throws:
        IllegalArgumentException - if the initial capacity is negative
      • createLRUSoftCache

        public <K,​V> Map<K,​V> createLRUSoftCache​(int maximumCacheSize)
        Deprecated.
        Constructs an empty LRUSoftCache instance with the specified maximumCacheSize, and will stop on eviction.
        Specified by:
        createLRUSoftCache in class org.apache.camel.support.LRUCacheFactory
        Parameters:
        maximumCacheSize - the max capacity.
        Throws:
        IllegalArgumentException - if the initial capacity is negative
      • createLRUSoftCache

        public <K,​V> Map<K,​V> createLRUSoftCache​(int initialCapacity,
                                                             int maximumCacheSize)
        Deprecated.
        Constructs an empty LRUSoftCache instance with the specified maximumCacheSize, and will stop on eviction.
        Specified by:
        createLRUSoftCache in class org.apache.camel.support.LRUCacheFactory
        Parameters:
        initialCapacity - the initial capacity.
        maximumCacheSize - the max capacity.
        Throws:
        IllegalArgumentException - if the initial capacity is negative
      • createLRUSoftCache

        public <K,​V> Map<K,​V> createLRUSoftCache​(int initialCapacity,
                                                             int maximumCacheSize,
                                                             boolean stopOnEviction)
        Deprecated.
        Constructs an empty LRUSoftCache instance with the specified maximumCacheSize, and will stop on eviction.
        Specified by:
        createLRUSoftCache in class org.apache.camel.support.LRUCacheFactory
        Parameters:
        initialCapacity - the initial capacity.
        maximumCacheSize - the max capacity.
        stopOnEviction - whether to stop service on eviction.
        Throws:
        IllegalArgumentException - if the initial capacity is negative
      • createLRUWeakCache

        public <K,​V> Map<K,​V> createLRUWeakCache​(int maximumCacheSize)
        Deprecated.
        Constructs an empty LRUWeakCache instance with the specified maximumCacheSize, and will stop on eviction.
        Specified by:
        createLRUWeakCache in class org.apache.camel.support.LRUCacheFactory
        Parameters:
        maximumCacheSize - the max capacity.
        Throws:
        IllegalArgumentException - if the initial capacity is negative
      • createLRUWeakCache

        public <K,​V> Map<K,​V> createLRUWeakCache​(int initialCapacity,
                                                             int maximumCacheSize)
        Deprecated.
        Constructs an empty LRUWeakCache instance with the specified maximumCacheSize, and will stop on eviction.
        Specified by:
        createLRUWeakCache in class org.apache.camel.support.LRUCacheFactory
        Parameters:
        initialCapacity - the initial capacity.
        maximumCacheSize - the max capacity.
        Throws:
        IllegalArgumentException - if the initial capacity is negative
      • createLRUWeakCache

        public <K,​V> Map<K,​V> createLRUWeakCache​(int initialCapacity,
                                                             int maximumCacheSize,
                                                             boolean stopOnEviction)
        Deprecated.
        Constructs an empty LRUWeakCache instance with the specified maximumCacheSize, and will stop on eviction.
        Specified by:
        createLRUWeakCache in class org.apache.camel.support.LRUCacheFactory
        Parameters:
        initialCapacity - the initial capacity.
        maximumCacheSize - the max capacity.
        stopOnEviction - whether to stop service on eviction.
        Throws:
        IllegalArgumentException - if the initial capacity is negative