Class CaffeineCache<K,V>

java.lang.Object
com.landawn.abacus.cache.AbstractCache<K,V>
com.landawn.abacus.cache.CaffeineCache<K,V>
Type Parameters:
K - the key type
V - the value type
All Implemented Interfaces:
Cache<K,V>, Closeable, AutoCloseable

public class CaffeineCache<K,V> extends AbstractCache<K,V>
Since:
0.9
Author:
haiyang li
  • Constructor Details

    • CaffeineCache

      public CaffeineCache(com.github.benmanes.caffeine.cache.Cache<K,V> cache)
      Parameters:
      cache -
  • Method Details

    • gett

      public V gett(K k)
      Gets the t.
      Parameters:
      k -
      Returns:
    • put

      public boolean put(K k, V v, long liveTime, long maxIdleTime)
      Parameters:
      k -
      v -
      liveTime -
      maxIdleTime -
      Returns:
      true, if successful
    • remove

      public void remove(K k)
      Parameters:
      k -
    • containsKey

      public boolean containsKey(K k)
      Parameters:
      k -
      Returns:
      true, if successful
    • keySet

      public Set<K> keySet() throws UnsupportedOperationException
      Returns:
      Throws:
      UnsupportedOperationException
    • size

      public int size()
      Returns:
    • clear

      public void clear()
      Clear.
    • close

      public void close()
      Close.
    • isClosed

      public boolean isClosed()
      Checks if is closed.
      Returns:
      true, if is closed