📄 cacheentryevent.java
字号:
/*
* Copyright (c) 2002-2003 by OpenSymphony
* All rights reserved.
*/
package com.opensymphony.oscache.base.events;
import com.opensymphony.oscache.base.Cache;
import com.opensymphony.oscache.base.CacheEntry;
/**
* CacheEntryEvent is the object created when an event occurs on a
* cache entry (Add, update, remove, flush). It contains the entry itself and
* its map.
*
* @version $Revision: 254 $
* @author <a href="mailto:fbeauregard@pyxis-tech.com">Francois Beauregard</a>
*/
public final class CacheEntryEvent extends CacheEvent {
/**
* The cache where the entry resides.
*/
private Cache map = null;
/**
* The entry that the event applies to.
*/
private CacheEntry entry = null;
/**
* Constructs a cache entry event object with no specified origin
*
* @param map The cache map of the cache entry
* @param entry The cache entry that the event applies to
*/
public CacheEntryEvent(Cache map, CacheEntry entry) {
this(map, entry, null);
}
/**
* Constructs a cache entry event object
*
* @param map The cache map of the cache entry
* @param entry The cache entry that the event applies to
* @param origin The origin of this event
*/
public CacheEntryEvent(Cache map, CacheEntry entry, String origin) {
super(origin);
this.map = map;
this.entry = entry;
}
/**
* Retrieve the cache entry that the event applies to.
*/
public CacheEntry getEntry() {
return entry;
}
/**
* Retrieve the cache entry key
*/
public String getKey() {
return entry.getKey();
}
/**
* Retrieve the cache map where the entry resides.
*/
public Cache getMap() {
return map;
}
public String toString() {
return "key=" + entry.getKey();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -