📄 cacheevent.java
字号:
/*
* Copyright (c) 2002-2003 by OpenSymphony
* All rights reserved.
*/
package com.opensymphony.oscache.base.events;
/**
* The root event class for all cache events. Each subclasses of this class
* classifies a particular type of cache event.
*
* @author <a href="mailto:chris@swebtec.com">Chris Miller</a>
* Date: 20-May-2003
* Time: 15:25:02
*/
public abstract class CacheEvent {
/**
* An optional tag that can be attached to the event to specify the event's origin.
*/
protected String origin = null;
/**
* No-argument constructor so subtypes can easily implement <code>Serializable</code>
*/
public CacheEvent() {
}
/**
* Creates a cache event object that came from the specified origin.
*
* @param origin A string that indicates where this event was fired from.
* This value is optional; <code>null</code> can be passed in if an
* origin is not required.
*/
public CacheEvent(String origin) {
this.origin = origin;
}
/**
* Retrieves the origin of this event, if one was specified. This is most
* useful when an event handler causes another event to fire - by checking
* the origin the handler is able to prevent recursive events being
* fired.
*/
public String getOrigin() {
return origin;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -