All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dahuatech.hutool.cache.impl.WeakCache Maven / Gradle / Ivy

package com.dahuatech.hutool.cache.impl;

import java.util.WeakHashMap;

/**
 * 弱引用缓存
* 对于一个给定的键,其映射的存在并不阻止垃圾回收器对该键的丢弃,这就使该键成为可终止的,被终止,然后被回收。
* 丢弃某个键时,其条目从映射中有效地移除。
* * @author Looly * @param 键 * @param 值 * @author looly * @since 3.0.7 */ public class WeakCache extends TimedCache { private static final long serialVersionUID = 1L; public WeakCache(long timeout) { super(timeout, new WeakHashMap>()); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy