This commit is contained in:
Looly 2020-11-27 12:03:01 +08:00
parent 633ed24564
commit 4827c61641
2 changed files with 3 additions and 3 deletions

View File

@ -45,11 +45,11 @@ public abstract class AbstractCache<K, V> implements Cache<K, V> {
/** /**
* 命中数 * 命中数
*/ */
protected AtomicLong hitCount; protected AtomicLong hitCount = new AtomicLong();
/** /**
* 丢失数 * 丢失数
*/ */
protected AtomicLong missCount; protected AtomicLong missCount = new AtomicLong();
// ---------------------------------------------------------------- put start // ---------------------------------------------------------------- put start
@Override @Override

View File

@ -19,7 +19,7 @@ public class CacheObj<K, V> implements Serializable{
/** 上次访问时间 */ /** 上次访问时间 */
private volatile long lastAccess; private volatile long lastAccess;
/** 访问次数 */ /** 访问次数 */
protected AtomicLong accessCount; protected AtomicLong accessCount = new AtomicLong();
/** 对象存活时长0表示永久存活*/ /** 对象存活时长0表示永久存活*/
private final long ttl; private final long ttl;