@Override public void doWithParticipants(ParticipantOperation operation) { this.lock.readLock().lock(); try { for (RtpParticipant member : this.members.values()) { try { operation.doWithParticipant(member); } catch (Exception e) { LOG.error("Failed to perform operation {} on member {}.", e, operation, member); } } } finally { this.lock.readLock().unlock(); } }
@Override public void doWithReceivers(ParticipantOperation operation) { this.lock.readLock().lock(); try { for (RtpParticipant receiver : this.receivers) { try { operation.doWithParticipant(receiver); } catch (Exception e) { LOG.error("Failed to perform operation {} on receiver {}.", e, operation, receiver); } } } finally { this.lock.readLock().unlock(); } }