01: /* Copyright 2001, 2007 The JA-SIG Collaborative. All rights reserved.
02: * See license distributed with this file and
03: * available online at http://www.uportal.org/license.html
04: */
05:
06: package org.jasig.portal;
07:
08: /**
09: * An interface that a cacheable channel must implement.
10: * @author Peter Kharchenko pkharchenko@unicon.net
11: * @version $Revision: 36838 $
12: */
13: public interface ICacheable {
14:
15: /**
16: * Suggested name for channel static data or runtime data prameter specifying
17: * the intended scope for caching for the so parameterized instance of a channel
18: * implementing this interface. Channels implementing ICacheable are suggested to
19: * read ChannelStaticData parameter 'cacheScope' and configure themselves to
20: * use the indicated scope.
21: */
22: public static final String CHANNEL_CACHE_KEY_SCOPE_PARAM_NAME = "cacheScope";
23:
24: /**
25: * Suggested value for the channel static data or runtime data parameter
26: * specifying intended scope for caching, indicating that the intended
27: * scope is system-wide caching.
28: */
29: public static final String CHANNEL_CACHE_KEY_SYSTEM_SCOPE = "system";
30:
31: /**
32: * Suggested value for the channel static data or runtime data parameter
33: * specifying intended scope for caching, indicating that the intended
34: * scope is per-instance caching.
35: */
36: public static final String CHANNEL_CACHE_KEY_INSTANCE_SCOPE = "instance";
37:
38: /**
39: * Requests the channel to generate a key uniquely describing its current state,
40: * and a description of key usage.
41: */
42: public ChannelCacheKey generateKey();
43:
44: /**
45: * Requests the channel to verify validity of the retrieved cache based on the validator object.
46: */
47: public boolean isCacheValid(Object validity);
48: }
|