Package org.apache.commons.jcs3.access
Class GroupCacheAccess<K,V> 
java.lang.Object
org.apache.commons.jcs3.access.AbstractCacheAccess<GroupAttrName<K>,V>
 
org.apache.commons.jcs3.access.GroupCacheAccess<K,V> 
- All Implemented Interfaces:
- ICacheAccessManagement,- IGroupCacheAccess<K,- V> 
public class GroupCacheAccess<K,V> 
extends AbstractCacheAccess<GroupAttrName<K>,V>
implements IGroupCacheAccess<K,V>  
Access for groups.
- 
Constructor SummaryConstructorsConstructorDescriptionGroupCacheAccess(CompositeCache<GroupAttrName<K>, V> cacheControl) Constructor for the GroupCacheAccess object
- 
Method SummaryModifier and TypeMethodDescriptiongetFromGroup(K name, String group) Gets an item out of the cache that is in a specified group.getGroupKeys(String group) Gets the set of keys of objects currently in the group.Gets the set of group names in the cachevoidinvalidateGroup(String group) Invalidates a group: remove all the group membersvoidputInGroup(K name, String groupName, V value) Allows the user to put an object into a group within a particular cache region.voidputInGroup(K name, String groupName, V value, IElementAttributes attr) Allows the user to put an object into a group within a particular cache region.voidremoveFromGroup(K name, String group) Removes a single item by name from a group.Methods inherited from class org.apache.commons.jcs3.access.AbstractCacheAccessclear, dispose, freeMemoryElements, getCacheAttributes, getCacheControl, getDefaultElementAttributes, getStatistics, getStats, setCacheAttributes, setDefaultElementAttributesMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.commons.jcs3.access.behavior.ICacheAccessManagementclear, dispose, freeMemoryElements, getCacheAttributes, getDefaultElementAttributes, getStatistics, getStats, setCacheAttributes, setDefaultElementAttributes
- 
Constructor Details- 
GroupCacheAccessConstructor for the GroupCacheAccess object- Parameters:
- cacheControl-
 
 
- 
- 
Method Details- 
getFromGroupGets an item out of the cache that is in a specified group.- Specified by:
- getFromGroupin interface- IGroupCacheAccess<K,- V> 
- Parameters:
- name- The key name.
- group- The group name.
- Returns:
- The cached value, null if not found.
 
- 
putInGroupAllows the user to put an object into a group within a particular cache region. This method sets the object's attributes to the default for the region.- Specified by:
- putInGroupin interface- IGroupCacheAccess<K,- V> 
- Parameters:
- name- The key name.
- groupName- The group name.
- value- The object to cache
- Throws:
- CacheException
 
- 
putInGrouppublic void putInGroup(K name, String groupName, V value, IElementAttributes attr) throws CacheException Allows the user to put an object into a group within a particular cache region. This method allows the object's attributes to be individually specified.- Specified by:
- putInGroupin interface- IGroupCacheAccess<K,- V> 
- Parameters:
- name- The key name.
- groupName- The group name.
- value- The object to cache
- attr- The objects attributes.
- Throws:
- CacheException
 
- 
removeFromGroupRemoves a single item by name from a group.- Specified by:
- removeFromGroupin interface- IGroupCacheAccess<K,- V> 
- Parameters:
- name-
- group-
 
- 
getGroupKeysGets the set of keys of objects currently in the group.- Specified by:
- getGroupKeysin interface- IGroupCacheAccess<K,- V> 
- Parameters:
- group-
- Returns:
- A Set of keys.
 
- 
getGroupNamesGets the set of group names in the cache- Returns:
- A Set of group names.
 
- 
invalidateGroupInvalidates a group: remove all the group members- Specified by:
- invalidateGroupin interface- IGroupCacheAccess<K,- V> 
- Parameters:
- group- The name of the group to invalidate
 
 
-