void clearCurrentCache() { lruCache.invalidateAll(); }
@NotNull public Set<String> removeOptimisticUpdates(@NotNull final UUID mutationId) { checkNotNull(mutationId, "mutationId == null"); Set<String> changedCacheKeys = new HashSet<>(); Set<String> removedKeys = new HashSet<>(); Map<String, RecordJournal> recordJournals = lruCache.asMap(); for (Map.Entry<String, RecordJournal> entry : recordJournals.entrySet()) { String cacheKey = entry.getKey(); RecordJournal journal = entry.getValue(); changedCacheKeys.addAll(journal.revert(mutationId)); if (journal.history.isEmpty()) { removedKeys.add(cacheKey); } } lruCache.invalidateAll(removedKeys); return changedCacheKeys; }
@SuppressWarnings("ResultOfMethodCallIgnored") @Override public void clearAll() { lruCache.invalidateAll(); //noinspection ResultOfMethodCallIgnored nextCache().apply(new Action<NormalizedCache>() { @Override public void apply(@NotNull NormalizedCache cache) { cache.clearAll(); } }); }
void clearCurrentCache() { lruCache.invalidateAll(); } }
void clearCurrentCache() { lruCache.invalidateAll(); } }
/** * @since 11.0 */ @Override public void invalidateAll(Iterable<?> keys) { delegate().invalidateAll(keys); }
@Override public void invalidateAll() { delegate().invalidateAll(); }
@Nonnull public Set<String> removeOptimisticUpdates(@Nonnull final UUID mutationId) { checkNotNull(mutationId, "mutationId == null"); Set<String> changedCacheKeys = new HashSet<>(); Set<String> removedKeys = new HashSet<>(); Map<String, RecordJournal> recordJournals = lruCache.asMap(); for (Map.Entry<String, RecordJournal> entry : recordJournals.entrySet()) { String cacheKey = entry.getKey(); RecordJournal journal = entry.getValue(); changedCacheKeys.addAll(journal.revert(mutationId)); if (journal.history.isEmpty()) { removedKeys.add(cacheKey); } } lruCache.invalidateAll(removedKeys); return changedCacheKeys; }
@Nonnull public Set<String> removeOptimisticUpdates(@Nonnull final UUID mutationId) { checkNotNull(mutationId, "mutationId == null"); Set<String> changedCacheKeys = new HashSet<>(); Set<String> removedKeys = new HashSet<>(); Map<String, RecordJournal> recordJournals = lruCache.asMap(); for (Map.Entry<String, RecordJournal> entry : recordJournals.entrySet()) { String cacheKey = entry.getKey(); RecordJournal journal = entry.getValue(); changedCacheKeys.addAll(journal.revert(mutationId)); if (journal.history.isEmpty()) { removedKeys.add(cacheKey); } } lruCache.invalidateAll(removedKeys); return changedCacheKeys; }
@Override public void clearAll() { lruCache.invalidateAll(); //noinspection ResultOfMethodCallIgnored nextCache().apply(new Action<NormalizedCache>() { @Override public void apply(@Nonnull NormalizedCache cache) { cache.clearAll(); } }); }
@Override public void clearAll() { lruCache.invalidateAll(); //noinspection ResultOfMethodCallIgnored nextCache().apply(new Action<NormalizedCache>() { @Override public void apply(@Nonnull NormalizedCache cache) { cache.clearAll(); } }); }