(Caffeine)接口-LoadingCache

2021-01-05  本文已影响0人  CayChan

A semi-persistent mapping from keys to values. Values are automatically loaded by the cache, and are stored in the cache until either evicted or manually invalidated.
Implementations of this interface are expected to be thread-safe, and can be safely accessed by multiple concurrent threads.

接口描述与Cache相同

  1. 提供键值对的半永久映射。
  2. Entry通过get或put缓存到Cache中直到被驱逐或失效。
  3. 该接口的实现应该是线程安全的,并可以由多个并发线程安全访问。

继承Cache接口,提供同步自动加载数据的接口。

在Cache的接口上扩展了三个接口:

上一篇下一篇

猜你喜欢

热点阅读