01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/memory/tags/sakai_2-4-1/memory-api/api/src/java/org/sakaiproject/memory/api/DerivedCache.java $
03: * $Id: DerivedCache.java 12712 2006-07-24 04:09:14Z ggolden@umich.edu $
04: ***********************************************************************************
05: *
06: * Copyright (c) 2006 The Sakai Foundation.
07: *
08: * Licensed under the Educational Community License, Version 1.0 (the "License");
09: * you may not use this file except in compliance with the License.
10: * You may obtain a copy of the License at
11: *
12: * http://www.opensource.org/licenses/ecl1.php
13: *
14: * Unless required by applicable law or agreed to in writing, software
15: * distributed under the License is distributed on an "AS IS" BASIS,
16: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: * See the License for the specific language governing permissions and
18: * limitations under the License.
19: *
20: **********************************************************************************/package org.sakaiproject.memory.api;
21:
22: /**
23: * <p>
24: * A DerivedCache provides some additional caching derived from the primary data in a Cache. It is directly accessed by the client for this derived data. It is notified by the primary cache it is attached to when the cache contents change.
25: * </p>
26: */
27: public interface DerivedCache {
28: /**
29: * Notification that an object has been put into the primary cache.
30: *
31: * @param key
32: * The cache key.
33: * @param payload
34: * The cached objed.
35: */
36: void notifyCachePut(Object key, Object payload);
37:
38: /**
39: * Notification that the primary cache has been cleared of all entries.
40: */
41: void notifyCacheClear();
42:
43: /**
44: * Notification that this object under this key has been removed from the cache.
45: *
46: * @param key
47: * The cache key.
48: * @param payload
49: * The cached objed.
50: */
51: void notifyCacheRemove(Object key, Object payload);
52: }
|