public class GroupCacheAccess<K,V> extends AbstractCacheAccess<GroupAttrName<K>,V> implements IGroupCacheAccess<K,V>
Constructor and Description |
---|
GroupCacheAccess(CompositeCache<GroupAttrName<K>,V> cacheControl)
Constructor for the GroupCacheAccess object
|
Modifier and Type | Method and Description |
---|---|
V |
getFromGroup(K name,
String group)
Gets an item out of the cache that is in a specified group.
|
Set<K> |
getGroupKeys(String group)
Gets the set of keys of objects currently in the group.
|
Set<String> |
getGroupNames()
Gets the set of group names in the cache
|
void |
invalidateGroup(String group)
Invalidates a group: remove all the group members
|
void |
putInGroup(K name,
String groupName,
V value)
Allows the user to put an object into a group within a particular cache
region.
|
void |
putInGroup(K name,
String groupName,
V value,
IElementAttributes attr)
Allows the user to put an object into a group within a particular cache
region.
|
void |
removeFromGroup(K name,
String group)
Remove the item from this group in this region by this name.
|
clear, dispose, freeMemoryElements, getCacheAttributes, getCacheControl, getDefaultElementAttributes, getStatistics, getStats, setCacheAttributes, setDefaultElementAttributes
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clear, dispose, freeMemoryElements, getCacheAttributes, getDefaultElementAttributes, getStatistics, getStats, setCacheAttributes, setDefaultElementAttributes
public GroupCacheAccess(CompositeCache<GroupAttrName<K>,V> cacheControl)
cacheControl
- public V getFromGroup(K name, String group)
getFromGroup
in interface IGroupCacheAccess<K,V>
name
- The key name.group
- The group name.public void putInGroup(K name, String groupName, V value) throws CacheException
putInGroup
in interface IGroupCacheAccess<K,V>
name
- The key name.groupName
- The group name.value
- The object to cacheCacheException
public void putInGroup(K name, String groupName, V value, IElementAttributes attr) throws CacheException
putInGroup
in interface IGroupCacheAccess<K,V>
name
- The key name.groupName
- The group name.value
- The object to cacheattr
- The objects attributes.CacheException
public void removeFromGroup(K name, String group)
IGroupCacheAccess
removeFromGroup
in interface IGroupCacheAccess<K,V>
name
- group
- public Set<K> getGroupKeys(String group)
getGroupKeys
in interface IGroupCacheAccess<K,V>
group
- public Set<String> getGroupNames()
public void invalidateGroup(String group)
invalidateGroup
in interface IGroupCacheAccess<K,V>
group
- The name of the group to invalidateCopyright © 2002–2018 The Apache Software Foundation. All rights reserved.