1 package org.apache.jcs.access.behavior;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.util.Set;
23
24 import org.apache.jcs.access.exception.CacheException;
25 import org.apache.jcs.engine.behavior.IElementAttributes;
26
27 /***
28 * IGroupCacheAccess defines group specific behavior for the client access
29 * classes.
30 */
31 public interface IGroupCacheAccess
32 extends ICacheAccess
33 {
34 /***
35 * Gets the g attribute of the IGroupCacheAccess object
36 * <p>
37 * @param name
38 * @param group
39 * the name of the group to associate this with.
40 * @return The teh object that is keyed by the name in the group
41 */
42 Object getFromGroup( Object name, String group );
43
44 /***
45 * Puts an item int eh cache associated with this group.
46 * <p>
47 * @param key
48 * @param group
49 * @param obj
50 * @throws CacheException
51 */
52 void putInGroup( Object key, String group, Object obj )
53 throws CacheException;
54
55 /***
56 * Put in the cache associated with this group using these attributes.
57 * <p>
58 * @param key
59 * @param group
60 * @param obj
61 * @param attr
62 * @throws CacheException
63 */
64 void putInGroup( Object key, String group, Object obj, IElementAttributes attr )
65 throws CacheException;
66
67 /***
68 * Remove the item from this group in this region by this name.
69 * <p>
70 * @param name
71 * @param group
72 */
73 public void remove( Object name, String group );
74
75 /***
76 * Gets the set of keys of objects currently in the group
77 * <p>
78 * @param group
79 * @return the set of group keys.
80 */
81 public Set getGroupKeys( String group );
82
83 /***
84 * Invalidates a group
85 * <p>
86 * @param group
87 */
88 public void invalidateGroup( String group );
89 }