/** * Select the produced {@link ChannelInstance}s that are marked for instrumentation and register them if they * contain a measured cardinality. * * @param producedChannelInstances the {@link ChannelInstance}s */ protected void registerMeasuredCardinalities(Collection<ChannelInstance> producedChannelInstances) { for (ChannelInstance producedChannelInstance : producedChannelInstances) { if (!producedChannelInstance.wasProduced()) { this.logger.error("Expected {} to be produced, but is not flagged as such.", producedChannelInstance); continue; } if (producedChannelInstance.isMarkedForInstrumentation()) { this.registerMeasuredCardinality(producedChannelInstance); } } }