Top Description Inners Fields Methods
com.github.benmanes.caffeine.cache

pack-priv Interface LocalCacheFactory

Known Direct Implementers
com.github.benmanes.caffeine.cache.LocalCacheFactory.MethodHandleBasedFactory
Imports
java.lang.invoke.MethodHandle, .MethodHandles, .MethodType, java.util.concurrent.ConcurrentHashMap, .ConcurrentMap, org.checkerframework.checker.nullness.qual.Nullable

A factory for caches optimized for a particular configuration.
Author
[email protected] (Ben Manes)

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public static final ConcurrentMap<String, LocalCacheFactory>
public static final MethodType
public static final MethodType
public static final MethodHandles.Lookup

Method Summary

Modifier and TypeMethod and Description
public static String
getClassName(Caffeine<?, ?> builder)

public static LocalCacheFactory
loadFactory(String className)

public static <K, V> BoundedLocalCache<K, V>
newBoundedLocalCache(Caffeine<K, V> builder, @Nullable AsyncCacheLoader<? super K, V> cacheLoader, boolean async)

Returns a cache optimized for this configuration.

public static LocalCacheFactory
newFactory(String className)

public <K, V> BoundedLocalCache<K, V>
newInstance(Caffeine<K, V> builder, @Nullable AsyncCacheLoader<? super K, V> cacheLoader, boolean async)

Returns a cache optimized for this configuration.

Field Detail

FACTORIESback to summary
public static final ConcurrentMap<String, LocalCacheFactory> FACTORIES
FACTORYback to summary
public static final MethodType FACTORY
FACTORY_CALLback to summary
public static final MethodType FACTORY_CALL
LOOKUPback to summary
public static final MethodHandles.Lookup LOOKUP

Method Detail

getClassNameback to summary
public static String getClassName(Caffeine<?, ?> builder)
loadFactoryback to summary
public static LocalCacheFactory loadFactory(String className)
newBoundedLocalCacheback to summary
public static <K, V> BoundedLocalCache<K, V> newBoundedLocalCache(Caffeine<K, V> builder, @Nullable AsyncCacheLoader<? super K, V> cacheLoader, boolean async)

Returns a cache optimized for this configuration.

newFactoryback to summary
public static LocalCacheFactory newFactory(String className)
newInstanceback to summary
public <K, V> BoundedLocalCache<K, V> newInstance(Caffeine<K, V> builder, @Nullable AsyncCacheLoader<? super K, V> cacheLoader, boolean async) throws Throwable

Returns a cache optimized for this configuration.

com.github.benmanes.caffeine.cache back to summary

public final Class LocalCacheFactory.MethodHandleBasedFactory

extends Object
implements LocalCacheFactory
Class Inheritance
  • java.lang.Object
  • com.github.benmanes.caffeine.cache.LocalCacheFactory.MethodHandleBasedFactory
All Implemented Interfaces
com.github.benmanes.caffeine.cache.LocalCacheFactory

Field Summary

Modifier and TypeField and Description
pack-priv final MethodHandle

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public <K, V> BoundedLocalCache<K, V>
newInstance(Caffeine<K, V> builder, @Nullable AsyncCacheLoader<? super K, V> cacheLoader, boolean async)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

methodHandleback to summary
pack-priv final MethodHandle methodHandle

Constructor Detail

MethodHandleBasedFactoryback to summary
pack-priv MethodHandleBasedFactory(Class<?> clazz) throws NoSuchMethodException, IllegalAccessException

Method Detail

newInstanceback to summary
public <K, V> BoundedLocalCache<K, V> newInstance(Caffeine<K, V> builder, @Nullable AsyncCacheLoader<? super K, V> cacheLoader, boolean async) throws Throwable
Annotations
@SuppressWarnings:unchecked
@Override