use of org.adempiere.util.lang.impl.TableRecordReferenceSet in project metasfresh-webui-api by metasfresh.
the class DocumentCacheInvalidationDispatcher method resetNow.
private void resetNow(@NonNull final DocumentToInvalidateMap documentsToInvalidate) {
logger.trace("resetNow: {}", documentsToInvalidate);
try (final IAutoCloseable c = documents.getWebsocketPublisher().temporaryCollectOnThisThread()) {
documentsToInvalidate.toCollection().forEach(documents::invalidate);
}
//
final TableRecordReferenceSet rootRecords = documentsToInvalidate.getRootRecords();
viewsRepository.notifyRecordsChanged(rootRecords);
}
use of org.adempiere.util.lang.impl.TableRecordReferenceSet in project metasfresh-webui-api by metasfresh.
the class AbstractCustomView method notifyRecordsChanged.
@Override
public final void notifyRecordsChanged(@NonNull final TableRecordReferenceSet recordRefs) {
if (recordRefs.isEmpty()) {
// nothing to do, but shall not happen
return;
}
final TableRecordReferenceSet recordRefsEligible = recordRefs.filter(this::isEligibleInvalidateEvent);
if (recordRefsEligible.isEmpty()) {
// nothing to do
return;
}
final DocumentIdsSelection documentIdsToInvalidate = getDocumentIdsToInvalidate(recordRefsEligible);
if (documentIdsToInvalidate.isEmpty()) {
// nothing to do
return;
}
rowsData.invalidate(documentIdsToInvalidate);
ViewChangesCollector.getCurrentOrAutoflush().collectRowsChanged(this, documentIdsToInvalidate);
}
Aggregations