Initial move to Gradle.
This commit is contained in:
parent
bd8f23d7d6
commit
993384c173
147 changed files with 673 additions and 1 deletions
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
* Copyright (c) 2002-2003 by OpenSymphony
|
||||
* All rights reserved.
|
||||
*/
|
||||
package com.opensymphony.oscache.base.events;
|
||||
|
||||
import com.opensymphony.oscache.base.Cache;
|
||||
|
||||
/**
|
||||
* A CachePatternEvent is fired when a pattern has been applied to a cache.
|
||||
*
|
||||
* @version $Revision$
|
||||
* @author <a href="mailto:chris@swebtec.com">Chris Miller</a>
|
||||
*/
|
||||
public final class CachePatternEvent extends CacheEvent {
|
||||
/**
|
||||
* The cache the pattern is being applied to.
|
||||
*/
|
||||
private Cache map = null;
|
||||
|
||||
/**
|
||||
* The pattern that is being applied.
|
||||
*/
|
||||
private String pattern = null;
|
||||
|
||||
/**
|
||||
* Constructs a cache pattern event with no origin
|
||||
*
|
||||
* @param map The cache map that the pattern was applied to
|
||||
* @param pattern The pattern that was applied
|
||||
*/
|
||||
public CachePatternEvent(Cache map, String pattern) {
|
||||
this(map, pattern, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a cache pattern event
|
||||
*
|
||||
* @param map The cache map that the pattern was applied to
|
||||
* @param pattern The cache pattern that the event applies to.
|
||||
* @param origin An optional tag that can be attached to the event to
|
||||
* specify the event's origin. This is useful to prevent events from being
|
||||
* fired recursively in some situations, such as when an event handler
|
||||
* causes another event to be fired, or for logging purposes.
|
||||
*/
|
||||
public CachePatternEvent(Cache map, String pattern, String origin) {
|
||||
super(origin);
|
||||
this.map = map;
|
||||
this.pattern = pattern;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the cache map that had the pattern applied.
|
||||
*/
|
||||
public Cache getMap() {
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the pattern that was applied to the cache.
|
||||
*/
|
||||
public String getPattern() {
|
||||
return pattern;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "pattern=" + pattern;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue