in src/main/java/org/apache/sling/discovery/base/connectors/announcement/AnnouncementRegistryImpl.java [142:156]
public synchronized Collection<CachedAnnouncement> listLocalIncomingAnnouncements() {
Collection<CachedAnnouncement> result = new LinkedList<>(ownAnnouncementsCache.values());
for (Iterator<CachedAnnouncement> it = result.iterator(); it.hasNext();) {
CachedAnnouncement cachedAnnouncement = it.next();
if (cachedAnnouncement.getAnnouncement().isInherited()) {
it.remove();
continue;
}
if (cachedAnnouncement.hasExpired()) {
it.remove();
continue;
}
}
return result;
}