public class GuavaUtils extends Object
Constructor and Description |
---|
GuavaUtils() |
Modifier and Type | Method and Description |
---|---|
static <K,V> com.google.common.cache.LoadingCache<K,V> |
createLoadingCache(Integer concurrencyLevel,
Long timeToLiveSeconds,
Long timeToIdleSeconds,
Integer initialCapacity,
Integer maximumSize,
boolean recordStats) |
static <K,V> com.google.common.cache.LoadingCache<K,V> |
createLoadingCache(Integer concurrencyLevel,
Long timeToLiveSeconds,
Long timeToIdleSeconds,
Integer initialCapacity,
Integer maximumSize,
boolean recordStats,
com.google.common.cache.RemovalListener<K,V> removalListener) |
public static <K,V> com.google.common.cache.LoadingCache<K,V> createLoadingCache(Integer concurrencyLevel, Long timeToLiveSeconds, Long timeToIdleSeconds, Integer initialCapacity, Integer maximumSize, boolean recordStats)
concurrencyLevel
- timeToLiveSeconds
- 设置写缓存后过期时间(单位:秒)timeToIdleSeconds
- 设置读缓存后过期时间(单位:秒)initialCapacity
- maximumSize
- recordStats
- public static <K,V> com.google.common.cache.LoadingCache<K,V> createLoadingCache(Integer concurrencyLevel, Long timeToLiveSeconds, Long timeToIdleSeconds, Integer initialCapacity, Integer maximumSize, boolean recordStats, com.google.common.cache.RemovalListener<K,V> removalListener)
concurrencyLevel
- timeToLiveSeconds
- 设置写缓存后过期时间(单位:秒)timeToIdleSeconds
- 设置读缓存后过期时间(单位:秒)initialCapacity
- maximumSize
- recordStats
- removalListener
- Copyright © 2021. All rights reserved.