Package ai.platon.pulsar.common
Class ObjectCache
-
- All Implemented Interfaces:
public final class ObjectCacheObject cache, used to cache objects that are expensive to create.
-
-
Method Summary
Modifier and Type Method Description final BooleanhasBean(String key)final ObjectgetBean(String key)final <T extends Any> TgetBean(String key, T defaultValue)final <T extends Any> TgetBean(Class<T> clazz)final <T extends Any> TgetBean()final <T extends Any> TcomputeIfAbsent(Function0<T> mappingFunction)final UnitputBean(Object obj)final static ObjectCacheget(ImmutableConfig conf)-
-
Method Detail
-
computeIfAbsent
final <T extends Any> T computeIfAbsent(Function0<T> mappingFunction)
-
get
final static ObjectCache get(ImmutableConfig conf)
-
-
-
-