类 CacheBuilder<K,V>
java.lang.Object
com.alibaba.nacos.common.cache.builder.CacheBuilder<K,V>
Cache builder.
- 作者:
- zzq
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明build()Build the cache according to the builder attribute.static <K,V> CacheBuilder<K, V> builder()expireNanos(long duration, TimeUnit unit) Set expiration time.initializeCapacity(int initializeCapacity) Set the initial capacity of the cache pair.lru(boolean lru) Does the constructed cache support lru.maximumSize(int maximumSize) Set the maximum capacity of the cache pair.sync(boolean sync) Set whether the cache method is synchronized.
-
构造器详细资料
-
CacheBuilder
public CacheBuilder()
-
-
方法详细资料
-
builder
-
expireNanos
Set expiration time. -
maximumSize
Set the maximum capacity of the cache pair.- 参数:
maximumSize- maximum capacity
-
sync
Set whether the cache method is synchronized.- 参数:
sync- if sync value is true, each method of the constructed cache is synchronized.
-
lru
Does the constructed cache support lru.- 参数:
lru- If the cache built for true is an lru cache.
-
initializeCapacity
Set the initial capacity of the cache pair.- 参数:
initializeCapacity- initialize capacity
-
build
Build the cache according to the builder attribute.
-