📄 cachemapaccessevent.java
字号:
/*
* Copyright (c) 2002-2003 by OpenSymphony
* All rights reserved.
*/
package com.opensymphony.oscache.base.events;
import com.opensymphony.oscache.base.CacheEntry;
/**
* Cache map access event. This is the object created when an event occurs on a
* cache map (cache Hit, cache miss). It contains the entry that was referenced
* by the event and the event type.
*
* @version $Revision: 254 $
* @author <a href="mailto:fbeauregard@pyxis-tech.com">Francois Beauregard</a>
*/
public final class CacheMapAccessEvent extends CacheEvent {
/**
* The cache entry that the event applies to.
*/
private CacheEntry entry = null;
/**
* Type of the event.
*/
private CacheMapAccessEventType eventType = null;
/**
* Constructor.
* <p>
* @param eventType Type of the event.
* @param entry The cache entry that the event applies to.
*/
public CacheMapAccessEvent(CacheMapAccessEventType eventType, CacheEntry entry) {
this(eventType, entry, null);
}
/**
* Constructor.
* <p>
* @param eventType Type of the event.
* @param entry The cache entry that the event applies to.
* @param origin The origin of the event
*/
public CacheMapAccessEvent(CacheMapAccessEventType eventType, CacheEntry entry, String origin) {
super(origin);
this.eventType = eventType;
this.entry = entry;
}
/**
* Retrieve the cache entry that the event applies to.
*/
public CacheEntry getCacheEntry() {
return entry;
}
/**
* Retrieve the cache entry key that the event applies to.
*/
public String getCacheEntryKey() {
return entry.getKey();
}
/**
* Retrieve the type of the event.
*/
public CacheMapAccessEventType getEventType() {
return eventType;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -