Class GroupManagerImpl
java.lang.Object
org.infinispan.distribution.group.impl.GroupManagerImpl
- All Implemented Interfaces:
GroupManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<K,V> Map<K, V> collect(CacheStream<? extends CacheEntry<K, V>> stream, InvocationContext ctx, String groupName) Collects all entries belonging to a single group.Get the group for a given key
-
Constructor Details
-
GroupManagerImpl
-
-
Method Details
-
getGroup
Description copied from interface:GroupManagerGet the group for a given key- Specified by:
getGroupin interfaceGroupManager- Parameters:
key- the key for which to get the group- Returns:
- the group, or null if no group is defined for the key
-
collect
public <K,V> Map<K,V> collect(CacheStream<? extends CacheEntry<K, V>> stream, InvocationContext ctx, String groupName) Description copied from interface:GroupManagerCollects all entries belonging to a single group.This method receives a
CacheStreamand it must filter theCacheEntrythat belongs to the group.If the cache is transactional, the entries must be stored in the
InvocationContext(with proper read version if applicable).- Specified by:
collectin interfaceGroupManager- Type Parameters:
K- The key type.V- The value type.- Parameters:
stream- TheCacheStreamofCacheEntryto filter.ctx- TheInvocationContextto use during its invocation.groupName- The group name to collect.- Returns:
- A
Mapwith keys and value.
-