类 SimpleCache<K,V>
java.lang.Object
com.alibaba.nacos.common.cache.impl.SimpleCache<K,V>
- 所有已实现的接口:
Cache<K,V>
Simple implementation of
Cache.- 作者:
- zzq
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidclear()Clear the entire cache.Take the corresponding value from the cache according to the cache key.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.voidCache a pair of key value.Take the corresponding value from the cache according to the cache key, and remove this record from the cache.
-
构造器详细资料
-
SimpleCache
public SimpleCache(int size)
-
-
方法详细资料
-
put
从接口复制的说明:CacheCache a pair of key value. If the key value already exists, the value will be overwritten. -
get
从接口复制的说明:CacheTake the corresponding value from the cache according to the cache key. -
get
从接口复制的说明:CacheGet the value in the cache according to the primary key, and put it into the cache after processing by the function. -
remove
从接口复制的说明:CacheTake the corresponding value from the cache according to the cache key, and remove this record from the cache. -
clear
public void clear()从接口复制的说明:CacheClear the entire cache. -
getSize
public int getSize()从接口复制的说明:CacheReturns the number of key-value pairs in the cache.
-