in webindex/modules/data/src/main/java/webindex/data/fluo/UriCombineQ.java [62:84]
public void process(TransactionBase tx, Iterable<Change<String, UriInfo>> updates) {
Map<String, Long> domainUpdates = new HashMap<>();
for (Change<String, UriInfo> update : updates) {
String uri = update.getKey();
UriInfo oldVal = update.getOldValue().orElse(UriInfo.ZERO);
UriInfo newVal = update.getNewValue().orElse(UriInfo.ZERO);
exportQ.add(tx, uri, new UriUpdate(uri, oldVal, newVal));
linksChanged.mark();
String pageDomain = URL.fromUri(uri).getReverseDomain();
if (oldVal.equals(UriInfo.ZERO) && !newVal.equals(UriInfo.ZERO)) {
domainUpdates.merge(pageDomain, 1L, (o, n) -> o + n);
linksNew.mark();
} else if (newVal.equals(UriInfo.ZERO) && !oldVal.equals(UriInfo.ZERO)) {
domainUpdates.merge(pageDomain, -1L, (o, n) -> o + n);
}
}
domainQ.addAll(tx, domainUpdates);
}