类 SynchronizedCache<K,V>
- java.lang.Object
-
- com.alibaba.nacos.common.cache.decorators.SynchronizedCache<K,V>
-
-
构造器概要
构造器 构造器 说明 SynchronizedCache(Cache<K,V> delegate)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidclear()Clear the entire cache.Vget(K key)Take the corresponding value from the cache according to the cache key.Vget(K key, java.util.concurrent.Callable<? extends V> call)Get the value in the cache according to the primary key, and put it into the cache after processing by the function.intgetSize()Returns the number of key-value pairs in the cache.voidput(K key, V val)Cache a pair of key value.Vremove(K key)Take the corresponding value from the cache according to the cache key, and remove this record from the cache.
-
-
-
方法详细资料
-
put
public void put(K key, V val)
从接口复制的说明:CacheCache a pair of key value. If the key value already exists, the value will be overwritten.
-
get
public V get(K key)
从接口复制的说明:CacheTake the corresponding value from the cache according to the cache key.
-
get
public V get(K key, java.util.concurrent.Callable<? extends V> call) throws java.lang.Exception
从接口复制的说明:CacheGet the value in the cache according to the primary key, and put it into the cache after processing by the function.
-
remove
public V remove(K key)
从接口复制的说明:CacheTake the corresponding value from the cache according to the cache key, and remove this record from the cache.
-
-