cache

返回這個cache中的key對應的value值
  V getIfPresent(Object key); 


返回key對應的值,從valueLoader中獲取值。cache中不被關注的狀態不會被修改,直到加載完成。這個方法能夠替代原來的cache:
if cached,返回; else 建立,cache,返回 V get(K key, Callable<? extends V> valueLoader) throws ExecutionException; 返回cache中已經存在的key、value map ImmutableMap<K, V> getAllPresent(Iterable<?> keys); cache map中 存值,若是key已經存在,會覆蓋掉以前的值 void put(K key, V value); 將指定map中的值存入cache。這個調用與 將指定map值put(k,v)到cache做用相同。 void putAll(Map<? extends K,? extends V> m);
相關文章
相關標籤/搜索