@Override public Set<NotificationFilterPreference> getFilterPreferences(DocumentReference user) throws NotificationException { return modelBridge.getFilterPreferences(user); }
@Override public Set<NotificationFilterPreference> getFilterPreferences(DocumentReference user) throws NotificationException { if (user == null) { return Collections.EMPTY_SET; } String userId = serializer.serialize(user); Set<NotificationFilterPreference> preferences = cache.get(userId); if (preferences != null) { return preferences; } preferences = modelBridge.getFilterPreferences(user); cache.set(userId, preferences); return preferences; }
Set<NotificationFilterPreference> preferencesInTheNewStore = modelBridge.getFilterPreferences(user); if (!modelBridge.getFilterPreferences(user).isEmpty() && preferencesInTheNewStore.size() == preferencesToSave.size()) { logger.info("It seems the notification filter preferences of user [{}] has already been migrated,"