void (Predicate<? super CachesInvalidator> isAllowedInvalidator) { CachesInvalidator.EP_NAME.getExtensionList().stream().filter(isAllowedInvalidator).forEach(invalidator -> { try { invalidator.invalidateCaches(); } catch (Throwable t) { LOG.warn("Failed to invalidate caches with " + invalidator.getClass().getName() + ". " + t.getMessage(), t); } }); }