Uses of Class
com.github.benmanes.caffeine.cache.Caffeine

Packages that use Caffeine
Package
Description
This package contains caching utilities.
 
  • Uses of Caffeine in com.github.benmanes.caffeine.cache

    Modifier and Type
    Method
    Description
    <K1 extends K, V1 extends V>
    @NonNull Caffeine<K1,V1>
    Caffeine.evictionListener(@NonNull RemovalListener<? super K1, ? super V1> evictionListener)
    Specifies a listener instance that caches should notify each time an entry is evicted.
    @NonNull Caffeine<K,V>
    Caffeine.executor(@NonNull Executor executor)
    Specifies the executor to use when running asynchronous tasks.
    <K1 extends K, V1 extends V>
    @NonNull Caffeine<K1,V1>
    Caffeine.expireAfter(@NonNull Expiry<? super K1, ? super V1> expiry)
    Specifies that each entry should be automatically removed from the cache once a duration has elapsed after the entry's creation, the most recent replacement of its value, or its last read.
    @NonNull Caffeine<K,V>
    Caffeine.expireAfterAccess(@NonNegative long duration, @NonNull TimeUnit unit)
    Specifies that each entry should be automatically removed from the cache once a fixed duration has elapsed after the entry's creation, the most recent replacement of its value, or its last read.
    @NonNull Caffeine<K,V>
    Caffeine.expireAfterAccess(@NonNull Duration duration)
    Specifies that each entry should be automatically removed from the cache once a fixed duration has elapsed after the entry's creation, the most recent replacement of its value, or its last access.
    @NonNull Caffeine<K,V>
    Caffeine.expireAfterWrite(@NonNegative long duration, @NonNull TimeUnit unit)
    Specifies that each entry should be automatically removed from the cache once a fixed duration has elapsed after the entry's creation, or the most recent replacement of its value.
    @NonNull Caffeine<K,V>
    Caffeine.expireAfterWrite(@NonNull Duration duration)
    Specifies that each entry should be automatically removed from the cache once a fixed duration has elapsed after the entry's creation, or the most recent replacement of its value.
    static @NonNull Caffeine<Object,Object>
    Caffeine.from(CaffeineSpec spec)
    Constructs a new Caffeine instance with the settings specified in spec.
    static @NonNull Caffeine<Object,Object>
    Caffeine.from(String spec)
    Constructs a new Caffeine instance with the settings specified in spec.
    @NonNull Caffeine<K,V>
    Caffeine.initialCapacity(@NonNegative int initialCapacity)
    Sets the minimum total size for the internal data structures.
    @NonNull Caffeine<K,V>
    Caffeine.maximumSize(@NonNegative long maximumSize)
    Specifies the maximum number of entries the cache may contain.
    @NonNull Caffeine<K,V>
    Caffeine.maximumWeight(@NonNegative long maximumWeight)
    Specifies the maximum weight of entries the cache may contain.
    static @NonNull Caffeine<Object,Object>
    Caffeine.newBuilder()
    Constructs a new Caffeine instance with default settings, including strong keys, strong values, and no automatic eviction of any kind.
    @NonNull Caffeine<K,V>
    Caffeine.recordStats()
    Enables the accumulation of CacheStats during the operation of the cache.
    @NonNull Caffeine<K,V>
    Caffeine.recordStats(@NonNull Supplier<? extends StatsCounter> statsCounterSupplier)
    Enables the accumulation of CacheStats during the operation of the cache.
    @NonNull Caffeine<K,V>
    Caffeine.refreshAfterWrite(@NonNegative long duration, @NonNull TimeUnit unit)
    Specifies that active entries are eligible for automatic refresh once a fixed duration has elapsed after the entry's creation, or the most recent replacement of its value.
    @NonNull Caffeine<K,V>
    Caffeine.refreshAfterWrite(@NonNull Duration duration)
    Specifies that active entries are eligible for automatic refresh once a fixed duration has elapsed after the entry's creation, or the most recent replacement of its value.
    <K1 extends K, V1 extends V>
    @NonNull Caffeine<K1,V1>
    Caffeine.removalListener(@NonNull RemovalListener<? super K1, ? super V1> removalListener)
    Specifies a listener instance that caches should notify each time an entry is removed for any reason.
    @NonNull Caffeine<K,V>
    Caffeine.scheduler(@NonNull Scheduler scheduler)
    Specifies the scheduler to use when scheduling routine maintenance based on an expiration event.
    @NonNull Caffeine<K,V>
    Caffeine.softValues()
    Specifies that each value (not key) stored in the cache should be wrapped in a SoftReference (by default, strong references are used).
    @NonNull Caffeine<K,V>
    Caffeine.ticker(@NonNull Ticker ticker)
    Specifies a nanosecond-precision time source for use in determining when entries should be expired or refreshed.
    @NonNull Caffeine<K,V>
    Caffeine.weakKeys()
    Specifies that each key (not value) stored in the cache should be wrapped in a WeakReference (by default, strong references are used).
    @NonNull Caffeine<K,V>
    Caffeine.weakValues()
    Specifies that each value (not key) stored in the cache should be wrapped in a WeakReference (by default, strong references are used).
    <K1 extends K, V1 extends V>
    @NonNull Caffeine<K1,V1>
    Caffeine.weigher(@NonNull Weigher<? super K1, ? super V1> weigher)
    Specifies the weigher to use in determining the weight of entries.
    <K1 extends K, V1 extends V>
    @NonNull Caffeine<K1,V1>
    Caffeine.writer(@NonNull CacheWriter<? super K1, ? super V1> writer)
    Deprecated.
    Scheduled for removal in version 3.0.0.
  • Uses of Caffeine in com.github.benmanes.caffeine.guava

    Methods in com.github.benmanes.caffeine.guava with parameters of type Caffeine
    Modifier and Type
    Method
    Description
    static <K, V, K1 extends K, V1 extends V>
    @NonNull com.google.common.cache.Cache<K1,V1>
    CaffeinatedGuava.build(@NonNull Caffeine<K,V> builder)
    Returns a Caffeine cache wrapped in a Guava Cache facade.
    static <K, V, K1 extends K, V1 extends V>
    @NonNull com.google.common.cache.LoadingCache<K1,V1>
    CaffeinatedGuava.build(@NonNull Caffeine<K,V> builder, @NonNull CacheLoader<? super K1, V1> loader)
    Returns a Caffeine cache wrapped in a Guava LoadingCache facade.
    static <K, V, K1 extends K, V1 extends V>
    @NonNull com.google.common.cache.LoadingCache<K1,V1>
    CaffeinatedGuava.build(@NonNull Caffeine<K,V> builder, @NonNull com.google.common.cache.CacheLoader<? super K1, V1> loader)
    Returns a Caffeine cache wrapped in a Guava LoadingCache facade.