Interface GroupManager

All Known Implementing Classes:
GroupManagerImpl

public interface GroupManager
Control's key grouping.
Author:
Pete Muir
  • Method Details

    • getGroup

      Object getGroup(Object key)
      Get the group for a given key
      Parameters:
      key - the key for which to get the group
      Returns:
      the group, or null if no group is defined for the key
    • collect

      <K, V> Map<K,V> collect(CacheStream<? extends CacheEntry<K,V>> stream, InvocationContext ctx, String groupName)
      Collects all entries belonging to a single group.

      This method receives a CacheStream and it must filter the CacheEntry that belongs to the group.

      If the cache is transactional, the entries must be stored in the InvocationContext (with proper read version if applicable).

      Type Parameters:
      K - The key type.
      V - The value type.
      Parameters:
      stream - The CacheStream of CacheEntry to filter.
      ctx - The InvocationContext to use during its invocation.
      groupName - The group name to collect.
      Returns:
      A Map with keys and value.