/**
   * Update the channel to deploy group cache map
   *
   * @param model the model to fill the cache from
   */
  private void updateDeployGroupCache(final ChannelServiceAccess model) {
    // this will simply rebuild the complete map

    // clear first
    this.deployKeysMap.clear();

    // fill afterwards
    for (final Map.Entry<String, Set<String>> entry : model.getDeployGroupMap().entrySet()) {
      final String channelId = entry.getKey();
      final List<DeployGroup> groups =
          entry
              .getValue()
              .stream()
              .map(groupId -> model.getDeployGroup(groupId))
              .collect(Collectors.toList());
      this.deployKeysMap.putAll(channelId, groups);
    }
  }
 private static ChannelId buildId(final String channelId, final ChannelServiceAccess channels) {
   final Set<String> names = new LinkedHashSet<>(channels.getNameMappings(channelId));
   final String description = channels.getDescription(channelId);
   return new ChannelId(channelId, names, description);
 }